Re: [RFC] KVM: x86/mmu: Prefetch forward run of pages on TDP page faults
James Houghton <[email protected]>
| Newsgroups | org.kernel.vger.kvm,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <CADrL8HU2uoOVsOoxY9Sm2edV5-aXzP8QLL2LPShOF6bASpkfmg@mail.gmail.com> |
On Tue, Aug 25, 2026 at 8:00 AM Sean Christopherson <[email protected]> wrote: > > On Tue, Aug 25, 2026, Marco Marangoni wrote: > > It's worth mentioning that I also evaluated using the existing > > KVM_PRE_FAULT_MEMORY ioctl, but this doesn't work well for our use-case, as > > it requires the vCPU to be paused. > > What about if/when KVM Userfault[*] comes along? I.e. pre-fault memory when the > vCPU exits to userspace. My understanding is that Firecracker performs its userfaultfd operations in a separate process. KVM Userfault doesn't break this, it just means Firecracker would need a way to signal the other process when we get KVM_EXIT_USERFAULTs. Firecracker might be using async PF; using KVM Userfault basically disables async PF. > If KVM Userfault + KVM_PRE_FAULT_MEMORY is viable for Firecracker and provides > the desired performance, I would strongly prefer that approach over KVM doing its > own prefetching. That way other architectures don't need to implement prefetching > as well (arm64 already supports KVM_PRE_FAULT_MEMORY, and RISC-V has patches posted). I also really like this approach if it is workable for Firecracker. > I'm aiming to get back to that series "soon", this would simply be more motivation > to get KVM Userfault landed. Yay! > [*] https://lore.kernel.org/all/[email protected] >