diff mbox

kvm: nVMX: Correct a VMX instruction error code for VMPTRLD

Message ID 1480377006-27404-1-git-send-email-jmattson@google.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jim Mattson Nov. 28, 2016, 11:50 p.m. UTC
From: GanShun <ganshun@google.com>

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: Jim Mattson <jmattson@google.com>
---
 arch/x86/kvm/vmx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jim Mattson Nov. 30, 2016, 5:54 p.m. UTC | #1
Sigh. Mis-applied patch. Update forthcoming.

On Mon, Nov 28, 2016 at 3:50 PM, Jim Mattson <jmattson@google.com> wrote:
> From: GanShun <ganshun@google.com>
>
> 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: Jim Mattson <jmattson@google.com>
> ---
>  arch/x86/kvm/vmx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index 0c4cde8..7e3a45e 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -6945,7 +6945,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);
>                         skip_emulated_instruction(vcpu);
>                         return 1;
>                 }
> --
> 2.8.0.rc3.226.g39d4020
>
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 0c4cde8..7e3a45e 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -6945,7 +6945,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);
 			skip_emulated_instruction(vcpu);
 			return 1;
 		}