]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: selftests: evmcs_test: Check that VMCS12 is alway properly synced to eVMCS after...
authorVitaly Kuznetsov <vkuznets@redhat.com>
Wed, 5 May 2021 15:18:22 +0000 (17:18 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 7 May 2021 10:06:12 +0000 (06:06 -0400)
commit1751961adab1211236348f13b501093c495095e6
tree26410b087af837d837e69bfee73d97d7d90babc0
parent82b5ba8c878eb5c934ca29cac4d03b8483978910
KVM: selftests: evmcs_test: Check that VMCS12 is alway properly synced to eVMCS after restore

Add a test for the regression, introduced by commit 9c7d76487ee0
("KVM: nSVM: cancel KVM_REQ_GET_NESTED_STATE_PAGES on nested vmexit"). When
L2->L1 exit is forced immediately after restoring nested state,
KVM_REQ_GET_NESTED_STATE_PAGES request is cleared and VMCS12 changes
(e.g. fresh RIP) are not reflected to eVMCS. The consequent nested
vCPU run gets broken.

Utilize NMI injection to do the job.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20210505151823.1341678-3-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/x86_64/evmcs_test.c