On 16/01/2026 15:34, Edgecombe, Rick P wrote:
On Fri, 2026-01-16 at 15:00 +0000, Nikita Kalyazin wrote:
Does this assume the folio would not have been split after it was
zapped? As in, if it was zapped at 2MB granularity (no 4KB direct
map split required) but then restored at 4KB (split required)? Or
it gets merged somehow before this?

AFAIK it can't be zapped at 2MB granularity as the zapping code will
inevitably cause splitting because guest_memfd faults occur at the
base page granularity as of now.

Ah, right since there are no huge pages currently. Then the huge page
series will need to keep this in mind and figure out some solution.
Probably worth a comment on that assumption to help anyone that changes
it.

Makes sense.  I'll leave a comment.


I imagine this feature is really targeted towards machines running a
bunch of untrusted VMs, so cloud hypervisors really. In that case the
direct map will probably be carved up pretty quick. Did you consider
just breaking the full direct map to 4k at the start when it's in use?

That's an interesting point, I haven't thought about it from this perspective. We should run some tests internally to see if it'd help. This will likely change with support for huge pages coming in though.

Reply via email to