diff mbox series

[v3,02/11] KVM: nVMX: Don't set 'dirty_vmcs12' flag on enlightened VMPTRLD

Message ID 20210526132026.270394-3-vkuznets@redhat.com (mailing list archive)
State New, archived
Headers show
Series KVM: nVMX: Fixes for nested state migration when eVMCS is in use | expand

Commit Message

Vitaly Kuznetsov May 26, 2021, 1:20 p.m. UTC
'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>
 arch/x86/kvm/vmx/nested.c | 1 -
 1 file changed, 1 deletion(-)
diff mbox series


diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c
index 74ff3fd56ce5..c662278e4793 100644
--- a/arch/x86/kvm/vmx/nested.c
+++ b/arch/x86/kvm/vmx/nested.c
@@ -2022,7 +2022,6 @@  static enum nested_evmptrld_status nested_vmx_handle_enlightened_vmptrld(
-		vmx->nested.dirty_vmcs12 = true;
 		vmx->nested.hv_evmcs_vmptr = evmcs_gpa;
 		evmcs_gpa_changed = true;