linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Zachary Amsden <zamsden@redhat.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
	Glauber Costa <glommer@redhat.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86: fix ordering constraints on crX read/writes
Date: Thu, 15 Jul 2010 10:07:51 +0300	[thread overview]
Message-ID: <4C3EB3C7.90108@redhat.com> (raw)
In-Reply-To: <4C3E5637.4010300@redhat.com>

On 07/15/2010 03:28 AM, Zachary Amsden wrote:
>>   static inline void native_write_cr2(unsigned long val)
>>   {
>> -    asm volatile("mov %0,%%cr2": : "r" (val), "m" (__force_order));
>> +    asm volatile("mov %1,%%cr2": "+m" (__force_order) : "r" (val) : 
>> "memory");
>>   }
>
>
> You don't need the memory clobber there.  Technically, this should 
> never be used, however.

kvm writes cr2 in order to present the correct value to the guest.  It 
doesn't use native_write_cr2(), however.

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.


      parent reply	other threads:[~2010-07-15  7:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-14 22:12 [PATCH] x86: fix ordering constraints on crX read/writes Jeremy Fitzhardinge
2010-07-15  0:28 ` Zachary Amsden
2010-07-15  0:55   ` Jeremy Fitzhardinge
2010-07-15  1:00     ` Zachary Amsden
2010-07-15  1:29     ` H. Peter Anvin
2010-07-15 14:34       ` Jeremy Fitzhardinge
2010-07-15 18:54         ` H. Peter Anvin
2010-07-15 19:28           ` Jeremy Fitzhardinge
2010-07-15 19:36             ` H. Peter Anvin
2010-07-15 19:57               ` Jeremy Fitzhardinge
2010-07-15  7:07   ` Avi Kivity [this message]

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=4C3EB3C7.90108@redhat.com \
    --to=avi@redhat.com \
    --cc=glommer@redhat.com \
    --cc=hpa@zytor.com \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=zamsden@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).