KVM: nSVM: implement KVM_GET_NESTED_STATE and KVM_SET_NESTED_STATE
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 13 May 2020 17:36:32 +0000 (13:36 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 1 Jun 2020 08:26:05 +0000 (04:26 -0400)
commitcc440cdad5b7a4c1de12dace725209eb3e0cf663
tree9e87ebc3ac64411bad0c87ec1e5b8b2a07d0e8e5
parent8ec107c89b19bc37a7ec364f3e1c92ae4d961b78
KVM: nSVM: implement KVM_GET_NESTED_STATE and KVM_SET_NESTED_STATE

Similar to VMX, the state that is captured through the currently available
IOCTLs is a mix of L1 and L2 state, dependent on whether the L2 guest was
running at the moment when the process was interrupted to save its state.

In particular, the SVM-specific state for nested virtualization includes
the L1 saved state (including the interrupt flag), the cached L2 controls,
and the GIF.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/uapi/asm/kvm.h
arch/x86/kvm/cpuid.h
arch/x86/kvm/svm/nested.c
arch/x86/kvm/svm/svm.c
arch/x86/kvm/vmx/nested.c
arch/x86/kvm/x86.c