Skip to content

Commit 81f76ad

Browse files
Maxim Levitskybonzini
authored andcommitted
KVM: nSVM: correctly restore nested_run_pending on migration
The code to store it on the migration exists, but no code was restoring it. One of the side effects of fixing this is that L1->L2 injected events are no longer lost when migration happens with nested run pending. Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Message-Id: <20210107093854.882483-3-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent c0dba6e commit 81f76ad

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arch/x86/kvm/svm/nested.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,6 +1194,10 @@ static int svm_set_nested_state(struct kvm_vcpu *vcpu,
11941194
* in the registers, the save area of the nested state instead
11951195
* contains saved L1 state.
11961196
*/
1197+
1198+
svm->nested.nested_run_pending =
1199+
!!(kvm_state->flags & KVM_STATE_NESTED_RUN_PENDING);
1200+
11971201
copy_vmcb_control_area(&hsave->control, &svm->vmcb->control);
11981202
hsave->save = *save;
11991203

0 commit comments

Comments
 (0)