selftests: kvm: add a selftest for SMM
Add a simple test for SMM, based on VMX. The test implements its own sync between the guest and the host as using our ucall library seems to be too cumbersome: SMI handler is happening in real-address mode. This patch also fixes KVM_SET_NESTED_STATE to happen after KVM_SET_VCPU_EVENTS, in fact it places it last. This is because KVM needs to know whether the processor is in SMM or not. Signed-off-by:Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
Showing
- tools/testing/selftests/kvm/Makefile 1 addition, 0 deletionstools/testing/selftests/kvm/Makefile
- tools/testing/selftests/kvm/include/x86_64/processor.h 27 additions, 0 deletionstools/testing/selftests/kvm/include/x86_64/processor.h
- tools/testing/selftests/kvm/lib/x86_64/processor.c 6 additions, 6 deletionstools/testing/selftests/kvm/lib/x86_64/processor.c
- tools/testing/selftests/kvm/x86_64/smm_test.c 157 additions, 0 deletionstools/testing/selftests/kvm/x86_64/smm_test.c
Loading
Please register or sign in to comment