[v5,2/4] selftests: KVM: Remove unused x86_register enum
diff mbox series

Message ID 20200207142715.6166-3-eric.auger@redhat.com
State New
Headers show
Series
  • selftests: KVM: AMD Nested SVM test infrastructure
Related show

Commit Message

Eric Auger Feb. 7, 2020, 2:27 p.m. UTC
x86_register enum is not used. Its presence incites us
to enumerate GPRs in the same order in other looming
structs. So let's remove it.

Signed-off-by: Eric Auger <eric.auger@redhat.com>
Suggested-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
 .../selftests/kvm/include/x86_64/processor.h  | 20 -------------------
 1 file changed, 20 deletions(-)

Comments

Vitaly Kuznetsov Feb. 7, 2020, 3:07 p.m. UTC | #1
Eric Auger <eric.auger@redhat.com> writes:

> x86_register enum is not used. Its presence incites us
> to enumerate GPRs in the same order in other looming
> structs. So let's remove it.
>
> Signed-off-by: Eric Auger <eric.auger@redhat.com>
> Suggested-by: Vitaly Kuznetsov <vkuznets@redhat.com>
> ---
>  .../selftests/kvm/include/x86_64/processor.h  | 20 -------------------
>  1 file changed, 20 deletions(-)
>
> diff --git a/tools/testing/selftests/kvm/include/x86_64/processor.h b/tools/testing/selftests/kvm/include/x86_64/processor.h
> index 6f7fffaea2e8..e48dac5c29e8 100644
> --- a/tools/testing/selftests/kvm/include/x86_64/processor.h
> +++ b/tools/testing/selftests/kvm/include/x86_64/processor.h
> @@ -36,26 +36,6 @@
>  #define X86_CR4_SMAP		(1ul << 21)
>  #define X86_CR4_PKE		(1ul << 22)
>  
> -/* The enum values match the intruction encoding of each register */
> -enum x86_register {
> -	RAX = 0,
> -	RCX,
> -	RDX,
> -	RBX,
> -	RSP,
> -	RBP,
> -	RSI,
> -	RDI,
> -	R8,
> -	R9,
> -	R10,
> -	R11,
> -	R12,
> -	R13,
> -	R14,
> -	R15,
> -};
> -
>  struct desc64 {
>  	uint16_t limit0;
>  	uint16_t base0;

Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Krish Sadhukhan Feb. 8, 2020, 1:07 a.m. UTC | #2
On 2/7/20 6:27 AM, Eric Auger wrote:
> x86_register enum is not used. Its presence incites us
> to enumerate GPRs in the same order in other looming
> structs. So let's remove it.
>
> Signed-off-by: Eric Auger <eric.auger@redhat.com>
> Suggested-by: Vitaly Kuznetsov <vkuznets@redhat.com>
> ---
>   .../selftests/kvm/include/x86_64/processor.h  | 20 -------------------
>   1 file changed, 20 deletions(-)
>
> diff --git a/tools/testing/selftests/kvm/include/x86_64/processor.h b/tools/testing/selftests/kvm/include/x86_64/processor.h
> index 6f7fffaea2e8..e48dac5c29e8 100644
> --- a/tools/testing/selftests/kvm/include/x86_64/processor.h
> +++ b/tools/testing/selftests/kvm/include/x86_64/processor.h
> @@ -36,26 +36,6 @@
>   #define X86_CR4_SMAP		(1ul << 21)
>   #define X86_CR4_PKE		(1ul << 22)
>   
> -/* The enum values match the intruction encoding of each register */
> -enum x86_register {
> -	RAX = 0,
> -	RCX,
> -	RDX,
> -	RBX,
> -	RSP,
> -	RBP,
> -	RSI,
> -	RDI,
> -	R8,
> -	R9,
> -	R10,
> -	R11,
> -	R12,
> -	R13,
> -	R14,
> -	R15,
> -};
> -
>   struct desc64 {
>   	uint16_t limit0;
>   	uint16_t base0;
Reviewed-by: Krish Sadhukhan <krish.sadhukhan@oracle.com>

Patch
diff mbox series

diff --git a/tools/testing/selftests/kvm/include/x86_64/processor.h b/tools/testing/selftests/kvm/include/x86_64/processor.h
index 6f7fffaea2e8..e48dac5c29e8 100644
--- a/tools/testing/selftests/kvm/include/x86_64/processor.h
+++ b/tools/testing/selftests/kvm/include/x86_64/processor.h
@@ -36,26 +36,6 @@ 
 #define X86_CR4_SMAP		(1ul << 21)
 #define X86_CR4_PKE		(1ul << 22)
 
-/* The enum values match the intruction encoding of each register */
-enum x86_register {
-	RAX = 0,
-	RCX,
-	RDX,
-	RBX,
-	RSP,
-	RBP,
-	RSI,
-	RDI,
-	R8,
-	R9,
-	R10,
-	R11,
-	R12,
-	R13,
-	R14,
-	R15,
-};
-
 struct desc64 {
 	uint16_t limit0;
 	uint16_t base0;