Re: [kvm-devel] [PATCH 7/24] consolidate msr.h

2007-11-20 Thread Rusty Russell
On Tuesday 20 November 2007 17:16:45 Steven Rostedt wrote: On Tue, 20 Nov 2007, Ingo Molnar wrote: i dont think there's ever any true need (and good cause) to force integer type casts like that at the callee site. Unless you mean we should do something like this: static inline void

Re: [kvm-devel] [PATCH 7/24] consolidate msr.h

2007-11-19 Thread Steven Rostedt
On Mon, 19 Nov 2007, Bastian Blank wrote: On Fri, Nov 09, 2007 at 04:42:48PM -0200, Glauber de Oliveira Costa wrote: - wrmsrl(MSR_CSTAR, ia32_cstar_target); + wrmsrl(MSR_CSTAR, (u64)ia32_cstar_target); Hmm, why do you add explicit casts? The compiler should convert that correctly on

Re: [kvm-devel] [PATCH 7/24] consolidate msr.h

2007-11-19 Thread Ingo Molnar
* Steven Rostedt [EMAIL PROTECTED] wrote: On Fri, Nov 09, 2007 at 04:42:48PM -0200, Glauber de Oliveira Costa wrote: - wrmsrl(MSR_CSTAR, ia32_cstar_target); + wrmsrl(MSR_CSTAR, (u64)ia32_cstar_target); Hmm, why do you add explicit casts? The compiler should convert that correctly

Re: [kvm-devel] [PATCH 7/24] consolidate msr.h

2007-11-19 Thread Steven Rostedt
On Tue, 20 Nov 2007, Ingo Molnar wrote: i dont think there's ever any true need (and good cause) to force integer type casts like that at the callee site. Unless you mean we should do something like this: static inline void __wrmsrl(unsigned int msr, unsigned long long val); #define

Re: [kvm-devel] [PATCH 7/24] consolidate msr.h

2007-11-19 Thread Steven Rostedt
On Tue, 20 Nov 2007, Ingo Molnar wrote: * Steven Rostedt [EMAIL PROTECTED] wrote: With PVOPS on it gives compiler warnings without that explict cast. Without looking at the code, IIRC with non-PVOPS it is a macro directly into asm, so it didn't matter what the cast was. But with PVOPS

[kvm-devel] [PATCH 7/24] consolidate msr.h

2007-11-09 Thread Glauber de Oliveira Costa
This patch goes one step forward in consolidating the msr.h header. It shares code between i386 and x86_64, instead of duplicating the code for tsc reading, msr reading/writing, etc. Signed-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED] Signed-off-by: Steven Rostedt [EMAIL PROTECTED]