public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] selftests: KVM: Don't clobber XMM register when read
@ 2021-09-27 22:36 Oliver Upton
  2021-09-28 15:31 ` Paolo Bonzini
  0 siblings, 1 reply; 2+ messages in thread
From: Oliver Upton @ 2021-09-27 22:36 UTC (permalink / raw)
  To: kvm
  Cc: Paolo Bonzini, Jim Mattson, Ricardo Koller, Sean Christopherson,
	Oliver Upton

There is no need to clobber a register that is only being read from.
Oops. Drop the XMM register from the clobbers list.

Signed-off-by: Oliver Upton <oupton@google.com>
---
 tools/testing/selftests/kvm/include/x86_64/processor.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/kvm/include/x86_64/processor.h b/tools/testing/selftests/kvm/include/x86_64/processor.h
index eba8bd08293e..05e65ca1c30c 100644
--- a/tools/testing/selftests/kvm/include/x86_64/processor.h
+++ b/tools/testing/selftests/kvm/include/x86_64/processor.h
@@ -315,7 +315,7 @@ static inline void set_xmm(int n, unsigned long val)
 #define GET_XMM(__xmm)							\
 ({									\
 	unsigned long __val;						\
-	asm volatile("movq %%"#__xmm", %0" : "=r"(__val) : : #__xmm);	\
+	asm volatile("movq %%"#__xmm", %0" : "=r"(__val));		\
 	__val;								\
 })
 
-- 
2.33.0.685.g46640cef36-goog


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

* Re: [PATCH] selftests: KVM: Don't clobber XMM register when read
  2021-09-27 22:36 [PATCH] selftests: KVM: Don't clobber XMM register when read Oliver Upton
@ 2021-09-28 15:31 ` Paolo Bonzini
  0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2021-09-28 15:31 UTC (permalink / raw)
  To: Oliver Upton, kvm; +Cc: Jim Mattson, Ricardo Koller, Sean Christopherson

On 28/09/21 00:36, Oliver Upton wrote:
> There is no need to clobber a register that is only being read from.
> Oops. Drop the XMM register from the clobbers list.
> 
> Signed-off-by: Oliver Upton <oupton@google.com>
> ---
>   tools/testing/selftests/kvm/include/x86_64/processor.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/kvm/include/x86_64/processor.h b/tools/testing/selftests/kvm/include/x86_64/processor.h
> index eba8bd08293e..05e65ca1c30c 100644
> --- a/tools/testing/selftests/kvm/include/x86_64/processor.h
> +++ b/tools/testing/selftests/kvm/include/x86_64/processor.h
> @@ -315,7 +315,7 @@ static inline void set_xmm(int n, unsigned long val)
>   #define GET_XMM(__xmm)							\
>   ({									\
>   	unsigned long __val;						\
> -	asm volatile("movq %%"#__xmm", %0" : "=r"(__val) : : #__xmm);	\
> +	asm volatile("movq %%"#__xmm", %0" : "=r"(__val));		\
>   	__val;								\
>   })
>   
> 

Queued, thnaks.

Paolo


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

end of thread, other threads:[~2021-09-28 15:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-27 22:36 [PATCH] selftests: KVM: Don't clobber XMM register when read Oliver Upton
2021-09-28 15:31 ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox