WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] apic: clean up msr handling

To: Jan Beulich <JBeulich@xxxxxxxxxx>, Christoph Egger <Christoph.Egger@xxxxxxx>
Subject: Re: [Xen-devel] [PATCH] apic: clean up msr handling
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Fri, 11 Jun 2010 14:49:39 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 11 Jun 2010 06:50:31 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4C1259000200007800006290@xxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcsJa9pfGqJR9gfQSi6td7RyLUmovQAARUou
Thread-topic: [Xen-devel] [PATCH] apic: clean up msr handling
User-agent: Microsoft-Entourage/12.24.0.100205
On 11/06/2010 14:40, "Jan Beulich" <JBeulich@xxxxxxxxxx> wrote:

>>>> On 11.06.10 at 15:22, Christoph Egger <Christoph.Egger@xxxxxxx> wrote:
>> -static inline void write_efer(u64 val)
>> -{
>> -    this_cpu(efer) = val;
>> -    wrmsrl(MSR_EFER, val);
>> -}
>> +#define write_efer(val) do { \
>> +    this_cpu(efer) = val; \
>> +    wrmsrl(MSR_EFER, val); \
>> +} while(0)
> 
> This isn't a good change imo: You now require all current and future
> users of write_efer() to not pass expressions with side effects.
> 
> Also, is doesn't really look like a cleanup to me, more like a
> complication.

Hm, I didn't spot that one. It's odd since I thought Christoph was changign
macros into inlien functions where possible. Maybe he just changes in
whichever direction makes his patch bigger? ;-)

 -- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel