Re: [PATCH v4 07/11] KVM: guest_memfd: Add support for freezing mappings
From: Ackerley Tng
Date: Thu Jul 30 2026 - 15:02:09 EST
Tarun Sahu <tarunsahu@xxxxxxxxxx> writes:
> Introduce kvm_gmem_freeze() to freeze a guest_memfd inode's mapping,
> which prevents fallocate() operations and new page fault allocations
> during preservation.
>
> Use a global SRCU (`kvm_gmem_freeze_srcu`) to synchronize freeze state
> checkers without incurring per-fault locking overhead or risking per-CPU
> memory exhaustion (as per-CPU structure not counted in cgroup) from
> per-inode SRCU structures by faulty/compromised VMM.
>
I wonder if everything to do with freezing should be gated behind
CONFIG_LIVEUPDATE_GUEST_MEMFD. What do people think?
> Signed-off-by: Tarun Sahu <tarunsahu@xxxxxxxxxx>
>
> [...snip...]
>