From: Arnd Bergmann <arnd@arndb.de>
To: kvm-devel@lists.sourceforge.net
Cc: Avi Kivity <avi@qumranet.com>,
akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [kvm-devel] [PATCH] KVM: Avoid using vmx instruction directly
Date: Thu, 9 Nov 2006 14:29:41 +0100 [thread overview]
Message-ID: <200611091429.42040.arnd@arndb.de> (raw)
In-Reply-To: <20061109110852.A6B712500F7@cleopatra.q>
On Thursday 09 November 2006 12:08, Avi Kivity wrote:
> Index: linux-2.6/drivers/kvm/kvm_main.c
> ===================================================================
> --- linux-2.6.orig/drivers/kvm/kvm_main.c
> +++ linux-2.6/drivers/kvm/kvm_main.c
> @@ -369,8 +369,8 @@ static void vmcs_clear(struct vmcs *vmcs
> u64 phys_addr = __pa(vmcs);
> u8 error;
>
> - asm volatile ("vmclear %1; setna %0"
> - : "=m"(error) : "m"(phys_addr) : "cc", "memory" );
> + asm volatile (ASM_VMX_VMCLEAR_RAX "; setna %0"
> + : "=g"(error) : "a"(&phys_addr) : "cc", "memory" );
> if (error)
> printk(KERN_ERR "kvm: vmclear fail: %p/%llx\n",
> vmcs, phys_addr);
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)'?
Arnd <><
next prev parent reply other threads:[~2006-11-09 13:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-09 11:08 Avi Kivity
2006-11-09 13:29 ` Arnd Bergmann [this message]
2006-11-09 13:36 ` [kvm-devel] " Avi Kivity
2006-11-09 14:42 ` Arnd Bergmann
2006-11-09 14:52 ` Avi Kivity
2006-11-09 16:37 ` Arnd Bergmann
2006-11-09 16:51 ` Avi Kivity
2006-11-09 23:39 ` Jeremy Fitzhardinge
2006-11-10 12:46 ` Martin Schwidefsky
2006-11-10 19:38 ` Jeremy Fitzhardinge
2006-11-21 18:35 ` H. Peter Anvin
2006-11-21 19:41 ` Avi Kivity
2006-11-21 20:50 ` Jeremy Fitzhardinge
2006-11-22 6:42 ` Avi Kivity
2006-11-22 9:10 ` Jeremy Fitzhardinge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200611091429.42040.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=akpm@osdl.org \
--cc=avi@qumranet.com \
--cc=kvm-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome