diff mbox series

[6/6] KVM: nSVM: mark vmcb as dirty when forcingly leaving the guest mode

Message ID 20210106105001.449974-7-mlevitsk@redhat.com (mailing list archive)
State New, archived
Headers show
Series KVM: nSVM: few random fixes | expand

Commit Message

Maxim Levitsky Jan. 6, 2021, 10:50 a.m. UTC
We overwrite most of vmcb fields while doing so, so we must
mark it as dirty.

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
 arch/x86/kvm/svm/nested.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series


diff --git a/arch/x86/kvm/svm/nested.c b/arch/x86/kvm/svm/nested.c
index 3aa18016832d0..de3dbb5407206 100644
--- a/arch/x86/kvm/svm/nested.c
+++ b/arch/x86/kvm/svm/nested.c
@@ -763,6 +763,7 @@  void svm_leave_nested(struct vcpu_svm *svm)
 		copy_vmcb_control_area(&vmcb->control, &hsave->control);
+		vmcb_mark_all_dirty(svm->vmcb);
 	kvm_clear_request(KVM_REQ_GET_NESTED_STATE_PAGES, &svm->vcpu);