Re: [PATCH RFC v8 17/56] x86/fault: Add support to handle the RMP fault for user address
From: Dave Hansen
Date: Tue Apr 11 2023 - 14:28:05 EST
On 3/28/23 16:31, Michael Roth wrote:
> However...
>
> The fact that any pages potentially triggering these #PFs are able to be
> mapped as 2M in the first place means that all the PFNs covered by that
> 2M mapping must also been allocated by via mappable/VMA memory rather
> than via restricted memfd where userspace mappings are not possible.
>
> So I think we should be able to drop this patch entirely, as well as
> allow the use of HugeTLBFS for non-restricted memfd memory (though
> eventually the guest will switch all its memory to private/restricted
> so not gaining much there other than reducing management complexity).
This is sounding a bit voodoo-ish to me.
If this whole series is predicated on having its memory supplied via one
very specific ABI with very specific behavior.
That connection and the associated contract isn't spelled out very
clearly in this series. I'm sure it works on your machine and is clear
to _you_ but I'm worried that nobody else is going to be able to figure
out the voodoo.
Could we make sure that this stuff is made very clear in the
Documentation and cover letter, please?