mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] KVM: x86: Acquire SRCU in fastpath handler
@ 2023-07-21 22:43 Sean Christopherson
  2023-07-21 22:43 ` [PATCH 1/2] KVM: x86: Acquire SRCU read lock when handling fastpath MSR writes Sean Christopherson
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Sean Christopherson @ 2023-07-21 22:43 UTC (permalink / raw)
  To: Sean Christopherson, Paolo Bonzini
  Cc: kvm, linux-kernel, Greg Thelen, Aaron Lewis

Acquire SRCU for read when handling fastpath MSR writes so that side
effects like

Note, the PMU case could (and should) also be fixed by making the PMU
filter code smarter, e.g. by snapshotting which PMC events need to be
emulated, thus avoiding the filter lookup entirely.  But acquiring SRCU
is relatively cheap, and this isn't the first bug of this nature.

Which is a perfect segue into patch 2, which reverts a hack-a-fix to
fudge around SVM needing to do the front half of emulation when skipping
the WRMSR.

Note #2, the fastpath also doesn't honor the MSR filter for TSC_DEADLINE.
That's a problem for another day.

Sean Christopherson (2):
  KVM: x86: Acquire SRCU read lock when handling fastpath MSR writes
  Revert "KVM: SVM: Skip WRMSR fastpath on VM-Exit if next RIP isn't
    valid"

 arch/x86/kvm/svm/svm.c | 10 ++--------
 arch/x86/kvm/x86.c     |  4 ++++
 2 files changed, 6 insertions(+), 8 deletions(-)


base-commit: fdf0eaf11452d72945af31804e2a1048ee1b574c
-- 
2.41.0.487.g6d72f3e995-goog


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

end of thread, other threads:[~2023-07-29 14:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-21 22:43 [PATCH 0/2] KVM: x86: Acquire SRCU in fastpath handler Sean Christopherson
2023-07-21 22:43 ` [PATCH 1/2] KVM: x86: Acquire SRCU read lock when handling fastpath MSR writes Sean Christopherson
2023-07-21 22:43 ` [PATCH 2/2] Revert "KVM: SVM: Skip WRMSR fastpath on VM-Exit if next RIP isn't valid" Sean Christopherson
2023-07-29 14:57 ` [PATCH 0/2] KVM: x86: Acquire SRCU in fastpath handler Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®