From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH 2/2] VMX: drop memory clobbers from vmread/vmwrite wrappers Date: Mon, 16 Sep 2013 12:54:50 +0100 Message-ID: <5236F18A.6090609@citrix.com> References: <523701D802000078000F394E@nat28.tlf.novell.com> <5237028702000078000F3966@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1345713948028426571==" Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VLXOJ-00070L-9i for xen-devel@lists.xenproject.org; Mon, 16 Sep 2013 11:54:55 +0000 In-Reply-To: <5237028702000078000F3966@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: xen-devel , Eddie Dong , Jun Nakajima List-Id: xen-devel@lists.xenproject.org --===============1345713948028426571== Content-Type: multipart/alternative; boundary="------------020206060708030303050609" --------------020206060708030303050609 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit On 16/09/2013 12:07, Jan Beulich wrote: > All effects are properly being described by the asm() constraints. > > Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper > > --- 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; > } > > > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel --------------020206060708030303050609 Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit
On 16/09/2013 12:07, Jan Beulich wrote:
All effects are properly being described by the asm() constraints.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>


--- 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;
 }





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

--------------020206060708030303050609-- --===============1345713948028426571== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============1345713948028426571==--