summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVitaly Kuznetsov <vkuznets@redhat.com>2021-05-26 15:20:17 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2021-06-17 13:09:48 -0400
commit6a789ca5d5038a60f51c374067fd9abab13df596 (patch)
treec5e06100b7188eead1aeaeeb1a6be7bbf45f0007
parent1e9dfbd748f37dfa51fcdc82a7afddde1cf8d0ed (diff)
downloadlinux-stable-6a789ca5d5038a60f51c374067fd9abab13df596.tar.gz
linux-stable-6a789ca5d5038a60f51c374067fd9abab13df596.tar.bz2
linux-stable-6a789ca5d5038a60f51c374067fd9abab13df596.zip
KVM: nVMX: Don't set 'dirty_vmcs12' flag on enlightened VMPTRLD
'dirty_vmcs12' is only checked in prepare_vmcs02_early()/prepare_vmcs02() and both checks look like: 'vmx->nested.dirty_vmcs12 || evmptr_is_valid(vmx->nested.hv_evmcs_vmptr)' so for eVMCS case the flag changes nothing. Drop the assignment to avoid the confusion. No functional change intended. Reported-by: Maxim Levitsky <mlevitsk@redhat.com> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20210526132026.270394-3-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--arch/x86/kvm/vmx/nested.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c
index 84d9a8d569bb..dbee5479103f 100644
--- a/arch/x86/kvm/vmx/nested.c
+++ b/arch/x86/kvm/vmx/nested.c
@@ -2021,7 +2021,6 @@ static enum nested_evmptrld_status nested_vmx_handle_enlightened_vmptrld(
return EVMPTRLD_VMFAIL;
}
- vmx->nested.dirty_vmcs12 = true;
vmx->nested.hv_evmcs_vmptr = evmcs_gpa;
evmcs_gpa_changed = true;