ia64/xen-unstable

changeset 10364:34ff26fb2240

[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 <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Mon Jun 12 12:01:32 2006 +0100 (2006-06-12)
parents 9d717a4f3531
children c230dbe793d6
files xen/include/asm-x86/hvm/vmx/vmx.h
line diff
     1.1 --- a/xen/include/asm-x86/hvm/vmx/vmx.h	Mon Jun 12 10:09:44 2006 +0100
     1.2 +++ b/xen/include/asm-x86/hvm/vmx/vmx.h	Mon Jun 12 12:01:32 2006 +0100
     1.3 @@ -243,7 +243,7 @@ static always_inline int ___vmread(
     1.4                             /* CF==1 or ZF==1 --> rc = -1 */
     1.5                             "setna %b0 ; neg %0"
     1.6                             : "=q" (rc), "=c" (ecx)
     1.7 -                           : "a" (field)
     1.8 +                           : "0" (0), "a" (field)
     1.9                             : "memory");
    1.10  
    1.11      switch (size) {
    1.12 @@ -314,7 +314,7 @@ static inline int __vmwrite (unsigned lo
    1.13                             /* CF==1 or ZF==1 --> rc = -1 */
    1.14                             "setna %b0 ; neg %0"
    1.15                             : "=q" (rc)
    1.16 -                           : "a" (field) , "c" (value)
    1.17 +                           : "0" (0), "a" (field) , "c" (value)
    1.18                             : "memory");
    1.19  
    1.20      switch(field) {
    1.21 @@ -367,7 +367,7 @@ static inline int __vmxon (u64 addr)
    1.22                             /* CF==1 or ZF==1 --> rc = -1 */
    1.23                             "setna %b0 ; neg %0"
    1.24                             : "=q" (rc)
    1.25 -                           : "a" (&addr) 
    1.26 +                           : "0" (0), "a" (&addr) 
    1.27                             : "memory");
    1.28  
    1.29      return rc;