[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4C3EB3C7.90108@redhat.com>
Date: Thu, 15 Jul 2010 10:07:51 +0300
From: Avi Kivity <avi@...hat.com>
To: Zachary Amsden <zamsden@...hat.com>
CC: Jeremy Fitzhardinge <jeremy@...p.org>,
Glauber Costa <glommer@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
Thomas Gleixner <tglx@...utronix.de>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86: fix ordering constraints on crX read/writes
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists