]> git.baikalelectronics.ru Git - kernel.git/commitdiff
selftests: KVM: Don't clobber XMM register when read
authorOliver Upton <oupton@google.com>
Mon, 27 Sep 2021 22:36:21 +0000 (22:36 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 28 Sep 2021 15:31:29 +0000 (11:31 -0400)
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>
Message-Id: <20210927223621.50178-1-oupton@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/include/x86_64/processor.h

index eba8bd08293e7f1a57e4cb9b73e02ce6134347c4..05e65ca1c30cda841a66b9ee7886b99656c070bf 100644 (file)
@@ -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;                                                          \
 })