KVM: nVMX: Don't set 'dirty_vmcs12' flag on enlightened VMPTRLD
authorVitaly Kuznetsov <vkuznets@redhat.com>
Wed, 26 May 2021 13:20:17 +0000 (15:20 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 17 Jun 2021 17:09:48 +0000 (13:09 -0400)
commit6a789ca5d5038a60f51c374067fd9abab13df596
treec5e06100b7188eead1aeaeeb1a6be7bbf45f0007
parent1e9dfbd748f37dfa51fcdc82a7afddde1cf8d0ed
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>
arch/x86/kvm/vmx/nested.c