|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1/2] x86/mm: factor out the code for shattering an l3 PTE
Hi Hongyan, On 06/12/2019 15:53, Hongyan Xia wrote:
I understand this is just a factor out of the current code, but the code feels wrong (at least in theory) and wasteful. You would allocate the L2 table, prepare it and then free it if the L3 entry has _PAGE_PRESENT or _PAGE_PSE cleared. Also, in theory, there is nothing preventing the l3 flags to be modified behind your back. So you could end up to generate the l2 entries with the old l3 flags. In nutshell, it feels to me that the shattering/allocation should happen with the lock taken. This would also allow you to not allocate the l2 table when you are removing the page. Cheers, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |