Re: [kvm-devel] [PATCH] KVM simplified virtio balloon driver

2008-01-18 Thread Avi Kivity
Anthony Liguori wrote: It would be very useful too to write vb->num_pages into the config space whenever it was updated. This way, the host can easily keep track of where the guest is at in terms of ballooning. OTOH it's currently pretty obvious (and usually fatal) if the gue

Re: [kvm-devel] [PATCH] KVM simplified virtio balloon driver

2008-01-18 Thread Avi Kivity
Rusty Russell wrote: After discussions with Anthony Liguori, it seems that the virtio balloon can be made even simpler. Here's my attempt. Since the balloon requires Guest cooperation anyway, there seems little reason to force it to tell the Host when it wants to reuse a page. It can simply fa

Re: [PATCH 3/3] Makes lguest's irq handler typesafe

2008-01-18 Thread Tejun Heo
Hello, Rusty Russell wrote: > There are three possibilities: (1) force everyone to use void *, (2) > force > everyone to be type-correct, (3) allow both with some tricks. Currently > we're on (1). For kthread, with only dozens of users, I chose (2) (very > simple, easy to understand). I

Re: [PATCH 3/3] Makes lguest's irq handler typesafe

2008-01-18 Thread Rusty Russell
On Saturday 19 January 2008 12:44:52 Tejun Heo wrote: > Tejun Heo wrote: > > so I think the question is "do we want to change all callbacks to > > take native pointer type instead of void pointer?". > > Lemme clarity myself a bit. I'm not saying that we should convert all > at once or literally ev

[PATCH 5/6] export check_tsc_unstable

2008-01-18 Thread Glauber de Oliveira Costa
Exporrt check_tsc_unstable function as GPL symbol. lguest is a user of it. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/tsc_64.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/arch/x86/kernel/tsc_64.c b/arch/x86/kernel/tsc_64.c inde

[PATCH 6/6] export __supported_pte_mask

2008-01-18 Thread Glauber de Oliveira Costa
export __supported_pte_mask variable as GPL symbol. lguest is a user of it. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/setup64.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/setup64.c b/arch/x86/kernel/setup64.c in

Re: [PATCH 3/3] Makes lguest's irq handler typesafe

2008-01-18 Thread Tejun Heo
Hello, Rusty. Rusty Russell wrote: > On Saturday 19 January 2008 10:12:33 Tejun Heo wrote: >> Type safety is good but I doubt this would be worth the complexity. It >> has some benefits but there's much larger benefit in keeping things in >> straight C. People know that functions take fixed type

[PATCH 4/6] use __PAGE_KERNEL instead of _PAGE_KERNEL

2008-01-18 Thread Glauber de Oliveira Costa
x86_64 don't expose the intermediate representation with one underline, _PAGE_KERNEL, just the double-underlined one. Use it, to get a common ground between 32 and 64-bit Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- drivers/lguest/page_tables.c |4 ++-- 1 files changed, 2

[PATCH 3/6] explicitly use sched.h include

2008-01-18 Thread Glauber de Oliveira Costa
This patch adds the sched.h header explicitly to lguest_user file, and avoid depending on it being included somewhere else. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- drivers/lguest/lguest_user.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/driver

[PATCH 2/6] explicitly use hrtimer.h include

2008-01-18 Thread Glauber de Oliveira Costa
This patch adds the hrtimer.h header explicitly to lg.h file, and avoid depending on it being included somewhere else. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- drivers/lguest/lg.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/lguest/lg.h

[PATCH 1/6] explicitly use ktime.h include

2008-01-18 Thread Glauber de Oliveira Costa
This patch adds the ktime.h header explicitly to hypercalls file, and avoid depending on it being included somewhere else. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- drivers/lguest/hypercalls.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/

Re: [PATCH 3/3] Makes lguest's irq handler typesafe

2008-01-18 Thread Rusty Russell
On Saturday 19 January 2008 10:12:33 Tejun Heo wrote: > Type safety is good but I doubt this would be worth the complexity. It > has some benefits but there's much larger benefit in keeping things in > straight C. People know that functions take fixed types and are also > familiar with the conven

Re: [PATCH 0/10] Tree fixes for PARAVIRT

2008-01-18 Thread Glauber de Oliveira Costa
On Jan 18, 2008 8:02 PM, Ingo Molnar <[EMAIL PROTECTED]> wrote: > > * Zachary Amsden <[EMAIL PROTECTED]> wrote: > > > > but in exchange you broke all of 32-bit with CONFIG_PARAVIRT=y. > > > Which means you did not even build-test it on 32-bit, let alone boot > > > test it... > > > > Why are we rush

[PATCH 0/6] lguest patches for compiling x86_64

2008-01-18 Thread Glauber de Oliveira Costa
Right now, I have lguest in-tree module compiling on x86_64. It's not yet on a sendable state, since the module itself isn't loading. However, this subset of the series is pretty straightforward, and I'm sending it now aiming at reducing the delta size in the future ;-) Have fun, __

Re: [PATCH 1/10] add missing parameter for lookup_address

2008-01-18 Thread Andi Kleen
On Fri, Jan 18, 2008 at 12:26:13PM -0800, Chris Wright wrote: > * Glauber de Oliveira Costa ([EMAIL PROTECTED]) wrote: > > lookup_address() receives two parameters, but efi_64.c call > > is passing only one. It's actually preventing the tree from compiling > > > > Signed-off-by: Glauber de Oliveir

Re: [PATCH 3/3] Makes lguest's irq handler typesafe

2008-01-18 Thread Tejun Heo
Tejun Heo wrote: > so I think the question is "do we want to change all callbacks to > take native pointer type instead of void pointer?". Lemme clarity myself a bit. I'm not saying that we should convert all at once or literally every callback should be converted. What I'm saying is whether we'

Re: [PATCH 3/3] Makes lguest's irq handler typesafe

2008-01-18 Thread Tejun Heo
Rusty Russell wrote: > Just a trivial example. > --- > drivers/lguest/lguest_device.c |3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff -r 00ab7672f658 drivers/lguest/lguest_device.c > --- a/drivers/lguest/lguest_device.c Thu Jan 17 16:54:00 2008 +1100 > +++ b/drivers/lguest/

Re: [PATCH 9/10] provide __parainstructions section

2008-01-18 Thread Jeremy Fitzhardinge
Sam Ravnborg wrote: Are we going to see this for other archs than just x86? If so then please add this to include/asm-generic/vmlinux.lds.h In theory other architectures could use a similar mechanism, but for now its x86 specific. J ___ Virtu

Re: [PATCH 0/10] Tree fixes for PARAVIRT

2008-01-18 Thread Jeremy Fitzhardinge
Zachary Amsden wrote: Why are we rushing so much to do 64-bit paravirt that we are breaking working configurations? If the developement is going to be this chaotic, it should be done and tested out of tree until it can stabilize. x86.git is out of the mainline tree, and it seems to be worki

Re: [PATCH 3/3] Makes lguest's irq handler typesafe

2008-01-18 Thread Rusty Russell
On Saturday 19 January 2008 07:45:41 Jeff Garzik wrote: > Rusty Russell wrote: > > -static irqreturn_t lguest_interrupt(int irq, void *_vq) > > +static irqreturn_t lguest_interrupt(int irq, struct virtqueue *vq) > > { > > - struct virtqueue *vq = _vq; > > struct lguest_device_desc *desc = to

Re: [PATCH 3/3] Makes lguest's irq handler typesafe

2008-01-18 Thread Jeff Garzik
Rusty Russell wrote: Just a trivial example. --- drivers/lguest/lguest_device.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff -r 00ab7672f658 drivers/lguest/lguest_device.c --- a/drivers/lguest/lguest_device.cThu Jan 17 16:54:00 2008 +1100 +++ b/drivers/lguest/lguest_devic

Re: [PATCH 2/3] Make IRQ handlers typesafe.

2008-01-18 Thread Jeff Garzik
Rusty Russell wrote: This patch lets interrupt handler functions have their natural type (ie. exactly match the data pointer type); for transition it allows the old irq_handler_t type as well. To do this it uses a gcc extension, cast-to-union, which allows a type to be cast to any type within th

Re: [PATCH 0/10] Tree fixes for PARAVIRT

2008-01-18 Thread Ingo Molnar
* Zachary Amsden <[EMAIL PROTECTED]> wrote: > > but in exchange you broke all of 32-bit with CONFIG_PARAVIRT=y. > > Which means you did not even build-test it on 32-bit, let alone boot > > test it... > > Why are we rushing so much to do 64-bit paravirt that we are breaking > working configura

Re: [PATCH 0/10] Tree fixes for PARAVIRT

2008-01-18 Thread Zachary Amsden
On Fri, 2008-01-18 at 22:37 +0100, Ingo Molnar wrote: > * Ingo Molnar <[EMAIL PROTECTED]> wrote: > > > > The first fix is not even specific for PARAVIRT, and it's actually > > > preventing the whole tree from booting. > > > > on CONFIG_EFI, indeed :) > > but in exchange you broke all of 32-bit

Re: [PATCH 0/10] Tree fixes for PARAVIRT

2008-01-18 Thread Ingo Molnar
* Ingo Molnar <[EMAIL PROTECTED]> wrote: > > The first fix is not even specific for PARAVIRT, and it's actually > > preventing the whole tree from booting. > > on CONFIG_EFI, indeed :) but in exchange you broke all of 32-bit with CONFIG_PARAVIRT=y. Which means you did not even build-test it o

Re: [PATCH 9/10] provide __parainstructions section

2008-01-18 Thread Sam Ravnborg
On Fri, Jan 18, 2008 at 03:20:24PM -0200, Glauber de Oliveira Costa wrote: > This patch adds the __parainstructions section to vmlinux.lds.S. > It's needed for the patching system. > > Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> > --- > arch/x86/kernel/vmlinux_64.lds.S |8 +++

Re: [PATCH 0/10] Tree fixes for PARAVIRT

2008-01-18 Thread Ingo Molnar
* Glauber de Oliveira Costa <[EMAIL PROTECTED]> wrote: > > This small series provides some more fixes towards the goal to have > the PARAVIRT selectable for x86_64. After that, just some more small > steps are needed. thanks, applied. > The first fix is not even specific for PARAVIRT, and it

[PATCH 3/3] Makes lguest's irq handler typesafe

2008-01-18 Thread Rusty Russell
Just a trivial example. --- drivers/lguest/lguest_device.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff -r 00ab7672f658 drivers/lguest/lguest_device.c --- a/drivers/lguest/lguest_device.cThu Jan 17 16:54:00 2008 +1100 +++ b/drivers/lguest/lguest_device.cThu Jan 17 16:59

Re: [PATCH 1/10] add missing parameter for lookup_address

2008-01-18 Thread Chris Wright
* Glauber de Oliveira Costa ([EMAIL PROTECTED]) wrote: > lookup_address() receives two parameters, but efi_64.c call > is passing only one. It's actually preventing the tree from compiling > > Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Good catch, I know I don't test with CONFIG

[PATCH 2/3] Make IRQ handlers typesafe.

2008-01-18 Thread Rusty Russell
This patch lets interrupt handler functions have their natural type (ie. exactly match the data pointer type); for transition it allows the old irq_handler_t type as well. To do this it uses a gcc extension, cast-to-union, which allows a type to be cast to any type within the union. When used in

Re: [PATCH 10/10] change function orders in paravirt.h

2008-01-18 Thread Jeremy Fitzhardinge
Glauber de Oliveira Costa wrote: __pmd, pmd_val and set_pud are used before they are defined (as static) We move them a little up in the file, so it doesn't happen. Hm, in my original patches I put the #ifdef CONFIG_X86_PAE below the PAGETABLE_LEVELS section. Does that work? Or is that an

[PATCH 9/10] provide __parainstructions section

2008-01-18 Thread Glauber de Oliveira Costa
This patch adds the __parainstructions section to vmlinux.lds.S. It's needed for the patching system. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/vmlinux_64.lds.S |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/v

[PATCH 10/10] change function orders in paravirt.h

2008-01-18 Thread Glauber de Oliveira Costa
__pmd, pmd_val and set_pud are used before they are defined (as static) We move them a little up in the file, so it doesn't happen. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/paravirt.h | 84 ++-- 1 files changed, 42

[PATCH 3/10] provide a native_init_IRQ function to x86_64

2008-01-18 Thread Glauber de Oliveira Costa
x86_64 lacks a native_init_IRQ() function, so we turn the arch's init_IRQ() function into a native construct Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/i8259_64.c |4 +++- include/asm-x86/hw_irq_64.h |1 + 2 files changed, 4 insertions(+), 1 deletion

[PATCH 8/10] add asm_offset PARAVIRT constants

2008-01-18 Thread Glauber de Oliveira Costa
This patch adds the constant PARAVIRT needs in asm_offsets_64.c Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/asm-offsets_64.c | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/asm-offsets_64.c b/arch/x86/kern

[PATCH 6/10] provide read and write cr8 paravirt hooks

2008-01-18 Thread Glauber de Oliveira Costa
Since the cr8 manipulation functions ended up staying in the tree, they can't be defined just when PARAVIRT is off: In this patch, those functions are defined for the PARAVIRT case too. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/system.h | 30 ++

[PATCH 4/10] put generic mm_hooks include into PARAVIRT

2008-01-18 Thread Glauber de Oliveira Costa
With PARAVIRT, we actually have arch_{dup,exit}_mmap functions, so we can't include the generic header Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/mmu_context_64.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/asm-x86/mmu_co

[PATCH 5/10] puts read and write cr8 into pv_cpu_ops

2008-01-18 Thread Glauber de Oliveira Costa
This patch adds room for read and write_cr8 functions back in pv_cpu_ops struct Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/paravirt.h | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/include/asm-x86/paravirt.h b/include/

[PATCH 2/10] add stringify header

2008-01-18 Thread Glauber de Oliveira Costa
We use a __stringify construction at paravirt_patch_64.c. It's better practice to include the stringify header directly Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/paravirt_patch_64.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arc

[PATCH 0/10] Tree fixes for PARAVIRT

2008-01-18 Thread Glauber de Oliveira Costa
Hi, This small series provides some more fixes towards the goal to have the PARAVIRT selectable for x86_64. After that, just some more small steps are needed. The first fix is not even specific for PARAVIRT, and it's actually preventing the whole tree from booting. _

[PATCH 1/10] add missing parameter for lookup_address

2008-01-18 Thread Glauber de Oliveira Costa
lookup_address() receives two parameters, but efi_64.c call is passing only one. It's actually preventing the tree from compiling Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/efi_64.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/ar

[PATCH 7/10] fill pv_cpu_ops structure with cr8 fields

2008-01-18 Thread Glauber de Oliveira Costa
This patch fills in the read and write cr8 fields with their native version Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/paravirt.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt