Skip to content

KVM: fix issues with stale control fields

Paolo Bonzini kvm lkml stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11KVM: SVM: Preserve TLB control (i.e. pending TLB flush) on failed VMRUNarch/x86/kvm/svm/svm.c arch/x86/kvm/svm/svm.h+11 -30 replies
2/11KVM: SVM: Update control fields on #VMEXIT if and only if VMRUN succeededarch/x86/kvm/svm/svm.c+9 -90 replies
3/11KVM: SVM: Don't mark ASID fields as dirty when setting control.tlb_ctlarch/x86/kvm/svm/sev.c arch/x86/kvm/svm/svm.c+1 -40 replies
4/11KVM: SVM: Sync guest's PERF_CNTR_GLOBAL_CTL from h/w only on successful VMRUNarch/x86/kvm/svm/svm.c+4 -30 replies
5/11KVM: SVM: Use the active VMCB's MSR bitmap when checking if MSR is interceptedarch/x86/kvm/svm/svm.c+1 -100 replies
6/11KVM: nVMX: Force MSR bitmap refresh if runtime eVMCS controls are modifiedarch/x86/kvm/vmx/nested.c+6 -00 replies
7/11KVM: selftests: Add x2APIC MSR test for inhibiting APICv while nestedtools/testing/selftests/kvm/Makefile.kvm tools/testing/selftests/kvm/x86/nested_x2apic_test.c+118 -00 replies
8/11KVM: selftests: Run the nested x2APIC with and without APICv being inhibited in L2tools/testing/selftests/kvm/x86/nested_x2apic_test.c+21 -40 replies
9/11KVM: selftests: Verify that L0's TPR doesn't get clobberedtools/testing/selftests/kvm/x86/nested_x2apic_test.c+16 -00 replies
10/11KVM: selftests: Extend nested x2APIC test to validate disabling x2APIC virttools/testing/selftests/kvm/x86/nested_x2apic_test.c+64 -100 replies
11/11KVM: selftests: Extend nested x2APIC test to validate using eVMCS for vmcs12tools/testing/selftests/kvm/x86/nested_x2apic_test.c+42 -110 replies

Reviews trailers per patch

1 of 11 patches has a Reviewed-by or Acked-by.

PatchVitaly Kuznetsov
1/11
2/11
3/11
4/11
5/11
6/11R-b
7/11
8/11
9/11
10/11
11/11

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/11] KVM: fix issues with stale control fields

Fix two bugs where the guest could do stupid things on purpose to cause problems in the host.

Patches 1-5 cover cases where actions done through VMCB control fields have to be redone if VMRUN fails. In particular, failed VMRUNs can cause pending TLB flushes to be dropped.

Patch 6 fixes a case where eVMCS execution controls can cause the host to use a stale MSR permission bitmap. Patches 7-11 are tests for nested x2APIC; don't run them on an unpatched kernel.

Paolo

Sean Christopherson (11):
KVM: SVM: Preserve TLB control (i.e. pending TLB flush) on failed
VMRUN
KVM: SVM: Update control fields on #VMEXIT if and only if VMRUN
succeeded
KVM: SVM: Don't mark ASID fields as dirty when setting control.tlb_ctl
KVM: SVM: Sync guest's PERF_CNTR_GLOBAL_CTL from h/w only on
successful VMRUN
KVM: SVM: Use the active VMCB's MSR bitmap when checking if MSR is
intercepted
KVM: nVMX: Force MSR bitmap refresh if runtime eVMCS controls are
modified
KVM: selftests: Add x2APIC MSR test for inhibiting APICv while nested
KVM: selftests: Run the nested x2APIC with and without APICv being
inhibited in L2
KVM: selftests: Verify that L0's TPR doesn't get clobbered
KVM: selftests: Extend nested x2APIC test to validate disabling x2APIC
virt
KVM: selftests: Extend nested x2APIC test to validate using eVMCS for

    vmcs12
 arch/x86/kvm/svm/sev.c                        |   1 -
 arch/x86/kvm/svm/svm.c                        |  43 ++--
 arch/x86/kvm/svm/svm.h                        |   1 +
 arch/x86/kvm/vmx/nested.c                     |   6 +
 tools/testing/selftests/kvm/Makefile.kvm      |   1 +
 .../selftests/kvm/x86/nested_x2apic_test.c    | 235 ++++++++++++++++++
 6 files changed, 263 insertions(+), 24 deletions(-)
 create mode 100644 tools/testing/selftests/kvm/x86/nested_x2apic_test.c
Signature · 1 line
2.52.0