diff options
author | Maxim Levitsky <mlevitsk@redhat.com> | 2021-05-04 17:39:35 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-05-07 13:06:14 +0300 |
commit | 063ab16c14db5a2ef52d54d0475b7fed19c982d7 (patch) | |
tree | e58a20f7203062939fe3f056d53cec1a5a6eacdc /arch/x86 | |
parent | aca352886ebdd675b5131ed4c83bf5477eee5d72 (diff) | |
download | linux-063ab16c14db5a2ef52d54d0475b7fed19c982d7.tar.xz |
KVM: nSVM: always restore the L1's GIF on migration
While usually the L1's GIF is set while L2 runs, and usually
migration nested state is loaded after a vCPU reset which
also sets L1's GIF to true, this is not guaranteed.
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20210504143936.1644378-2-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kvm/svm/nested.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm/nested.c b/arch/x86/kvm/svm/nested.c index 32400cba608d..b331446f67f3 100644 --- a/arch/x86/kvm/svm/nested.c +++ b/arch/x86/kvm/svm/nested.c @@ -1314,6 +1314,8 @@ static int svm_set_nested_state(struct kvm_vcpu *vcpu, else svm->nested.vmcb02.ptr->save = svm->vmcb01.ptr->save; + svm_set_gif(svm, !!(kvm_state->flags & KVM_STATE_NESTED_GIF_SET)); + svm->nested.nested_run_pending = !!(kvm_state->flags & KVM_STATE_NESTED_RUN_PENDING); |