Re: [PATCH v2 0/4] KVM: x86/mmu: Fix pre-fault and map private loops

From: Sean Christopherson

Date: Mon Sep 21 2026 - 10:18:56 EST


On Wed, 26 Aug 2026 09:42:10 -0700, Sean Christopherson wrote:
> Fix a bug in the pre-fault path where KVM fails to reload an invalidated
> MMU root, which puts the KVM_PRE_FAULT_MEMORY task into an infinite loop
> (although it's breakable, so not fatal to the host). My best guess is that
> the test started failing once PREEMPT_LAZY was enabled by default. Note,
> the bug is *really* easy to repro with a to-be-proposed patch to have KVM
> do auto-pre-faulting[*], i.e. prefetch surrounding pages on fault.
>
> [...]

Applied to kvm-x86 mmu, thanks!

[1/4] KVM: x86/mmu: Reload MMU on *every* page pre-fault attempt/iteration
https://github.com/kvm-x86/linux/commit/355323a4dc94
[2/4] KVM: x86/mmu: Harden "map private PFN" against unexpected root invalidation
https://github.com/kvm-x86/linux/commit/698b8c88e159
[3/4] KVM: x86/mmu: Top-up memory caches when retrying "map private PFN"
https://github.com/kvm-x86/linux/commit/6415d9c4ee19
[4/4] KVM: x86/mmu: Add sanity check to detect stale page faults in "map private PFN"
https://github.com/kvm-x86/linux/commit/f7a3be227619

--
https://github.com/kvm-x86/linux/tree/next