All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/4] selftests: KVM: AMD Nested SVM test infrastructure
@ 2020-02-07 14:27 Eric Auger
  2020-02-07 14:27 ` [PATCH v5 1/4] selftests: KVM: Replace get_[gdt | idt]_base() by get_[gdt | idt]() Eric Auger
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Eric Auger @ 2020-02-07 14:27 UTC (permalink / raw)
  To: eric.auger.pro, eric.auger, linux-kernel, kvm, pbonzini, vkuznets
  Cc: thuth, drjones, wei.huang2, krish.sadhukhan

Add the basic infrastructure needed to test AMD nested SVM.
Also add a first basic vmcall test.

Best regards

Eric

This series can be found at:
https://github.com/eauger/linux/tree/v5.5-amd-svm-v5

History:
v4 -> v5:
- Added "selftests: KVM: Remove unused x86_register enum"
- reorder GPRs within gpr64_regs
- removed vmcb_hva and save_area_hva from svm_test_data
- remove the naming for vmcb_gpa in run_guest

v3 -> v4:
- gpr64_regs struct just contains 64b mode GPRs ordered
  as in x86_register
- cleanup in run_guest (vm* instructions) and reduce
  clubber list.
- add some comments

v2 -> v3:
- Took into account Vitaly's comment:
  - added "selftests: KVM: Replace get_gdt/idt_base() by
    get_gdt/idt()"
  - svm.h now is a copy of arch/x86/include/asm/svm.h
  - avoid duplicates

v1 -> v2:
- split into 2 patches
- remove the infrastructure to run low-level sub-tests and only
  keep vmmcall's one.
- move struct regs into processor.h
- force vmcb_gpa into rax in run_guest()

Eric Auger (4):
  selftests: KVM: Replace get_[gdt | idt]_base() by get_[gdt | idt]()
  selftests: KVM: Remove unused x86_register enum
  selftests: KVM: AMD Nested test infrastructure
  selftests: KVM: SVM: Add vmcall test

 tools/testing/selftests/kvm/Makefile          |   3 +-
 .../selftests/kvm/include/x86_64/processor.h  |  44 +--
 .../selftests/kvm/include/x86_64/svm.h        | 297 ++++++++++++++++++
 .../selftests/kvm/include/x86_64/svm_util.h   |  36 +++
 tools/testing/selftests/kvm/lib/x86_64/svm.c  | 159 ++++++++++
 tools/testing/selftests/kvm/lib/x86_64/vmx.c  |   6 +-
 .../selftests/kvm/x86_64/svm_vmcall_test.c    |  79 +++++
 7 files changed, 598 insertions(+), 26 deletions(-)
 create mode 100644 tools/testing/selftests/kvm/include/x86_64/svm.h
 create mode 100644 tools/testing/selftests/kvm/include/x86_64/svm_util.h
 create mode 100644 tools/testing/selftests/kvm/lib/x86_64/svm.c
 create mode 100644 tools/testing/selftests/kvm/x86_64/svm_vmcall_test.c

-- 
2.20.1


^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: [PATCH v5 2/4] selftests: KVM: Remove unused x86_register enum
@ 2020-02-07 15:37 linmiaohe
  0 siblings, 0 replies; 13+ messages in thread
From: linmiaohe @ 2020-02-07 15:37 UTC (permalink / raw)
  To: Eric Auger
  Cc: thuth, drjones, wei.huang2, krish.sadhukhan, eric.auger.pro,
	linux-kernel, kvm, pbonzini, vkuznets

Eric Auger <eric.auger@redhat.com> writes:
>x86_register enum is not used. Its presence incites us to enumerate GPRs in the same order in other looming structs. So let's remove it.
>
>Signed-off-by: Eric Auger <eric.auger@redhat.com>
>Suggested-by: Vitaly Kuznetsov <vkuznets@redhat.com>

Make sense for me. Thanks.

Reviewed-by: Miaohe Lin <linmiaohe@huawei.com>


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

end of thread, other threads:[~2020-02-12 12:25 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-07 14:27 [PATCH v5 0/4] selftests: KVM: AMD Nested SVM test infrastructure Eric Auger
2020-02-07 14:27 ` [PATCH v5 1/4] selftests: KVM: Replace get_[gdt | idt]_base() by get_[gdt | idt]() Eric Auger
2020-02-07 14:27 ` [PATCH v5 2/4] selftests: KVM: Remove unused x86_register enum Eric Auger
2020-02-07 15:07   ` Vitaly Kuznetsov
2020-02-08  1:07   ` Krish Sadhukhan
2020-02-07 14:27 ` [PATCH v5 3/4] selftests: KVM: AMD Nested test infrastructure Eric Auger
2020-02-07 15:09   ` Vitaly Kuznetsov
2020-02-08  1:15   ` Krish Sadhukhan
2020-02-07 14:27 ` [PATCH v5 4/4] selftests: KVM: SVM: Add vmcall test Eric Auger
2020-02-08  1:08   ` Krish Sadhukhan
2020-02-12 12:09 ` [PATCH v5 0/4] selftests: KVM: AMD Nested SVM test infrastructure Paolo Bonzini
2020-02-12 12:25   ` Auger Eric
2020-02-07 15:37 [PATCH v5 2/4] selftests: KVM: Remove unused x86_register enum linmiaohe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.