Skip to content

KVM: SVM: improve NMI window singlestep

Ladi Prosek kvm 2 versions – Applied

Status from this message: Queued, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 3 repliesApplied
  2. v14 patches 18 repliesSuperseded

Changes in v2 from the cover letter

* simplified patch 4 to call smp_send_reschedule instead of intercepting iret (Paolo)

* added patch 5 to suppress singlestep on GIF=0 and nested exit (Paolo)

* dropped most of the cover letter blurb because we now singlestep only over iret, as originally intended (Radim)

* still left nmi_singlestep_guest_rflags and the defensive code accessing it in -- it shouldn't be needed if we really singlestep only over iret but it is more robust this way (Radim)

* ran eventinj.flat, found no regression (baseline appears to be broken on nested, I'll look into it separately) (Paolo)

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/5KVM: SVM: introduce disable_nmi_singlestep helperarch/x86/kvm/svm.c+9 -40 replies
2/5KVM: nSVM: do not forward NMI window singlestep VM exits to L1arch/x86/kvm/svm.c+40 -50 replies
3/5KVM: SVM: hide TF/RF flags used by NMI singlesteparch/x86/kvm/svm.c+14 -10 replies
4/5KVM: SVM: don't NMI singlestep over event injectionarch/x86/kvm/svm.c+16 -00 replies
5/5KVM: SVM: suppress unnecessary NMI singlestep on GIF=0 and nested exitarch/x86/kvm/svm.c+6 -00 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 0/5] KVM: SVM: improve NMI window singlestep

On AMD hardware, Hyper-V doesn't work nested on KVM if L1 is started with more than one vCPU. The problem is in NMI which is heavily used by Windows on SMP systems.

This series fixes a couple of related issues with the current NMI singlestep logic and makes Windows with Hyper-V happy.

v1->v2:

* simplified patch 4 to call smp_send_reschedule instead of intercepting iret (Paolo)

* added patch 5 to suppress singlestep on GIF=0 and nested exit (Paolo)

* dropped most of the cover letter blurb because we now singlestep only over iret, as originally intended (Radim)

* still left nmi_singlestep_guest_rflags and the defensive code accessing it in -- it shouldn't be needed if we really singlestep only over iret but it is more robust this way (Radim)

* ran eventinj.flat, found no regression (baseline appears to be broken on nested, I'll look into it separately) (Paolo)

Ladi Prosek (5):
KVM: SVM: introduce disable_nmi_singlestep helper
KVM: nSVM: do not forward NMI window singlestep VM exits to L1
KVM: SVM: hide TF/RF flags used by NMI singlestep
KVM: SVM: don't NMI singlestep over event injection
KVM: SVM: suppress unnecessary NMI singlestep on GIF=0 and nested exit