diff options
author | 2021-06-28 12:44:24 +0200 | |
---|---|---|
committer | 2021-07-15 10:19:44 -0400 | |
commit | bb00bd9c0862558c6528e3ac97470aee222436ef (patch) | |
tree | 18897831ddea699c51d8b083af42af022622ef67 /arch/x86/kvm/svm/nested.c | |
parent | KVM: nSVM: Fix L1 state corruption upon return from SMM (diff) | |
download | wireguard-linux-bb00bd9c0862558c6528e3ac97470aee222436ef.tar.xz wireguard-linux-bb00bd9c0862558c6528e3ac97470aee222436ef.zip |
KVM: nSVM: Restore nested control upon leaving SMM
If the VM was migrated while in SMM, no nested state was saved/restored,
and therefore svm_leave_smm has to load both save and control area
of the vmcb12. Save area is already loaded from HSAVE area,
so now load the control area as well from the vmcb12.
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20210628104425.391276-6-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to '')
-rw-r--r-- | arch/x86/kvm/svm/nested.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/svm/nested.c b/arch/x86/kvm/svm/nested.c index c4296fb4b8be..3bd09c50c98b 100644 --- a/arch/x86/kvm/svm/nested.c +++ b/arch/x86/kvm/svm/nested.c @@ -308,8 +308,8 @@ static bool nested_vmcb_valid_sregs(struct kvm_vcpu *vcpu, return true; } -static void nested_load_control_from_vmcb12(struct vcpu_svm *svm, - struct vmcb_control_area *control) +void nested_load_control_from_vmcb12(struct vcpu_svm *svm, + struct vmcb_control_area *control) { copy_vmcb_control_area(&svm->nested.ctl, control); |