Skip to content

KVM: SVM: GIF and EFER.SVME are independent

Yosry Ahmed kvm lkml 1 version Applied

Status from this message: Applied to kvm-x86 svm, with my suggested fixup and the order of 1 and 2

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest4 patches 4 repliesApplied

Changes in v3 from the cover letter

- Keep setting GIF when force-leaving nested (Sean).
- Moved the relevant selftests patches from the series at [2] here (Sean).

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/4KVM: SVM: Allow KVM_SET_NESTED_STATE to clear GIF when SVME==0arch/x86/kvm/svm/nested.c+2 -23 replies
2/4KVM: SVM: Don't set GIF when clearing EFER.SVMEarch/x86/kvm/svm/nested.c arch/x86/kvm/svm/svm.c+2 -10 replies
3/4KVM: selftests: Use TEST_ASSERT_EQ() in test_vmx_nested_state()tools/testing/selftests/kvm/x86/vmx_set_nested_state_test.c+4 -20 replies
4/4KVM: selftests: Extend vmx_set_nested_state_test to cover SVMtools/testing/selftests/kvm/Makefile.kvm tools/testing/selftests/kvm/x86/nested_set_state_test.c+112 -120 replies

Reviews trailers per patch

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

PatchYosry Ahmed
1/4R-b
2/4
3/4
4/4

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

Read the v3 thread

Cover letter [PATCH v3 0/4] KVM: SVM: GIF and EFER.SVME are independent

Clearing EFER.SVME is not architected to set GIF, so GIF may be clear even when EFER.SVME is clear.

This is covered in the discussion at [1].

v2 -> v3:
- Keep setting GIF when force-leaving nested (Sean).
- Moved the relevant selftests patches from the series at [2] here (Sean).

v2: https://lore.kernel.org/kvm/[email protected]/

[1]https://lore.kernel.org/all/[email protected]/ [2]https://lore.kernel.org/kvm/[email protected]/

Jim Mattson (2):
KVM: SVM: Allow KVM_SET_NESTED_STATE to clear GIF when SVME==0
KVM: SVM: Don't set GIF when clearing EFER.SVME

Yosry Ahmed (2):
KVM: selftests: Use TEST_ASSERT_EQ() in test_vmx_nested_state()
KVM: selftests: Extend vmx_set_nested_state_test to cover SVM

 arch/x86/kvm/svm/nested.c                     |   6 +-
 arch/x86/kvm/svm/svm.c                        |   1 -
 tools/testing/selftests/kvm/Makefile.kvm      |   2 +-
 ...d_state_test.c => nested_set_state_test.c} | 128 ++++++++++++++++--
 4 files changed, 120 insertions(+), 17 deletions(-)
 rename tools/testing/selftests/kvm/x86/{vmx_set_nested_state_test.c => nested_set_state_test.c} (70%)

base-commit: 115d5de2eef32ac5cd488404b44b38789362dbe6

Signature · 1 line
2.52.0.rc2.455.g230fcf2819-goog