Re: [Xen-devel] Re: Next steps with pv_ops for Xen

2007-12-04 Thread Derek Murray
Gerd Hoffmann wrote: On this point I completely agree with you! If anyone has any less radical suggestions, then I'd be delighted to refactor the gntdev code to use them. However, I'm not currently aware of any alternative that maintains robustness to process crashes. Oh, for me it isn't

Re: [Xen-devel] Re: Next steps with pv_ops for Xen

2007-12-04 Thread Gerd Hoffmann
Derek Murray wrote: Gerd Hoffmann wrote: Oh, for me it isn't robust at all, it crashes on the first munmap syscall. It is the Fedora 8 kernel. See attachment. Didn't try xensource 2.6.18 yet. My gut feeling is that something changed in mm between 2.6.18 and 2.6.21, but that seems like a

[PATCH 3/10] allow sched clock to be overridden by paravirt

2007-12-04 Thread Glauber de Oliveira Costa
This patch turns the sched_clock into native_sched_clock. sched clock becomes a weak symbol, which can then give its place to a paravirt definition. Signed-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED] --- arch/x86/kernel/tsc_64.c | 15 ++- 1 files changed, 14 insertions(+),

[PATCH 2/10] unify msr smp funcs

2007-12-04 Thread Glauber de Oliveira Costa
The functions under #ifdef CONFIG_SMP in msr.h are the same for both x86_64 and i386, and this patches removes one of them, putting them in a single location Signed-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED] --- include/asm-x86/msr.h | 33 +++-- 1 files

[PATCH 6/10] introduce native_read_tscp

2007-12-04 Thread Glauber de Oliveira Costa
Targetting paravirt, this patch introduces native_read_tscp, in place of rdtscp() macro. When in a paravirt guest, this will involve a function call, and thus, cannot be done in the vdso area. These users then have to call the native version directly Signed-off-by: Glauber de Oliveira Costa

[PATCH 5/10] unify cpuid functions

2007-12-04 Thread Glauber de Oliveira Costa
cpuid is not very different between i386 and x86_64. We move away the x86_64 version from msr.h, and unify them at processor.h, where they belong. cpuid() paravirt then comes for free. Signed-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED] --- include/asm-x86/msr.h | 67

[PATCH 7/10] change rdpmc interface

2007-12-04 Thread Glauber de Oliveira Costa
the rdpmc instruction gets a counter argument in rcx. However, the i386 version was ignoring it. To make both x86_64 and i386 versions the same, as well as to comply with the instruction semantics, this parameter is added in the i386 version Signed-off-by: Glauber de Oliveira Costa [EMAIL

[PATCH 10/10] integrate i386 and x86_64 code in msr.h

2007-12-04 Thread Glauber de Oliveira Costa
This patches proceeds with the integration of msr.h, making the code unified, instead of having a version for each architecture. We stick with the native_* functions, and then paravirt comes for free. Signed-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED] --- include/asm-x86/msr.h | 161

[PATCH 1/10] Wipe out traditional opt from x86_64 Makefile

2007-12-04 Thread Glauber de Oliveira Costa
Among other things, using -traditional as a gcc option stops us from using macro token pasting, which is a feature we heavily rely on. There was still a use of -traditional in arch/x86/kernel/Makefile_64, which this patch removes. I don't see any problems building kernels in my x86_64 box

Re: [PATCH 0/10] Integrate msr.h

2007-12-04 Thread Ingo Molnar
* Glauber de Oliveira Costa [EMAIL PROTECTED] wrote: Hello, This series of patches integrates msr.h header. What it really does, is a series of steps to allow us to get rid of duplicate code between i386 and x86_64 versions With this done, achieving paravirt for x86_64 gets really

Re: [PATCH 0/10] Integrate msr.h

2007-12-04 Thread Glauber de Oliveira Costa
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ingo Molnar escreveu: * Glauber de Oliveira Costa [EMAIL PROTECTED] wrote: Hello, This series of patches integrates msr.h header. What it really does, is a series of steps to allow us to get rid of duplicate code between i386 and x86_64

[PATCH 0/10 - V2] msr.h integration - fixups

2007-12-04 Thread Glauber de Oliveira Costa
There's really nothing new here. No changes at all, just fixing errors raised by checkpatch, at ingo's request. ___ Virtualization mailing list Virtualization@lists.linux-foundation.org

[PATCH 6/10] introduce native_read_tscp

2007-12-04 Thread Glauber de Oliveira Costa
Targetting paravirt, this patch introduces native_read_tscp, in place of rdtscp() macro. When in a paravirt guest, this will involve a function call, and thus, cannot be done in the vdso area. These users then have to call the native version directly Signed-off-by: Glauber de Oliveira Costa

[PATCH 0/8] Integrate system.h

2007-12-04 Thread Glauber de Oliveira Costa
Hi, In the same lines of the msr.h integration, here it goes a series for system.h. Again, after the headers are turned into one, the paravirt pieces related to system.h comes for free. ___ Virtualization mailing list

[PATCH 10/10] integrate i386 and x86_64 code in msr.h

2007-12-04 Thread Glauber de Oliveira Costa
This patches proceeds with the integration of msr.h, making the code unified, instead of having a version for each architecture. We stick with the native_* functions, and then paravirt comes for free. Signed-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED] --- include/asm-x86/msr.h | 161

[PATCH 7/10] change rdpmc interface

2007-12-04 Thread Glauber de Oliveira Costa
the rdpmc instruction gets a counter argument in rcx. However, the i386 version was ignoring it. To make both x86_64 and i386 versions the same, as well as to comply with the instruction semantics, this parameter is added in the i386 version Signed-off-by: Glauber de Oliveira Costa [EMAIL

[PATCH 3/8] unify load_segment macro

2007-12-04 Thread Glauber de Oliveira Costa
This patch unifies the load_segment() macro, making them equal in both x86_64 and i386 architectures. The common version goes to system.h, and the old are deleted. Signed-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED] --- include/asm-x86/system.h| 21 +

[PATCH 2/8] put together equal pieces of system.h

2007-12-04 Thread Glauber de Oliveira Costa
This patch puts together pieces of system_{32,64}.h that looks like the same. It's the first step towards integration of this file. Signed-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED] --- arch/x86/kernel/process_64.c |2 +- include/asm-x86/system.h | 70

[PATCH 4/8] unify paravirt parts of system.h

2007-12-04 Thread Glauber de Oliveira Costa
This patch moves the i386 control registers manipulation functions, wbinvd, and clts functions to system.h. They are essentially the same as in x86_64, except for the cr8 register, which we add. With this, system.h paravirt comes for free in x86_64. Signed-off-by: Glauber de Oliveira Costa

[PATCH 1/8] remove volatile keyword from clflush.

2007-12-04 Thread Glauber de Oliveira Costa
the p parameter is an explicit memory reference, and is enough to prevent gcc to being nasty here. The volatile seems completely not needed. Signed-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED] --- include/asm-x86/system_32.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-)

[PATCH 7/8] move switch_to macro to system.h

2007-12-04 Thread Glauber de Oliveira Costa
This patch moves the switch_to() macro to system.h As those macros are fundamentally different between i386 and x86_64, they are enclosed around an ifdef. Signed-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED] --- include/asm-x86/system.h| 61

[PATCH 8/10] change write msr functions interface

2007-12-04 Thread Glauber de Oliveira Costa
This patche changes the native_write_msr() and friends interface to explicitly take 2 32-bit registers instead of a 64-bit value. The change will ease the merge with 64-bit code. As the 64-bit value will be passed as two registers anyway in i386, the PVOP_CALL interface has to account for that and

Re: [PATCH 4/8] unify paravirt parts of system.h

2007-12-04 Thread Avi Kivity
Glauber de Oliveira Costa wrote: This patch moves the i386 control registers manipulation functions, wbinvd, and clts functions to system.h. They are essentially the same as in x86_64, except for the cr8 register, which we add. + +static inline unsigned long native_read_cr8(void) +{ +

Re: [Xen-devel] Re: Next steps with pv_ops for Xen

2007-12-04 Thread Gerd Hoffmann
Stephen C. Tweedie wrote: Hi, On Tue, 2007-12-04 at 13:01 +0100, Gerd Hoffmann wrote: Who uses the gntdev device right now? Good question! I'm aware of it being used in a few research projects, and it seems to work for them (though I think it is mostly used with the linux-2.6.18-xen

Re: [PATCH 0/10 - V2] msr.h integration - fixups

2007-12-04 Thread Ingo Molnar
* Glauber de Oliveira Costa [EMAIL PROTECTED] wrote: There's really nothing new here. No changes at all, just fixing errors raised by checkpatch, at ingo's request. thanks, i picked them up. Ingo ___ Virtualization mailing list

Re: [PATCH 3/10] allow sched clock to be overridden by paravirt

2007-12-04 Thread Andi Kleen
On Tue, Dec 04, 2007 at 09:09:57AM -0200, Glauber de Oliveira Costa wrote: This patch turns the sched_clock into native_sched_clock. sched clock becomes a weak symbol, which can then give its place to a paravirt definition. I ended up regretting that solution on i386, it would be better to

Re: [PATCH 4/8] unify paravirt parts of system.h

2007-12-04 Thread Denys Vlasenko
On Tuesday 04 December 2007 11:41, Glauber de Oliveira Costa wrote: On Dec 4, 2007 5:18 PM, Avi Kivity [EMAIL PROTECTED] wrote: There is no cr8 register on i386. This had better be protected by an #ifdef. Sure. I mentioned it in the changelog. I, however, am not sure If I agree it should