kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] KVM: x86/mmu: Fix TLB flushing bugs in TDP MMU
@ 2021-03-19 23:20 Sean Christopherson
  2021-03-19 23:20 ` [PATCH 1/2] KVM: x86/mmu: Ensure TLBs are flushed when yielding during GFN range zap Sean Christopherson
  2021-03-19 23:20 ` [PATCH 2/2] KVM: x86/mmu: Ensure TLBs are flushed when yielding during NX zapping Sean Christopherson
  0 siblings, 2 replies; 10+ messages in thread
From: Sean Christopherson @ 2021-03-19 23:20 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Sean Christopherson, Vitaly Kuznetsov, Wanpeng Li, Jim Mattson,
	Joerg Roedel, kvm, linux-kernel, Ben Gardon

Two bug fixes involving the TDP MMU.  Found by inspection while working on
a series to consolidate MMU notifier memslot walks across architectures,
which I'll hopefully post next week.

Patch 1 fixes a bug where KVM yields, e.g. due to lock contention, without
performing a pending TLB flush that was required from a previous root.

Patch 2 fixes a much more egregious bug where it fails to handle TDP MMU
flushes in NX huge page recovery, as well as a similar bug to patch 1
where KVM can yield without correctly handling a previously triggered
pending TLB flush.

Sean Christopherson (2):
  KVM: x86/mmu: Ensure TLBs are flushed when yielding during GFN range
    zap
  KVM: x86/mmu: Ensure TLBs are flushed when yielding during NX zapping

 arch/x86/kvm/mmu/mmu.c     | 15 ++++++++++-----
 arch/x86/kvm/mmu/tdp_mmu.c | 29 +++++++++++++++--------------
 arch/x86/kvm/mmu/tdp_mmu.h |  3 ++-
 3 files changed, 27 insertions(+), 20 deletions(-)

-- 
2.31.0.rc2.261.g7f71774620-goog


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-03-25 19:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-19 23:20 [PATCH 0/2] KVM: x86/mmu: Fix TLB flushing bugs in TDP MMU Sean Christopherson
2021-03-19 23:20 ` [PATCH 1/2] KVM: x86/mmu: Ensure TLBs are flushed when yielding during GFN range zap Sean Christopherson
2021-03-22 21:27   ` Ben Gardon
2021-03-19 23:20 ` [PATCH 2/2] KVM: x86/mmu: Ensure TLBs are flushed when yielding during NX zapping Sean Christopherson
2021-03-22 21:27   ` Ben Gardon
2021-03-23  0:15     ` Sean Christopherson
2021-03-23 16:26       ` Ben Gardon
2021-03-23 18:58         ` Sean Christopherson
2021-03-23 20:34           ` Ben Gardon
2021-03-25 19:15             ` Sean Christopherson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).