[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZAfZPA5Ed7STUT2B@google.com>
Date: Tue, 7 Mar 2023 16:39:24 -0800
From: Sean Christopherson <seanjc@...gle.com>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: Jeremi Piotrowski <jpiotrowski@...ux.microsoft.com>,
linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Tianyu Lan <ltykernel@...il.com>,
Michael Kelley <mikelley@...rosoft.com>
Subject: Re: [PATCH] KVM: SVM: Disable TDP MMU when running on Hyper-V
On Wed, Mar 08, 2023, Paolo Bonzini wrote:
> On Tue, Mar 7, 2023 at 6:36 PM Sean Christopherson <seanjc@...gle.com> wrote:
> > Thinking about this more, I would rather revert commit 1e0c7d40758b ("KVM: SVM:
> > hyper-v: Remote TLB flush for SVM") or fix the thing properly straitaway. KVM
> > doesn't magically handle the flushes correctly for the shadow/legacy MMU, KVM just
> > happens to get lucky and not run afoul of the underlying bugs.
>
> I don't think it's about luck---the legacy MMU's zapping/invalidation
> seems to invoke the flush hypercall correctly:
...for the paths that Jeremi has exercised, and for which a stale TLB entry is
fatal to L2. E.g. kvm_unmap_gfn_range() does not have a range-based TLB flush
in its path and fully relies on the buggy kvm_flush_remote_tlbs().
In other words, KVM is getting lucky :-)
> Jeremi, did you ever track the call stack where
> hyperv_nested_flush_guest_mapping is triggered?
I don't think it matters. As above, it only takes one path where KVM is fully
relying on kvm_flush_remote_tlbs() for the whole thing to fall apart.
Powered by blists - more mailing lists