[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 2/2] VMX: drop memory clobbers from vmread/vmwrite wrappers



On Mon, Sep 16, 2013 at 4:07 AM, Jan Beulich <JBeulich@xxxxxxxx> wrote:
>
> All effects are properly being described by the asm() constraints.
>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>
> --- a/xen/include/asm-x86/hvm/vmx/vmx.h
> +++ b/xen/include/asm-x86/hvm/vmx/vmx.h
> @@ -336,12 +336,11 @@ static inline void __vmread(unsigned lon
>                     UNLIKELY_END_SECTION
>  #ifdef HAVE_GAS_VMX
>                     : "=rm" (*value)
> -                   : "r" (field)
> +                   : "r" (field));
>  #else
>                     : "=c" (*value)
> -                   : "a" (field)
> +                   : "a" (field));
>  #endif
> -                   : "memory");
>  }
>
>  static inline void __vmwrite(unsigned long field, unsigned long value)
> @@ -358,11 +357,10 @@ static inline void __vmwrite(unsigned lo
>                     UNLIKELY_END_SECTION
>                     :
>  #ifdef HAVE_GAS_VMX
> -                   : "r" (field) , "rm" (value)
> +                   : "r" (field) , "rm" (value));
>  #else
> -                   : "a" (field) , "c" (value)
> +                   : "a" (field) , "c" (value));
>  #endif
> -                   : "memory");
>  }
>
>  static inline bool_t __vmread_safe(unsigned long field, unsigned long *value)
> @@ -379,12 +377,11 @@ static inline bool_t __vmread_safe(unsig
>                     "setnbe %0"
>  #ifdef HAVE_GAS_VMX
>                     : "=qm" (okay), "=rm" (*value)
> -                   : "r" (field)
> +                   : "r" (field));
>  #else
>                     : "=qm" (okay), "=c" (*value)
> -                   : "a" (field)
> +                   : "a" (field));
>  #endif
> -                   : "memory");
>
>      return okay;
>  }
>
>
>

Acked-by: Jun Nakajima <jun.nakajima@xxxxxxxxx>

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.