Skip to content

Commit

Permalink
KVM: nSVM: mark vmcb as dirty when forcingly leaving the guest mode
Browse files Browse the repository at this point in the history
We overwrite most of vmcb fields while doing so, so we must
mark it as dirty.

Signed-off-by: Maxim Levitsky <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
  • Loading branch information
Maxim Levitsky authored and bonzini committed Jan 7, 2021
1 parent 81f76ad commit 56fe28d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/x86/kvm/svm/nested.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,7 @@ void svm_leave_nested(struct vcpu_svm *svm)
leave_guest_mode(&svm->vcpu);
copy_vmcb_control_area(&vmcb->control, &hsave->control);
nested_svm_uninit_mmu_context(&svm->vcpu);
vmcb_mark_all_dirty(svm->vmcb);
}

kvm_clear_request(KVM_REQ_GET_NESTED_STATE_PAGES, &svm->vcpu);
Expand Down

0 comments on commit 56fe28d

Please sign in to comment.