Skip to contentSkip to conversation

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

PATCH Superseded Jim Mattson 5 participants 9 messages Nov 28, 2016 – Dec 13, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kvm: nVMX: Correct a VMX instruction error code for VMPTRLD

From: GanShun <[email protected]>

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.

---
 arch/x86/kvm/vmx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kvm/vmx.c +1 -1
index 0c4cde8..7e3a45e 100644
@@ -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;
 		}
Signature · 1 line
2.8.0.rc3.226.g39d4020
#1 lore raw

Sigh. Mis-applied patch. Update forthcoming.

Quoted 27 lines · Jim Mattson

From: GanShun <[email protected]>

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.

---
 arch/x86/kvm/vmx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kvm/vmx.c +1 -2
index 0c4cde8..7e3a45e 100644
@@ -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

#2 lore raw

PATCH v2 1/1 kvm: nVMX: Correct a VMX instruction error code for VMPTRLD

From: GanShun <[email protected]>

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.

---
 arch/x86/kvm/vmx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kvm/vmx.c +1 -1
index 0c4cde8..a1c7a43 100644
@@ -6960,7 +6960,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;
 		}
Signature · 1 line
2.8.0.rc3.226.g39d4020
Reviewed-by on v2 1/1
#3 lore raw

Am 30.11.2016 um 19:28 schrieb Jim Mattson:

Quoted 17 lines

From: GanShun <[email protected]>

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.

---
 arch/x86/kvm/vmx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kvm/vmx.c +0 -0
index 0c4cde8..a1c7a43 100644

arch/x86/kvm/vmx.c static int nested_vmx_check_vmptr(struct kvm_vcpu *vcpu, int exit_reason, · line 6966

Quoted 8 lines
arch/x86/kvm/vmx.c +1 -1
@@ -6960,7 +6960,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;
 		}

VMXERR_VMPTRLD_VMXON_POINTER was completely unused so far. This is correct (Vol. 3C 30-16 and 30-29).

Signature · 1 line
David
#4 lore raw

2016-12-05 15:31+0100, David Hildenbrand:

Quoted 30 lines

Am 30.11.2016 um 19:28 schrieb Jim Mattson:

Quoted 17 lines

From: GanShun <[email protected]>

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.

---
 arch/x86/kvm/vmx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kvm/vmx.c +0 -0
index 0c4cde8..a1c7a43 100644

arch/x86/kvm/vmx.c static int nested_vmx_check_vmptr(struct kvm_vcpu *vcpu, int exit_reason, · line 6966

Quoted 8 lines
arch/x86/kvm/vmx.c +1 -1
@@ -6960,7 +6960,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;
 		}

VMXERR_VMPTRLD_VMXON_POINTER was completely unused so far. This is correct (Vol. 3C 30-16 and 30-29).

Quoted 1 line

Jim, I don't see your emails on the list (that don't Cc me) after Nov 4. Have you posted more than this patch and the checkpoint/restore series? ([PATCH 0/8] kvm: nVMX: Checkpoint/restore support for VMX state)

I'm sorry they fell through cracks.
(Still no idea why -- filters don't even delete mail.)

#5 lore raw

Just one, I think: [kvm-unit-tests PATCH] Test 32-bit ljmp emulation.

Quoted 39 lines · Radim Krčmář

2016-12-05 15:31+0100, David Hildenbrand:

Quoted 30 lines

Am 30.11.2016 um 19:28 schrieb Jim Mattson:

Quoted 17 lines

From: GanShun <[email protected]>

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.

---
 arch/x86/kvm/vmx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kvm/vmx.c +0 -0
index 0c4cde8..a1c7a43 100644

arch/x86/kvm/vmx.c static int nested_vmx_check_vmptr(struct kvm_vcpu *vcpu, int exit_reason, · line 6966

Quoted 8 lines
arch/x86/kvm/vmx.c +1 -1
@@ -6960,7 +6960,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;
             }

VMXERR_VMPTRLD_VMXON_POINTER was completely unused so far. This is correct (Vol. 3C 30-16 and 30-29).

Quoted 1 line

Jim, I don't see your emails on the list (that don't Cc me) after Nov 4. Have you posted more than this patch and the checkpoint/restore series? ([PATCH 0/8] kvm: nVMX: Checkpoint/restore support for VMX state)

I'm sorry they fell through cracks.
(Still no idea why -- filters don't even delete mail.)

maintainer Applied
#6 lore raw
In reply to Jim Mattson
Quoted 17 lines · Jim Mattson

From: GanShun <[email protected]>

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.

---
 arch/x86/kvm/vmx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kvm/vmx.c +0 -0
index 0c4cde8..a1c7a43 100644

arch/x86/kvm/vmx.c static int nested_vmx_check_vmptr(struct kvm_vcpu *vcpu, int exit_reason, · line 6966

Quoted 8 lines
arch/x86/kvm/vmx.c +1 -1
@@ -6960,7 +6960,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;
 		}

Queued, thanks.

Paolo

maintainer
#7 lore raw
In reply to Jim Mattson
Quoted 10 lines · Jim Mattson

From: GanShun <[email protected]>

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.

---
 arch/x86/kvm/vmx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

This patch is missing GanShun's Signed-off-by.

Paolo

#8 lore raw
Quoted 17 lines · Paolo Bonzini
Quoted 10 lines · Jim Mattson

From: GanShun <[email protected]>

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.

---
 arch/x86/kvm/vmx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

This patch is missing GanShun's Signed-off-by.

Paolo

Signature · 1 line
-- Gan Shun