From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Fitzhardinge Subject: Re: [kvm-devel] [PATCH] KVM: Avoid using vmx instruction directly Date: Thu, 09 Nov 2006 15:39:04 -0800 Message-ID: <4553BC18.6090207@goop.org> References: <20061109110852.A6B712500F7@cleopatra.q> <200611091429.42040.arnd@arndb.de> <45532EE3.4000104@qumranet.com> <200611091542.31101.arnd@arndb.de> <455340B8.2080206@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Arnd Bergmann , kvm-devel@lists.sourceforge.net, akpm@osdl.org, linux-kernel@vger.kernel.org Return-path: To: Avi Kivity In-Reply-To: <455340B8.2080206@qumranet.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org Avi Kivity wrote: >> Or gcc >> might move the assignment of phys_addr to after the inline assembly. >> > "asm volatile" prevents that (and I'm not 100% sure it's necessary). No, it won't necessarily. "asm volatile" simply forces gcc to emit the assembler, even if it thinks its output doesn't get used. It makes no ordering guarantees with respect to other code (or even other "asm volatiles"). The "memory" clobbers should fix the ordering of the asms though. J