kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH v3 00/27] kvm-unit-tests: set of fixes and new tests
@ 2022-11-22 16:11 Maxim Levitsky
  2022-11-22 16:11 ` [kvm-unit-tests PATCH v3 01/27] x86: replace irq_{enable|disable}() with sti()/cli() Maxim Levitsky
                   ` (27 more replies)
  0 siblings, 28 replies; 56+ messages in thread
From: Maxim Levitsky @ 2022-11-22 16:11 UTC (permalink / raw)
  To: kvm
  Cc: Andrew Jones, Alexandru Elisei, Maxim Levitsky, Paolo Bonzini,
	Claudio Imbrenda, Thomas Huth, Alex Bennée, Nico Boehr,
	Cathy Avery, Janosch Frank

This is set of fixes and new unit tests that I developed for the
KVM unit tests.

I also did some work to separate the SVM code into a minimal
support library so that you could use it from an arbitrary test.

V2:

  - addressed review feedback, and futher cleaned up the svm tests
    set to use less global variables
    (the patches are large, but each changes one thing all over the tests, so hopefully not hard to review).

Best regards,
    Maxim Levitsky

Maxim Levitsky (27):
  x86: replace irq_{enable|disable}() with sti()/cli()
  x86: introduce sti_nop() and sti_nop_cli()
  x86: add few helper functions for apic local timer
  svm: remove nop after stgi/clgi
  svm: make svm_intr_intercept_mix_if/gif test a bit more robust
  svm: use apic_start_timer/apic_stop_timer instead of open coding it
  x86: Add test for #SMI during interrupt window
  x86: Add a simple test for SYSENTER instruction.
  svm: add simple nested shutdown test.
  SVM: add two tests for exitintinto on exception
  lib: Add random number generator
  x86: add IPI stress test
  svm: remove get_npt_pte extern
  svm: move svm spec definitions to lib/x86/svm.h
  svm: move some svm support functions into lib/x86/svm_lib.h
  svm: move setup_svm() to svm_lib.c
  svm: correctly skip if NPT not supported
  svm: move vmcb_ident to svm_lib.c
  svm: rewerite vm entry macros
  svm: move v2 tests run into test_run
  svm: cleanup the default_prepare
  svm: introduce svm_vcpu
  svm: introduce struct svm_test_context
  svm: use svm_test_context in v2 tests
  svm: move nested vcpu to test context
  svm: move test_guest_func to test context
  x86: ipi_stress: add optional SVM support

 Makefile                  |    3 +-
 README.md                 |    1 +
 lib/prng.c                |   41 ++
 lib/prng.h                |   23 +
 lib/x86/apic.c            |   38 ++
 lib/x86/apic.h            |    6 +
 lib/x86/processor.h       |   39 +-
 lib/x86/random.c          |   33 +
 lib/x86/random.h          |   17 +
 lib/x86/smp.c             |    2 +-
 lib/x86/svm.h             |  367 +++++++++++
 lib/x86/svm_lib.c         |  179 ++++++
 lib/x86/svm_lib.h         |  151 +++++
 scripts/arch-run.bash     |    2 +-
 x86/Makefile.common       |    5 +-
 x86/Makefile.x86_64       |    5 +
 x86/apic.c                |    6 +-
 x86/asyncpf.c             |    6 +-
 x86/eventinj.c            |   22 +-
 x86/hyperv_connections.c  |    2 +-
 x86/hyperv_stimer.c       |    4 +-
 x86/hyperv_synic.c        |    6 +-
 x86/intel-iommu.c         |    2 +-
 x86/ioapic.c              |   15 +-
 x86/ipi_stress.c          |  244 +++++++
 x86/pmu.c                 |    4 +-
 x86/smm_int_window.c      |  118 ++++
 x86/svm.c                 |  341 ++--------
 x86/svm.h                 |  495 +-------------
 x86/svm_npt.c             |   81 ++-
 x86/svm_tests.c           | 1278 ++++++++++++++++++++++---------------
 x86/sysenter.c            |  203 ++++++
 x86/taskswitch2.c         |    4 +-
 x86/tscdeadline_latency.c |    4 +-
 x86/unittests.cfg         |   20 +
 x86/vmexit.c              |   18 +-
 x86/vmx_tests.c           |   47 +-
 37 files changed, 2454 insertions(+), 1378 deletions(-)
 create mode 100644 lib/prng.c
 create mode 100644 lib/prng.h
 create mode 100644 lib/x86/random.c
 create mode 100644 lib/x86/random.h
 create mode 100644 lib/x86/svm.h
 create mode 100644 lib/x86/svm_lib.c
 create mode 100644 lib/x86/svm_lib.h
 create mode 100644 x86/ipi_stress.c
 create mode 100644 x86/smm_int_window.c
 create mode 100644 x86/sysenter.c

-- 
2.34.3



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

end of thread, other threads:[~2023-06-07 23:27 UTC | newest]

Thread overview: 56+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-22 16:11 [kvm-unit-tests PATCH v3 00/27] kvm-unit-tests: set of fixes and new tests Maxim Levitsky
2022-11-22 16:11 ` [kvm-unit-tests PATCH v3 01/27] x86: replace irq_{enable|disable}() with sti()/cli() Maxim Levitsky
2022-12-01 13:46   ` Emanuele Giuseppe Esposito
2022-12-06 13:55     ` Maxim Levitsky
2022-12-06 14:15       ` Emanuele Giuseppe Esposito
2022-11-22 16:11 ` [kvm-unit-tests PATCH v3 02/27] x86: introduce sti_nop() and sti_nop_cli() Maxim Levitsky
2022-12-01 13:46   ` Emanuele Giuseppe Esposito
2022-11-22 16:11 ` [kvm-unit-tests PATCH v3 03/27] x86: add few helper functions for apic local timer Maxim Levitsky
2022-11-22 16:11 ` [kvm-unit-tests PATCH v3 04/27] svm: remove nop after stgi/clgi Maxim Levitsky
2022-11-22 16:11 ` [kvm-unit-tests PATCH v3 05/27] svm: make svm_intr_intercept_mix_if/gif test a bit more robust Maxim Levitsky
2022-11-22 16:11 ` [kvm-unit-tests PATCH v3 06/27] svm: use apic_start_timer/apic_stop_timer instead of open coding it Maxim Levitsky
2022-11-22 16:11 ` [kvm-unit-tests PATCH v3 07/27] x86: Add test for #SMI during interrupt window Maxim Levitsky
2022-11-22 16:11 ` [kvm-unit-tests PATCH v3 08/27] x86: Add a simple test for SYSENTER instruction Maxim Levitsky
2022-11-22 16:11 ` [kvm-unit-tests PATCH v3 09/27] svm: add simple nested shutdown test Maxim Levitsky
2022-12-01 13:46   ` Emanuele Giuseppe Esposito
2022-12-06 13:56     ` Maxim Levitsky
2022-11-22 16:11 ` [kvm-unit-tests PATCH v3 10/27] SVM: add two tests for exitintinto on exception Maxim Levitsky
2022-11-22 16:11 ` [kvm-unit-tests PATCH v3 11/27] lib: Add random number generator Maxim Levitsky
2022-11-23  9:28   ` Claudio Imbrenda
2022-11-23 12:54     ` Andrew Jones
2022-12-06 13:57       ` Maxim Levitsky
2022-12-06 14:07     ` Maxim Levitsky
2022-12-14 10:33       ` Claudio Imbrenda
2022-11-22 16:11 ` [kvm-unit-tests PATCH v3 12/27] x86: add IPI stress test Maxim Levitsky
2022-11-22 16:11 ` [kvm-unit-tests PATCH v3 13/27] svm: remove get_npt_pte extern Maxim Levitsky
2022-12-01 13:46   ` Emanuele Giuseppe Esposito
2022-11-22 16:11 ` [kvm-unit-tests PATCH v3 14/27] svm: move svm spec definitions to lib/x86/svm.h Maxim Levitsky
2022-12-01 13:54   ` Emanuele Giuseppe Esposito
2022-11-22 16:11 ` [kvm-unit-tests PATCH v3 15/27] svm: move some svm support functions into lib/x86/svm_lib.h Maxim Levitsky
2022-12-01 13:59   ` Emanuele Giuseppe Esposito
2022-12-06 14:10     ` Maxim Levitsky
2022-11-22 16:11 ` [kvm-unit-tests PATCH v3 16/27] svm: move setup_svm() to svm_lib.c Maxim Levitsky
2022-12-01 16:14   ` Emanuele Giuseppe Esposito
2022-11-22 16:11 ` [kvm-unit-tests PATCH v3 17/27] svm: correctly skip if NPT not supported Maxim Levitsky
2022-11-22 16:11 ` [kvm-unit-tests PATCH v3 18/27] svm: move vmcb_ident to svm_lib.c Maxim Levitsky
2022-12-01 16:18   ` Emanuele Giuseppe Esposito
2022-12-06 14:11     ` Maxim Levitsky
2022-11-22 16:11 ` [kvm-unit-tests PATCH v3 19/27] svm: rewerite vm entry macros Maxim Levitsky
2022-12-02 10:14   ` Emanuele Giuseppe Esposito
2022-12-06 13:56     ` Maxim Levitsky
2022-11-22 16:11 ` [kvm-unit-tests PATCH v3 20/27] svm: move v2 tests run into test_run Maxim Levitsky
2022-12-02  9:53   ` Emanuele Giuseppe Esposito
2022-11-22 16:11 ` [kvm-unit-tests PATCH v3 21/27] svm: cleanup the default_prepare Maxim Levitsky
2022-12-02  9:45   ` Emanuele Giuseppe Esposito
2022-12-06 13:56     ` Maxim Levitsky
2022-11-22 16:11 ` [kvm-unit-tests PATCH v3 22/27] svm: introduce svm_vcpu Maxim Levitsky
2022-11-22 16:11 ` [kvm-unit-tests PATCH v3 23/27] svm: introduce struct svm_test_context Maxim Levitsky
2022-11-22 16:11 ` [kvm-unit-tests PATCH v3 24/27] svm: use svm_test_context in v2 tests Maxim Levitsky
2022-12-02 10:27   ` Emanuele Giuseppe Esposito
2022-11-22 16:11 ` [kvm-unit-tests PATCH v3 25/27] svm: move nested vcpu to test context Maxim Levitsky
2022-12-02 10:22   ` Emanuele Giuseppe Esposito
2022-12-06 14:29     ` Maxim Levitsky
2022-11-22 16:11 ` [kvm-unit-tests PATCH v3 26/27] svm: move test_guest_func " Maxim Levitsky
2022-12-02 10:28   ` Emanuele Giuseppe Esposito
2022-11-22 16:11 ` [kvm-unit-tests PATCH v3 27/27] x86: ipi_stress: add optional SVM support Maxim Levitsky
2023-06-07 23:25 ` [kvm-unit-tests PATCH v3 00/27] kvm-unit-tests: set of fixes and new tests Sean Christopherson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).