Skip to content

KVM: x86: Acquire SRCU in fastpath handler

Sean Christopherson kvm lkml 1 version Applied

Status from this message: Queued, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2KVM: x86: Acquire SRCU read lock when handling fastpath MSR writesarch/x86/kvm/x86.c+4 -00 replies
2/2Revert "KVM: SVM: Skip WRMSR fastpath on VM-Exit if next RIP isn't valid"arch/x86/kvm/svm/svm.c+2 -80 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] KVM: x86: Acquire SRCU in fastpath handler

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

Signature · 1 line
2.41.0.487.g6d72f3e995-goog