Skip to content

Commit 772b81b

Browse files
Maxim Levitskybonzini
authored andcommitted
SVM: nSVM: setup nested msr permission bitmap on nested state load
This code was missing and was forcing the L2 run with L1's msr permission bitmap Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Message-Id: <20200827162720.278690-3-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent 9883764 commit 772b81b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arch/x86/kvm/svm/nested.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,6 +1134,9 @@ static int svm_set_nested_state(struct kvm_vcpu *vcpu,
11341134
load_nested_vmcb_control(svm, &ctl);
11351135
nested_prepare_vmcb_control(svm);
11361136

1137+
if (!nested_svm_vmrun_msrpm(svm))
1138+
return -EINVAL;
1139+
11371140
out_set_gif:
11381141
svm_set_gif(svm, !!(kvm_state->flags & KVM_STATE_NESTED_GIF_SET));
11391142
return 0;

0 commit comments

Comments
 (0)