diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2020-05-13 13:36:32 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-06-01 04:26:05 -0400 |
commit | cc440cdad5b7a4c1de12dace725209eb3e0cf663 (patch) | |
tree | 9e87ebc3ac64411bad0c87ec1e5b8b2a07d0e8e5 /arch/x86/kvm/x86.c | |
parent | 8ec107c89b19bc37a7ec364f3e1c92ae4d961b78 (diff) | |
download | linux-stable-cc440cdad5b7a4c1de12dace725209eb3e0cf663.tar.gz linux-stable-cc440cdad5b7a4c1de12dace725209eb3e0cf663.tar.bz2 linux-stable-cc440cdad5b7a4c1de12dace725209eb3e0cf663.zip |
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>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r-- | arch/x86/kvm/x86.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index f0fa610bed91..d4aa7dc662d5 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -4628,7 +4628,8 @@ long kvm_arch_vcpu_ioctl(struct file *filp, if (kvm_state.flags & ~(KVM_STATE_NESTED_RUN_PENDING | KVM_STATE_NESTED_GUEST_MODE - | KVM_STATE_NESTED_EVMCS | KVM_STATE_NESTED_MTF_PENDING)) + | KVM_STATE_NESTED_EVMCS | KVM_STATE_NESTED_MTF_PENDING + | KVM_STATE_NESTED_GIF_SET)) break; /* nested_run_pending implies guest_mode. */ |