If the writable argument is non-NULL, set *writable to false when exiting early from try_async_pf with *pfn set to KVM_PFN_NOSLOT. Cf. commit b2740d3533a3 ("KVM: ensure __gfn_to_pfn_memslot initializes *writable"). Signed-off-by: Jim Mattson <jmattson@xxxxxxxxxx> --- arch/x86/kvm/mmu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 8af8c8f88bd7..dcc397bfeecc 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -3811,6 +3811,8 @@ static bool try_async_pf(struct kvm_vcpu *vcpu, bool prefault, gfn_t gfn, * Don't expose private memslots to L2. */ if (is_guest_mode(vcpu) && !kvm_is_visible_gfn(vcpu->kvm, gfn)) { + if (writable) + *writable = false; *pfn = KVM_PFN_NOSLOT; return false; } -- 2.17.0.441.gb46fe60e1d-goog