]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: KVM: Test KVM_X86_QUIRK_FIX_HYPERCALL_INSN
authorOliver Upton <oupton@google.com>
Wed, 16 Mar 2022 00:55:38 +0000 (00:55 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 2 Apr 2022 09:41:10 +0000 (05:41 -0400)
commit6d575f9edc2899a1381ab6d3f1beef103ec02654
tree56244d92d841351eb8959de384e5772151116fe1
parent60b0431a96f556c3a7b170d162ff5a80f5597544
selftests: KVM: Test KVM_X86_QUIRK_FIX_HYPERCALL_INSN

Add a test that asserts KVM rewrites guest hypercall instructions to
match the running architecture (VMCALL on VMX, VMMCALL on SVM).
Additionally, test that with the quirk disabled, KVM no longer rewrites
guest instructions and instead injects a #UD.

Signed-off-by: Oliver Upton <oupton@google.com>
Message-Id: <20220316005538.2282772-3-oupton@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/.gitignore
tools/testing/selftests/kvm/Makefile
tools/testing/selftests/kvm/x86_64/fix_hypercall_test.c [new file with mode: 0644]