From: kaf24@firebug.cl.cam.ac.uk Date: Mon, 12 Jun 2006 11:01:32 +0000 (+0100) Subject: [HVM][VMX] Fix error-detection inline asm code. Zero word-sized X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15972^2~9 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=2965c646ee2d9d54a3f9c08360d0b1f28ec0f6d3;p=xen.git [HVM][VMX] Fix error-detection inline asm code. Zero word-sized register before executing SETNA instruction which updates bottom byte. Signed-off-by: Keir Fraser --- diff --git a/xen/include/asm-x86/hvm/vmx/vmx.h b/xen/include/asm-x86/hvm/vmx/vmx.h index 444751ec6e..81637d1a17 100644 --- a/xen/include/asm-x86/hvm/vmx/vmx.h +++ b/xen/include/asm-x86/hvm/vmx/vmx.h @@ -243,7 +243,7 @@ static always_inline int ___vmread( /* CF==1 or ZF==1 --> rc = -1 */ "setna %b0 ; neg %0" : "=q" (rc), "=c" (ecx) - : "a" (field) + : "0" (0), "a" (field) : "memory"); switch (size) { @@ -314,7 +314,7 @@ static inline int __vmwrite (unsigned long field, unsigned long value) /* CF==1 or ZF==1 --> rc = -1 */ "setna %b0 ; neg %0" : "=q" (rc) - : "a" (field) , "c" (value) + : "0" (0), "a" (field) , "c" (value) : "memory"); switch(field) { @@ -367,7 +367,7 @@ static inline int __vmxon (u64 addr) /* CF==1 or ZF==1 --> rc = -1 */ "setna %b0 ; neg %0" : "=q" (rc) - : "a" (&addr) + : "0" (0), "a" (&addr) : "memory"); return rc;