Skip to content

KVM: selftests: evmcs_test: Check issues induced by late eVMCS mapping upon restore

Vitaly Kuznetsov kvm lkml 1 version Applied

Status from this message: Queued 1-2, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3KVM: selftests: evmcs_test: Check that VMLAUNCH with bogus EVMPTR is causing #UDtools/testing/selftests/kvm/x86_64/evmcs_test.c+16 -80 replies
2/3KVM: selftests: evmcs_test: Check that VMCS12 is alway properly synced to eVMCS after restoretools/testing/selftests/kvm/x86_64/evmcs_test.c+55 -110 replies
3/3KVM: selftests: evmcs_test: Test that KVM_STATE_NESTED_EVMCS is never losttools/testing/selftests/kvm/x86_64/evmcs_test.c+38 -240 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] KVM: selftests: evmcs_test: Check issues induced by late eVMCS mapping upon restore

A regression was introduced by commit f2c7ef3ba955
("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. Add a test for the condition (PATCH2). PATCH1 is a preparatory change, PATCH3 adds a test for a situation when KVM_GET_NESTED_STATE is requested right after KVM_SET_NESTED_STATE, this is still broken in KVM (so the patch is not to be committed).

Vitaly Kuznetsov (3):
KVM: selftests: evmcs_test: Check that VMLAUNCH with bogus EVMPTR is
causing #UD
KVM: selftests: evmcs_test: Check that VMCS12 is alway properly synced
to eVMCS after restore
KVM: selftests: evmcs_test: Test that KVM_STATE_NESTED_EVMCS is never
lost

 .../testing/selftests/kvm/x86_64/evmcs_test.c | 150 +++++++++++++-----
 1 file changed, 108 insertions(+), 42 deletions(-)
Signature · 1 line
2.30.2