All of lore.kernel.org
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH] x86: Fix the register order to match struct regs
@ 2019-10-25 17:00 Aaron Lewis
  2019-11-05 19:24 ` Aaron Lewis
  2019-11-15 14:27 ` Aaron Lewis
  0 siblings, 2 replies; 5+ messages in thread
From: Aaron Lewis @ 2019-10-25 17:00 UTC (permalink / raw)
  To: kvm; +Cc: Aaron Lewis, Jim Mattson

Fix the order the registers show up in SAVE_GPR and SAVE_GPR_C to ensure
the correct registers get the correct values.  Previously, the registers
were being written to (and read from) the wrong fields.

Reviewed-by: Jim Mattson <jmattson@google.com>
Signed-off-by: Aaron Lewis <aaronlewis@google.com>
---
 x86/vmx.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/x86/vmx.h b/x86/vmx.h
index 8496be7..8527997 100644
--- a/x86/vmx.h
+++ b/x86/vmx.h
@@ -492,9 +492,9 @@ enum vm_instruction_error_number {
 
 #define SAVE_GPR				\
 	"xchg %rax, regs\n\t"			\
-	"xchg %rbx, regs+0x8\n\t"		\
-	"xchg %rcx, regs+0x10\n\t"		\
-	"xchg %rdx, regs+0x18\n\t"		\
+	"xchg %rcx, regs+0x8\n\t"		\
+	"xchg %rdx, regs+0x10\n\t"		\
+	"xchg %rbx, regs+0x18\n\t"		\
 	"xchg %rbp, regs+0x28\n\t"		\
 	"xchg %rsi, regs+0x30\n\t"		\
 	"xchg %rdi, regs+0x38\n\t"		\
@@ -511,9 +511,9 @@ enum vm_instruction_error_number {
 
 #define SAVE_GPR_C				\
 	"xchg %%rax, regs\n\t"			\
-	"xchg %%rbx, regs+0x8\n\t"		\
-	"xchg %%rcx, regs+0x10\n\t"		\
-	"xchg %%rdx, regs+0x18\n\t"		\
+	"xchg %%rcx, regs+0x8\n\t"		\
+	"xchg %%rdx, regs+0x10\n\t"		\
+	"xchg %%rbx, regs+0x18\n\t"		\
 	"xchg %%rbp, regs+0x28\n\t"		\
 	"xchg %%rsi, regs+0x30\n\t"		\
 	"xchg %%rdi, regs+0x38\n\t"		\
-- 
2.24.0.rc0.303.g954a862665-goog


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [kvm-unit-tests PATCH] x86: Fix the register order to match struct regs
  2019-10-25 17:00 [kvm-unit-tests PATCH] x86: Fix the register order to match struct regs Aaron Lewis
@ 2019-11-05 19:24 ` Aaron Lewis
  2019-11-15 14:27 ` Aaron Lewis
  1 sibling, 0 replies; 5+ messages in thread
From: Aaron Lewis @ 2019-11-05 19:24 UTC (permalink / raw)
  To: kvm; +Cc: Jim Mattson, Paolo Bonzini

On Fri, Oct 25, 2019 at 10:01 AM Aaron Lewis <aaronlewis@google.com> wrote:
>
> Fix the order the registers show up in SAVE_GPR and SAVE_GPR_C to ensure
> the correct registers get the correct values.  Previously, the registers
> were being written to (and read from) the wrong fields.
>
> Reviewed-by: Jim Mattson <jmattson@google.com>
> Signed-off-by: Aaron Lewis <aaronlewis@google.com>
> ---
>  x86/vmx.h | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/x86/vmx.h b/x86/vmx.h
> index 8496be7..8527997 100644
> --- a/x86/vmx.h
> +++ b/x86/vmx.h
> @@ -492,9 +492,9 @@ enum vm_instruction_error_number {
>
>  #define SAVE_GPR                               \
>         "xchg %rax, regs\n\t"                   \
> -       "xchg %rbx, regs+0x8\n\t"               \
> -       "xchg %rcx, regs+0x10\n\t"              \
> -       "xchg %rdx, regs+0x18\n\t"              \
> +       "xchg %rcx, regs+0x8\n\t"               \
> +       "xchg %rdx, regs+0x10\n\t"              \
> +       "xchg %rbx, regs+0x18\n\t"              \
>         "xchg %rbp, regs+0x28\n\t"              \
>         "xchg %rsi, regs+0x30\n\t"              \
>         "xchg %rdi, regs+0x38\n\t"              \
> @@ -511,9 +511,9 @@ enum vm_instruction_error_number {
>
>  #define SAVE_GPR_C                             \
>         "xchg %%rax, regs\n\t"                  \
> -       "xchg %%rbx, regs+0x8\n\t"              \
> -       "xchg %%rcx, regs+0x10\n\t"             \
> -       "xchg %%rdx, regs+0x18\n\t"             \
> +       "xchg %%rcx, regs+0x8\n\t"              \
> +       "xchg %%rdx, regs+0x10\n\t"             \
> +       "xchg %%rbx, regs+0x18\n\t"             \
>         "xchg %%rbp, regs+0x28\n\t"             \
>         "xchg %%rsi, regs+0x30\n\t"             \
>         "xchg %%rdi, regs+0x38\n\t"             \
> --
> 2.24.0.rc0.303.g954a862665-goog
>

ping. plain text this time.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [kvm-unit-tests PATCH] x86: Fix the register order to match struct regs
  2019-10-25 17:00 [kvm-unit-tests PATCH] x86: Fix the register order to match struct regs Aaron Lewis
  2019-11-05 19:24 ` Aaron Lewis
@ 2019-11-15 14:27 ` Aaron Lewis
  2019-11-15 14:57   ` Paolo Bonzini
  2019-11-18 19:08   ` Krish Sadhukhan
  1 sibling, 2 replies; 5+ messages in thread
From: Aaron Lewis @ 2019-11-15 14:27 UTC (permalink / raw)
  To: kvm; +Cc: Jim Mattson, Paolo Bonzini

On Fri, Oct 25, 2019 at 10:01 AM Aaron Lewis <aaronlewis@google.com> wrote:
>
> Fix the order the registers show up in SAVE_GPR and SAVE_GPR_C to ensure
> the correct registers get the correct values.  Previously, the registers
> were being written to (and read from) the wrong fields.
>
> Reviewed-by: Jim Mattson <jmattson@google.com>
> Signed-off-by: Aaron Lewis <aaronlewis@google.com>
> ---
>  x86/vmx.h | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/x86/vmx.h b/x86/vmx.h
> index 8496be7..8527997 100644
> --- a/x86/vmx.h
> +++ b/x86/vmx.h
> @@ -492,9 +492,9 @@ enum vm_instruction_error_number {
>
>  #define SAVE_GPR                               \
>         "xchg %rax, regs\n\t"                   \
> -       "xchg %rbx, regs+0x8\n\t"               \
> -       "xchg %rcx, regs+0x10\n\t"              \
> -       "xchg %rdx, regs+0x18\n\t"              \
> +       "xchg %rcx, regs+0x8\n\t"               \
> +       "xchg %rdx, regs+0x10\n\t"              \
> +       "xchg %rbx, regs+0x18\n\t"              \
>         "xchg %rbp, regs+0x28\n\t"              \
>         "xchg %rsi, regs+0x30\n\t"              \
>         "xchg %rdi, regs+0x38\n\t"              \
> @@ -511,9 +511,9 @@ enum vm_instruction_error_number {
>
>  #define SAVE_GPR_C                             \
>         "xchg %%rax, regs\n\t"                  \
> -       "xchg %%rbx, regs+0x8\n\t"              \
> -       "xchg %%rcx, regs+0x10\n\t"             \
> -       "xchg %%rdx, regs+0x18\n\t"             \
> +       "xchg %%rcx, regs+0x8\n\t"              \
> +       "xchg %%rdx, regs+0x10\n\t"             \
> +       "xchg %%rbx, regs+0x18\n\t"             \
>         "xchg %%rbp, regs+0x28\n\t"             \
>         "xchg %%rsi, regs+0x30\n\t"             \
>         "xchg %%rdi, regs+0x38\n\t"             \
> --
> 2.24.0.rc0.303.g954a862665-goog
>

Ping.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [kvm-unit-tests PATCH] x86: Fix the register order to match struct regs
  2019-11-15 14:27 ` Aaron Lewis
@ 2019-11-15 14:57   ` Paolo Bonzini
  2019-11-18 19:08   ` Krish Sadhukhan
  1 sibling, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2019-11-15 14:57 UTC (permalink / raw)
  To: Aaron Lewis, kvm; +Cc: Jim Mattson

On 15/11/19 15:27, Aaron Lewis wrote:
> On Fri, Oct 25, 2019 at 10:01 AM Aaron Lewis <aaronlewis@google.com> wrote:
>>
>> Fix the order the registers show up in SAVE_GPR and SAVE_GPR_C to ensure
>> the correct registers get the correct values.  Previously, the registers
>> were being written to (and read from) the wrong fields.
>>
>> Reviewed-by: Jim Mattson <jmattson@google.com>
>> Signed-off-by: Aaron Lewis <aaronlewis@google.com>
>> ---
>>  x86/vmx.h | 12 ++++++------
>>  1 file changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/x86/vmx.h b/x86/vmx.h
>> index 8496be7..8527997 100644
>> --- a/x86/vmx.h
>> +++ b/x86/vmx.h
>> @@ -492,9 +492,9 @@ enum vm_instruction_error_number {
>>
>>  #define SAVE_GPR                               \
>>         "xchg %rax, regs\n\t"                   \
>> -       "xchg %rbx, regs+0x8\n\t"               \
>> -       "xchg %rcx, regs+0x10\n\t"              \
>> -       "xchg %rdx, regs+0x18\n\t"              \
>> +       "xchg %rcx, regs+0x8\n\t"               \
>> +       "xchg %rdx, regs+0x10\n\t"              \
>> +       "xchg %rbx, regs+0x18\n\t"              \
>>         "xchg %rbp, regs+0x28\n\t"              \
>>         "xchg %rsi, regs+0x30\n\t"              \
>>         "xchg %rdi, regs+0x38\n\t"              \
>> @@ -511,9 +511,9 @@ enum vm_instruction_error_number {
>>
>>  #define SAVE_GPR_C                             \
>>         "xchg %%rax, regs\n\t"                  \
>> -       "xchg %%rbx, regs+0x8\n\t"              \
>> -       "xchg %%rcx, regs+0x10\n\t"             \
>> -       "xchg %%rdx, regs+0x18\n\t"             \
>> +       "xchg %%rcx, regs+0x8\n\t"              \
>> +       "xchg %%rdx, regs+0x10\n\t"             \
>> +       "xchg %%rbx, regs+0x18\n\t"             \
>>         "xchg %%rbp, regs+0x28\n\t"             \
>>         "xchg %%rsi, regs+0x30\n\t"             \
>>         "xchg %%rdi, regs+0x38\n\t"             \
>> --
>> 2.24.0.rc0.303.g954a862665-goog
>>
> 
> Ping.
> 

Pushed, thanks.

Paolo


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [kvm-unit-tests PATCH] x86: Fix the register order to match struct regs
  2019-11-15 14:27 ` Aaron Lewis
  2019-11-15 14:57   ` Paolo Bonzini
@ 2019-11-18 19:08   ` Krish Sadhukhan
  1 sibling, 0 replies; 5+ messages in thread
From: Krish Sadhukhan @ 2019-11-18 19:08 UTC (permalink / raw)
  To: Aaron Lewis, kvm; +Cc: Jim Mattson, Paolo Bonzini


On 11/15/19 6:27 AM, Aaron Lewis wrote:
> On Fri, Oct 25, 2019 at 10:01 AM Aaron Lewis <aaronlewis@google.com> wrote:
>> Fix the order the registers show up in SAVE_GPR and SAVE_GPR_C to ensure
>> the correct registers get the correct values.  Previously, the registers
>> were being written to (and read from) the wrong fields.
>>
>> Reviewed-by: Jim Mattson <jmattson@google.com>
>> Signed-off-by: Aaron Lewis <aaronlewis@google.com>
>> ---
>>   x86/vmx.h | 12 ++++++------
>>   1 file changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/x86/vmx.h b/x86/vmx.h
>> index 8496be7..8527997 100644
>> --- a/x86/vmx.h
>> +++ b/x86/vmx.h
>> @@ -492,9 +492,9 @@ enum vm_instruction_error_number {
>>
>>   #define SAVE_GPR                               \
>>          "xchg %rax, regs\n\t"                   \
>> -       "xchg %rbx, regs+0x8\n\t"               \
>> -       "xchg %rcx, regs+0x10\n\t"              \
>> -       "xchg %rdx, regs+0x18\n\t"              \
>> +       "xchg %rcx, regs+0x8\n\t"               \
>> +       "xchg %rdx, regs+0x10\n\t"              \
>> +       "xchg %rbx, regs+0x18\n\t"              \
>>          "xchg %rbp, regs+0x28\n\t"              \
>>          "xchg %rsi, regs+0x30\n\t"              \
>>          "xchg %rdi, regs+0x38\n\t"              \
>> @@ -511,9 +511,9 @@ enum vm_instruction_error_number {
>>
>>   #define SAVE_GPR_C                             \
>>          "xchg %%rax, regs\n\t"                  \
>> -       "xchg %%rbx, regs+0x8\n\t"              \
>> -       "xchg %%rcx, regs+0x10\n\t"             \
>> -       "xchg %%rdx, regs+0x18\n\t"             \
>> +       "xchg %%rcx, regs+0x8\n\t"              \
>> +       "xchg %%rdx, regs+0x10\n\t"             \
>> +       "xchg %%rbx, regs+0x18\n\t"             \
>>          "xchg %%rbp, regs+0x28\n\t"             \
>>          "xchg %%rsi, regs+0x30\n\t"             \
>>          "xchg %%rdi, regs+0x38\n\t"             \
>> --
>> 2.24.0.rc0.303.g954a862665-goog
>>
> Ping.
Reviewed-by: Krish Sadhukhan <krish.sadhukhan@oracle.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-11-18 19:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-25 17:00 [kvm-unit-tests PATCH] x86: Fix the register order to match struct regs Aaron Lewis
2019-11-05 19:24 ` Aaron Lewis
2019-11-15 14:27 ` Aaron Lewis
2019-11-15 14:57   ` Paolo Bonzini
2019-11-18 19:08   ` Krish Sadhukhan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.