public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH V2 00/10] Improve test parity between SVM and VMX
@ 2026-01-13  0:31 Kevin Cheng
  2026-01-13  0:31 ` [kvm-unit-tests PATCH V2 01/10] x86/svm: Fix virq_inject SVM test failure Kevin Cheng
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: Kevin Cheng @ 2026-01-13  0:31 UTC (permalink / raw)
  To: kvm; +Cc: yosryahmed, andrew.jones, thuth, pbonzini, seanjc, Kevin Cheng

This series introduces numerous tests for features that VMX testing
covers but current SVM testing lacks.

I went through all VMX tests and identified which ones could have an
equivalent test written for SVM.

This series also includes some canonicalization and consistency check
tests as defined by the APM.

v1 -> v2:
  - Renamed check_npt_ad_pte() to found_bad_npt_ad().
  - Renamed test_event_injection() to svm_event_injection() and removed
    the test from the svm suite to run separately.
  - For the svm_event_injection test, injecting the CP vector now relies
    on shadow stack capabilities as suggested by Yosry.
  - Added a new test for verifying that certain instructions generate a
    #UD when EFER.SVME=0. This is a regression test in response to a fix
    that is currently under review [1]

[1] https://lore.kernel.org/all/20260112174535.3132800-5-chengkev@google.com/

v1: https://lore.kernel.org/all/20251219225908.334766-1-chengkev@google.com/

Kevin Cheng (10):
  x86/svm: Fix virq_inject SVM test failure
  x86/nSVM: Add test for NPT A/D bits
  x86/svm: Add tests for APIC passthrough
  x86/nSVM: Add tests for instruction interrupts
  x86/svm: Add tests for PF exception testing
  x86/svm: Extend NPT test coverage for different page table levels
  x86/svm: Add NPT ignored bits test
  x86/svm: Add testing for NPT permissions on guest page tables
  x86/svm: Add event injection check tests
  x86/svm: Add test for #UD when EFER.SVME=0

 lib/x86/processor.h |  11 +
 lib/x86/vm.c        |   2 +-
 lib/x86/vm.h        |   2 +
 x86/Makefile.common |   2 +
 x86/access.c        |   7 -
 x86/access.h        |  11 +
 x86/svm.c           |  16 +-
 x86/svm.h           |   9 +
 x86/svm_npt.c       | 801 ++++++++++++++++++++++++++++++++++++++++----
 x86/svm_tests.c     | 702 ++++++++++++++++++++++++++++++++++----
 x86/unittests.cfg   |  62 +++-
 x86/vmx_tests.c     |   5 -
 12 files changed, 1486 insertions(+), 144 deletions(-)

--
2.52.0.457.g6b5491de43-goog


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

end of thread, other threads:[~2026-02-18 20:44 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-13  0:31 [kvm-unit-tests PATCH V2 00/10] Improve test parity between SVM and VMX Kevin Cheng
2026-01-13  0:31 ` [kvm-unit-tests PATCH V2 01/10] x86/svm: Fix virq_inject SVM test failure Kevin Cheng
2026-01-13  0:31 ` [kvm-unit-tests PATCH V2 02/10] x86/nSVM: Add test for NPT A/D bits Kevin Cheng
2026-01-13  0:31 ` [kvm-unit-tests PATCH V2 03/10] x86/svm: Add tests for APIC passthrough Kevin Cheng
2026-01-13  0:31 ` [kvm-unit-tests PATCH V2 04/10] x86/nSVM: Add tests for instruction interrupts Kevin Cheng
2026-01-13  0:31 ` [kvm-unit-tests PATCH V2 05/10] x86/svm: Add tests for PF exception testing Kevin Cheng
2026-01-13  0:31 ` [kvm-unit-tests PATCH V2 06/10] x86/svm: Extend NPT test coverage for different page table levels Kevin Cheng
2026-01-13  0:31 ` [kvm-unit-tests PATCH V2 07/10] x86/svm: Add NPT ignored bits test Kevin Cheng
2026-01-13  0:31 ` [kvm-unit-tests PATCH V2 08/10] x86/svm: Add testing for NPT permissions on guest page tables Kevin Cheng
2026-01-13  0:31 ` [kvm-unit-tests PATCH V2 09/10] x86/svm: Add event injection check tests Kevin Cheng
2026-01-13  0:31 ` [kvm-unit-tests PATCH V2 10/10] x86/svm: Add test for #UD when EFER.SVME=0 Kevin Cheng
2026-02-18 20:44   ` Sean Christopherson

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