summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kvm/svm/nested.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm/nested.c b/arch/x86/kvm/svm/nested.c
index 21ee75d6cdff..75e7deef51a5 100644
--- a/arch/x86/kvm/svm/nested.c
+++ b/arch/x86/kvm/svm/nested.c
@@ -128,6 +128,9 @@ void nested_vmcb02_recalc_intercepts(struct vcpu_svm *svm)
struct vmcb_ctrl_area_cached *g;
unsigned int i;
+ if (WARN_ON_ONCE(svm->vmcb != svm->nested.vmcb02.ptr))
+ return;
+
vmcb_mark_dirty(svm->vmcb, VMCB_INTERCEPTS);
c = &svm->vmcb->control;