[PATCH v5 2/5] KVM: arm64: Add pre_fault_memory implementation
Thomson, Jack
jackabt.amazon at gmail.com
Fri Aug 21 06:27:08 PDT 2026
Hi Alex,
On 10/07/2026 5:00 pm, Alexandru Elisei wrote:
>> Does it guarantee that, after it completes and returns to userspace, the
>> address range [gpa, gpa + size] is mapped in the VM's stage 2 tables? Or
>> does it guarantee that the address range was mapped at stage 2 at some
>> point during the ioctl's execution, but parts, or all of it, might not be
>> mapped after the ioctl completes and returns to userspace?
>
> Nevermind, spend some time thinking about it and it turns out it's
> impossible for KVM to guarantee that the memory is still mapped after the
> ioctls returns. So I answered my own question, thanks.
>
> Alex
>
Yeah it's best effort, as if a vCPU had faulted the range itself. This
could be undone by an invalidation or memslot update. The value is in
the common cast (for us, post-copy migration) the guest doesn't pay the
stage-2 fault fault cost at run time.
I think it would be worth me adding a sentence to the documentation
noting there is no persistance guarentee.
--
Thanks,
Jack
More information about the linux-arm-kernel
mailing list