[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YkHLyP1LvH0MYN25@google.com>
Date: Mon, 28 Mar 2022 14:52:56 +0000
From: Sean Christopherson <seanjc@...gle.com>
To: Vitaly Kuznetsov <vkuznets@...hat.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, Ben Gardon <bgardon@...gle.com>
Subject: Re: [PATCH] KVM: x86/mmu: Zap only TDP MMU leafs in zap range and
mmu_notifier unmap
On Mon, Mar 28, 2022, Vitaly Kuznetsov wrote:
> Sean Christopherson <seanjc@...gle.com> writes:
>
> > Re-introduce zapping only leaf SPTEs in kvm_zap_gfn_range() and
> > kvm_tdp_mmu_unmap_gfn_range(), this time without losing a pending TLB
> > flush when processing multiple roots (including nested TDP shadow roots).
> > Dropping the TLB flush resulted in random crashes when running Hyper-V
> > Server 2019 in a guest with KSM enabled in the host (or any source of
> > mmu_notifier invalidations, KSM is just the easiest to force).
> >
> > This effectively revert commits 873dd122172f8cce329113cfb0dfe3d2344d80c0
> > and fcb93eb6d09dd302cbef22bd95a5858af75e4156, and thus restores commit
> > cf3e26427c08ad9015956293ab389004ac6a338e, plus this delta on top:
> >
> > bool kvm_tdp_mmu_zap_leafs(struct kvm *kvm, int as_id, gfn_t start, gfn_t end,
> > struct kvm_mmu_page *root;
> >
> > for_each_tdp_mmu_root_yield_safe(kvm, root, as_id)
> > - flush = tdp_mmu_zap_leafs(kvm, root, start, end, can_yield, false);
> > + flush = tdp_mmu_zap_leafs(kvm, root, start, end, can_yield, flush);
> >
> > return flush;
> > }
> >
>
> I confirm this fixes the issue I was seeing, thanks!
>
> Tested-by: Vitaly Kuznetsov <vkuznets@...hat.com>
Phew! I think I would have cried were that not the case :-) Thanks for testing!
Powered by blists - more mailing lists