kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH] x86: remove memory constraint from "mov" instruction
@ 2019-09-09 21:19 Bill Wendling
  2019-09-10 16:44 ` Jim Mattson
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Bill Wendling @ 2019-09-09 21:19 UTC (permalink / raw)
  To: kvm

The "mov" instruction to get the error code shouldn't move into a memory
location. Don't allow the compiler to make this decision. Instead
specify that only a register is appropriate here.

Signed-off-by: Bill Wendling <morbo@google.com>
---
 lib/x86/desc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/x86/desc.c b/lib/x86/desc.c
index 5f37cef..451f504 100644
--- a/lib/x86/desc.c
+++ b/lib/x86/desc.c
@@ -263,7 +263,7 @@ unsigned exception_error_code(void)
 {
     unsigned short error_code;

-    asm("mov %%gs:6, %0" : "=rm"(error_code));
+    asm("mov %%gs:6, %0" : "=r"(error_code));
     return error_code;
 }

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

end of thread, other threads:[~2019-09-24 14:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-09 21:19 [kvm-unit-tests PATCH] x86: remove memory constraint from "mov" instruction Bill Wendling
2019-09-10 16:44 ` Jim Mattson
2019-09-11 19:08 ` Sean Christopherson
2019-09-11 22:35   ` Bill Wendling
2019-09-12 20:59     ` [PATCH] " Bill Wendling
2019-09-19 21:44       ` Sean Christopherson
2019-09-24 14:02 ` [kvm-unit-tests PATCH] " Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).