From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH] KVM: Avoid using vmx instruction directly Date: Thu, 9 Nov 2006 15:42:30 +0100 Message-ID: <200611091542.31101.arnd@arndb.de> References: <20061109110852.A6B712500F7@cleopatra.q> <200611091429.42040.arnd@arndb.de> <45532EE3.4000104@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, akpm-3NddpPZAyC0@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Return-path: To: Avi Kivity In-Reply-To: <45532EE3.4000104-atKUWr5tajBWk0Htik3J/w@public.gmane.org> Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org On Thursday 09 November 2006 14:36, Avi Kivity wrote: > > > > > I'm not an expert on inline assembly, but don't you need an extra > > '"m" (phys_addr)' to make sure that gcc actually puts the variable > > on the stack instead of passing a NULL pointer as '"a"(&phys_addr)'? > > Taking a variable's address should force its contents into memory (like > calling an uninlined function with &var). No it doesn't. You're not telling gcc that the inline assembly cares about the contents of the variable, so it could be a reference to a stack slot while the contents are still in a register. Or gcc might move the assignment of phys_addr to after the inline assembly. Arnd <>< ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642