[PATCH] drm/xe: Replace the scratch pages with NULL PTEs
Thomas Hellström
thomas.hellstrom at linux.intel.com
Fri Dec 8 11:19:28 UTC 2023
On 12/7/23 17:32, Matt Roper wrote:
> On Thu, Dec 07, 2023 at 05:25:01PM +0100, Thomas Hellström wrote:
>> + intel-xe cc.
>>
>>
>> On 12/7/23 17:17, Lucas De Marchi wrote:
>>> On Thu, Dec 07, 2023 at 04:44:23PM +0100, Thomas Hellström wrote:
>>>> Replace the scratch pages with NULL PTEs that return 0 when reading and
>>>> do nothing when writing.
>>> but don't we want to keep scratch so we can check when things go wrong
>>> and writes go where they shouldn't?
>> The argument against that was that apps that incorrectly writes to scratch
>> and then reads back the same value wouldn't notice that it did something
>> wrong, and the case you mention would to some extent be captured by not
>> having a scratch page at all and check for pagefaults?
>>
>> I admit I haven't been following the discussions around scratch pages long
>> enough to know the historical uses for it. Cc'ing Joonas for further
>> discussion.
> It seems like null PTE is probably the best thing to do for real-world,
> production use. But for developer use we might want to add a kconfig
> option at some point that brings back the scratch page and pre-poisons
> it, since that might be useful in some debugging situations.
>
>
> Matt
Hi, Matt.
Sounds like a good idea. IMO, Let's add that when we get a request for
it for debugging purposes. I'll leave the scratch page-table structure
in v2 so it should be easy to add in.
Thanks,
Thomas
More information about the Intel-xe
mailing list