kvm: nVMX: Correct a VMX instruction error code for VMPTRLD
authorGanShun <ganshun@google.com>
Wed, 30 Nov 2016 18:28:19 +0000 (10:28 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 15 Dec 2016 14:02:44 +0000 (15:02 +0100)
When the operand passed to VMPTRLD matches the address of the VMXON
region, the VMX instruction error code should be
VMXERR_VMPTRLD_VMXON_POINTER rather than VMXERR_VMCLEAR_VMXON_POINTER.

Signed-off-by: GanShun <ganshun@google.com>
Signed-off-by: Jim Mattson <jmattson@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx.c

index aae43c6f24721e748451aea69d9c138c4be58f61..c41d7ffdda5ae6fa061205885da0bd55027c3c1f 100644 (file)
@@ -7122,7 +7122,7 @@ static int nested_vmx_check_vmptr(struct kvm_vcpu *vcpu, int exit_reason,
 
                if (vmptr == vmx->nested.vmxon_ptr) {
                        nested_vmx_failValid(vcpu,
-                                            VMXERR_VMCLEAR_VMXON_POINTER);
+                                            VMXERR_VMPTRLD_VMXON_POINTER);
                        return kvm_skip_emulated_instruction(vcpu);
                }
                break;