diff mbox

[v2] kvm: nVMX: Correct a VMX instruction error code for VMPTRLD

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

Commit Message

Jim Mattson Nov. 30, 2016, 6:28 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

David Hildenbrand Dec. 5, 2016, 2:31 p.m. UTC | #1
Am 30.11.2016 um 19:28 schrieb Jim Mattson:
> 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..a1c7a43 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -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).

Reviewed-by: David Hildenbrand <david@redhat.com>
Radim Krčmář Dec. 8, 2016, 3:27 p.m. UTC | #2
2016-12-05 15:31+0100, David Hildenbrand:
> Am 30.11.2016 um 19:28 schrieb Jim Mattson:
>> 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..a1c7a43 100644
>> --- a/arch/x86/kvm/vmx.c
>> +++ b/arch/x86/kvm/vmx.c
>> @@ -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).
> 
> Reviewed-by: David Hildenbrand <david@redhat.com>

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.)
--
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
Jim Mattson Dec. 8, 2016, 3:59 p.m. UTC | #3
Just one, I think: [kvm-unit-tests PATCH] Test 32-bit ljmp emulation.

On Thu, Dec 8, 2016 at 7:27 AM, Radim Krčmář <rkrcmar@redhat.com> wrote:
> 2016-12-05 15:31+0100, David Hildenbrand:
>> Am 30.11.2016 um 19:28 schrieb Jim Mattson:
>>> 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..a1c7a43 100644
>>> --- a/arch/x86/kvm/vmx.c
>>> +++ b/arch/x86/kvm/vmx.c
>>> @@ -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).
>>
>> Reviewed-by: David Hildenbrand <david@redhat.com>
>
> 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.)
--
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
Paolo Bonzini Dec. 9, 2016, 2:54 p.m. UTC | #4
On 30/11/2016 19:28, Jim Mattson 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..a1c7a43 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -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
--
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
Paolo Bonzini Dec. 12, 2016, 6:28 a.m. UTC | #5
On 30/11/2016 19:28, Jim Mattson 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(-)

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

Paolo
--
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
Gan Shun Lim Dec. 13, 2016, 11:16 p.m. UTC | #6
Signed-off-by: GanShun <ganshun@google.com>

On Mon, Dec 12, 2016 at 2:28 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
>
> On 30/11/2016 19:28, Jim Mattson 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(-)
>
> This patch is missing GanShun's Signed-off-by.
>
> Paolo
diff mbox

Patch

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 0c4cde8..a1c7a43 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -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;
 		}