public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@qumranet.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: kvm-devel@lists.sourceforge.net, akpm@osdl.org,
	linux-kernel@vger.kernel.org
Subject: Re: [kvm-devel] [PATCH] KVM: Avoid using vmx instruction directly
Date: Thu, 09 Nov 2006 18:51:50 +0200	[thread overview]
Message-ID: <45535CA6.4000206@qumranet.com> (raw)
In-Reply-To: <200611091737.48801.arnd@arndb.de>

Arnd Bergmann wrote:
> On Thursday 09 November 2006 15:52, Avi Kivity wrote:
>   
>> Wouldn't that make inline assembly useless?  Suppose the contents is 
>> itself a pointer.  What about the pointed-to contents?
>>
>> e.g.
>>
>>     int x = 3;
>>     int *y = &x;
>>     int z;
>>
>>     asm ("mov %1, %%rax; movl (%%rax), %0" : "=r"(z) : "g"(y) : "rax");
>>     assert(z == 3);
>>     
>
> Same here, you need to tell gcc what is really accessed, like 
>
> asm ("mov %1, %%rax; movl (%%rax), %0" : "=r"(z) : "g"(y), "m"(*y) : "rax");
>
> I know that the s390 kernel developers have hit that problem
> frequently with inline assemblies. It may be that it's harder
> to hit on x86, because there are fewer registers available and
> data therefore tends to spill to the stack.
>   

I'll update my tree to reflect this.  Thanks.

-- 
error compiling committee.c: too many arguments to function

  reply	other threads:[~2006-11-09 16:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-09 11:08 [PATCH] KVM: Avoid using vmx instruction directly Avi Kivity
2006-11-09 13:29 ` Arnd Bergmann
     [not found]   ` <200611091429.42040.arnd-r2nGTMty4D4@public.gmane.org>
2006-11-09 13:36     ` Avi Kivity
     [not found]       ` <45532EE3.4000104-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2006-11-09 14:42         ` Arnd Bergmann
2006-11-09 14:52           ` [kvm-devel] " Avi Kivity
2006-11-09 16:37             ` Arnd Bergmann
2006-11-09 16:51               ` Avi Kivity [this message]
2006-11-09 23:39             ` Jeremy Fitzhardinge
2006-11-10 12:46               ` Martin Schwidefsky
     [not found]                 ` <6e0cfd1d0611100446j77a27b29jc23f76a515451377-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2006-11-10 19:38                   ` Jeremy Fitzhardinge
     [not found]               ` <4553BC18.6090207-TSDbQ3PG+2Y@public.gmane.org>
2006-11-21 18:35                 ` H. Peter Anvin
     [not found]                   ` <45634704.8020407-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2006-11-21 19:41                     ` Avi Kivity
2006-11-21 20:50                     ` Jeremy Fitzhardinge
     [not found]                       ` <4563667B.2060209-TSDbQ3PG+2Y@public.gmane.org>
2006-11-22  6:42                         ` Avi Kivity
     [not found]                           ` <4563F158.3060209-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
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=45535CA6.4000206@qumranet.com \
    --to=avi@qumranet.com \
    --cc=akpm@osdl.org \
    --cc=arnd@arndb.de \
    --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