From: Paolo Bonzini Date: Tue, 22 Sep 2020 10:43:17 +0000 (-0400) Subject: Merge branch 'x86-seves-for-paolo' of https://git.kernel.org/pub/scm/linux/kernel... X-Git-Tag: v5.10-rc1~44^2~163 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bf3c0e5e7102f5787d693379d9d384b813fe890b;p=thirdparty%2Flinux.git Merge branch 'x86-seves-for-paolo' of https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into HEAD --- bf3c0e5e7102f5787d693379d9d384b813fe890b diff --cc arch/x86/kvm/svm/nested.c index e90bc436f5849,28036629abf8d..598a769f19617 --- a/arch/x86/kvm/svm/nested.c +++ b/arch/x86/kvm/svm/nested.c @@@ -1128,18 -1139,21 +1141,24 @@@ static int svm_set_nested_state(struct * contains saved L1 state. */ copy_vmcb_control_area(&hsave->control, &svm->vmcb->control); - hsave->save = save; + hsave->save = *save; svm->nested.vmcb = kvm_state->hdr.svm.vmcb_pa; - load_nested_vmcb_control(svm, &ctl); + load_nested_vmcb_control(svm, ctl); nested_prepare_vmcb_control(svm); + if (!nested_svm_vmrun_msrpm(svm)) + return -EINVAL; + out_set_gif: svm_set_gif(svm, !!(kvm_state->flags & KVM_STATE_NESTED_GIF_SET)); - return 0; + + ret = 0; + out_free: + kfree(save); + kfree(ctl); + + return ret; } struct kvm_x86_nested_ops svm_nested_ops = {