[PATCH 0/4] Fix cpu hotplug - currently broken

2009-05-26 Thread Glauber Costa
Hello guys, This patchset has already been sent before, and now is sent again in a new version. It is refactored to account for the way the new code looks like, plus addressing a comment from Jan, that an apic function was called from common code. I've split it in four patches, for easiness of re

[PATCH 1/4] remove duplicated code.

2009-05-26 Thread Glauber Costa
This is a leftover from old days. There is already a call from this function in kvm_main_loop_cpu(), which is called unconditionally on the end of ap_main_loop. No need to duplicate. Signed-off-by: Glauber Costa --- qemu-kvm.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff

[PATCH 2/4] only execute lapic load when cpu is already initialized

2009-05-26 Thread Glauber Costa
rather than after, so nothing breaks, and we can keep the tree bisectable. Signed-off-by: Glauber Costa --- hw/apic.c | 21 +++-- qemu-kvm.c |5 + qemu-kvm.h |4 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/hw/apic.c b/hw/apic.c index 21aff15

[PATCH 3/4] move kvm_trim_features where it belongs.

2009-05-26 Thread Glauber Costa
We also kill the unused name argument. It would introduce an non-necessary depedency on code present at helper.c Signed-off-by: Glauber Costa --- qemu-kvm-x86.c | 23 +++ target-i386/helper.c | 29 - 2 files changed, 23 insertions(+), 29

[PATCH 4/4] make sure kvm_vpu_init is the last thing called in cpu initialization

2009-05-26 Thread Glauber Costa
first call will find the vcpu non initialized. Signed-off-by: Glauber Costa --- hw/pc.c |5 + qemu-kvm-x86.c |2 ++ target-i386/helper.c |2 -- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 9e99b7c..45de6d9 100644 --- a/hw

Re: [PATCH 0/4] Fix cpu hotplug - currently broken

2009-05-31 Thread Glauber Costa
On Sun, May 31, 2009 at 12:40:40PM +0300, Avi Kivity wrote: >> hope you like it. >> > > I did, so I applied it all. my man... -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/maj

[PATCH] clean up cpu hotplug code

2009-06-01 Thread Glauber Costa
There's nothing kvm specific in get_cpu function. Remove it from kvm ifdef. Buy us a cleaner code, and may help us with any attempt of integrating this on the future. Signed-off-by: Glauber Costa --- hw/acpi.c | 12 +++- 1 files changed, 3 insertions(+), 9 deletions(-) diff --

[PATCH] clean up cpu hotplug code

2009-06-01 Thread Glauber Costa
There's nothing kvm specific in get_cpu function. Remove it from kvm ifdef. Buy us a cleaner code, and may help us with any attempt of integrating this on the future. Signed-off-by: Glauber Costa --- hw/acpi.c | 12 +++- 1 files changed, 3 insertions(+), 9 deletions(-) diff --

[PATCH] provide a kvm-free pic implementation

2009-06-01 Thread Glauber Costa
igned-off-by: Glauber Costa --- hw/i8259.c | 210 hw/pc.c|7 ++- hw/pc.h|1 + 3 files changed, 134 insertions(+), 84 deletions(-) diff --git a/hw/i8259.c b/hw/i8259.c index bfc7fd9..132f294 100644 --- a/hw/i8259.c +++

[PATCH 0/4] Provide kvm-free implementations of apic/ioapic

2009-06-02 Thread Glauber Costa
In the same way as the previous i8259 patch, this patch cleans up the apic and ioapic code to provide an implementation that is kvm free. This reduces the impact of kvm on normal qemu. Also, provides a simpler code base for kvm devices. -- To unsubscribe from this list: send the line "unsubscrib

[PATCH 1/4] always halt non-bsp cpu.

2009-06-02 Thread Glauber Costa
This is not kvm specific, and should do fine in plain qemu Signed-off-by: Glauber Costa --- hw/apic.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/hw/apic.c b/hw/apic.c index 86aa6b6..2eddba0 100644 --- a/hw/apic.c +++ b/hw/apic.c @@ -467,8 +467,7 @@ static void

[PATCH 2/4] sipi and init: move common code

2009-06-02 Thread Glauber Costa
provide functions to query and reset the state of sipi and init in cpu's apic. This way we can move the kvm specific functions out of the apic path. Signed-off-by: Glauber Costa --- cpu-defs.h |2 -- hw/apic.c | 49 - qemu-kvm.c |

[PATCH 3/4] provide a kvm-free implementation of apic

2009-06-02 Thread Glauber Costa
Also, provide a kvm_apic that does not depend highly on common code. Signed-off-by: Glauber Costa --- hw/apic.c | 249 ++-- hw/pc.c|7 ++- hw/pc.h|1 + qemu-kvm-x86.c |5 +- 4 files changed, 162 insertions

[PATCH 4/4] provide a kvm-free implementation of ioapic

2009-06-02 Thread Glauber Costa
Also, provide a kvm_ioapic that does not depend highly on common code. Signed-off-by: Glauber Costa --- hw/ioapic.c | 162 +- hw/pc.c |7 ++- hw/pc.h |1 + 3 files changed, 110 insertions(+), 60 deletions(-) diff --git a

Re: [PATCH 1/4] always halt non-bsp cpu.

2009-06-02 Thread Glauber Costa
On Tue, Jun 02, 2009 at 10:35:47PM +0200, Jan Kiszka wrote: > Glauber Costa wrote: > > This is not kvm specific, and should do fine in plain qemu > > This is fine with plain qemu already. The problem, IIUC, is that > in-kernel kvm irqchip does not have a chance to remove the ha

Re: [PATCH 1/4] always halt non-bsp cpu.

2009-06-02 Thread Glauber Costa
On Wed, Jun 03, 2009 at 12:01:00AM +0200, Jan Kiszka wrote: > Glauber Costa wrote: > > On Tue, Jun 02, 2009 at 10:35:47PM +0200, Jan Kiszka wrote: > >> Glauber Costa wrote: > >>> This is not kvm specific, and should do fine in plain qemu > >> This is fine wit

Re: [PATCH 1/4] always halt non-bsp cpu.

2009-06-02 Thread Glauber Costa
On Wed, Jun 03, 2009 at 12:32:04AM +0200, Jan Kiszka wrote: > Glauber Costa wrote: > > On Wed, Jun 03, 2009 at 12:01:00AM +0200, Jan Kiszka wrote: > >> Glauber Costa wrote: > >>> On Tue, Jun 02, 2009 at 10:35:47PM +0200, Jan Kiszka wrote: > >>>>

Re: [PATCH 1/4] always halt non-bsp cpu.

2009-06-02 Thread Glauber Costa
On Wed, Jun 03, 2009 at 12:32:04AM +0200, Jan Kiszka wrote: > Glauber Costa wrote: > > On Wed, Jun 03, 2009 at 12:01:00AM +0200, Jan Kiszka wrote: > >> Glauber Costa wrote: > >>> On Tue, Jun 02, 2009 at 10:35:47PM +0200, Jan Kiszka wrote: > >>>>

Re: [PATCH 1/4] always halt non-bsp cpu.

2009-06-02 Thread Glauber Costa
On Wed, Jun 03, 2009 at 12:32:04AM +0200, Jan Kiszka wrote: > Glauber Costa wrote: > > On Wed, Jun 03, 2009 at 12:01:00AM +0200, Jan Kiszka wrote: > >> Glauber Costa wrote: > >>> On Tue, Jun 02, 2009 at 10:35:47PM +0200, Jan Kiszka wrote: > >>>>

[PATCH 0/4] kvm free implementation of apic/ioapic

2009-06-03 Thread Glauber Costa
Same series already sent. Jan spotted a problem, and my lazyness found a way to bypass it, so it does not exist. A guest survived the following actions after this series is applied: * smp boot * smp reboot * migrate * reboot migrated guest. -- To unsubscribe from this list: send the line "unsubs

[PATCH 1/4] avoid halted state for in kernel irqchip

2009-06-03 Thread Glauber Costa
ing around with cpu states, the problem becomes a non issue, and my glorious series can be applied. Signed-off-by: Glauber Costa --- hw/apic.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/apic.c b/hw/apic.c index 86aa6b6..862289d 100644 --- a/hw/apic.c +++ b

[PATCH 2/4] sipi and init: move common code

2009-06-03 Thread Glauber Costa
provide functions to query and reset the state of sipi and init in cpu's apic. This way we can move the kvm specific functions out of the apic path. Signed-off-by: Glauber Costa --- cpu-defs.h |2 -- hw/apic.c | 49 - qemu-kvm.c |

[PATCH 4/4] provide a kvm-free implementation of ioapic

2009-06-03 Thread Glauber Costa
Also, provide a kvm_ioapic that does not depend highly on common code. Signed-off-by: Glauber Costa --- hw/ioapic.c | 162 +- hw/pc.c |7 ++- hw/pc.h |1 + 3 files changed, 110 insertions(+), 60 deletions(-) diff --git a

[PATCH 3/4] provide a kvm-free implementation of apic

2009-06-03 Thread Glauber Costa
Also, provide a kvm_apic that does not depend highly on common code. Signed-off-by: Glauber Costa --- hw/apic.c | 241 ++-- hw/pc.c|7 ++- hw/pc.h|1 + qemu-kvm-x86.c |5 +- 4 files changed, 157 insertions

Re: [PATCH 1/4] avoid halted state for in kernel irqchip

2009-06-03 Thread Glauber Costa
On Wed, Jun 03, 2009 at 10:50:59PM +0300, Gleb Natapov wrote: > On Wed, Jun 03, 2009 at 02:25:41PM -0400, Glauber Costa wrote: > > This patch is part of a series that tries to provide > > a kvm-free apic implementation. In the last interation, > > Jan pointed out that halted

Re: [PATCH 2/4] sipi and init: move common code

2009-06-03 Thread Glauber Costa
On Wed, Jun 03, 2009 at 10:53:05PM +0300, Gleb Natapov wrote: > On Wed, Jun 03, 2009 at 02:25:42PM -0400, Glauber Costa wrote: > > @@ -407,12 +393,12 @@ static int kvm_main_loop_cpu(CPUState *env) > > if (env->interrupt_request & (CPU_INTERRUPT_HARD | CPU_INTERRUPT

[PATCH 1/4] avoid halted state for in kernel irqchip

2009-06-03 Thread Glauber Costa
ing around with cpu states, the problem becomes a non issue, and my glorious series can be applied. Signed-off-by: Glauber Costa --- hw/apic.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/apic.c b/hw/apic.c index 86aa6b6..862289d 100644 --- a/hw/apic.c +++ b

[PATCH 0/4] apic/ioapic kvm free implementation

2009-06-03 Thread Glauber Costa
Same thing, addressing comments from gleb. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 4/4] provide a kvm-free implementation of ioapic

2009-06-03 Thread Glauber Costa
Also, provide a kvm_ioapic that does not depend highly on common code. Signed-off-by: Glauber Costa --- hw/ioapic.c | 162 +- hw/pc.c |7 ++- hw/pc.h |1 + 3 files changed, 110 insertions(+), 60 deletions(-) diff --git a

[PATCH 3/4] provide a kvm-free implementation of apic

2009-06-03 Thread Glauber Costa
Also, provide a kvm_apic that does not depend highly on common code. Signed-off-by: Glauber Costa --- hw/apic.c | 241 ++-- hw/pc.c|7 ++- hw/pc.h|1 + qemu-kvm-x86.c |5 +- 4 files changed, 157 insertions

[PATCH 2/4] sipi and init: move common code

2009-06-03 Thread Glauber Costa
provide functions to query and reset the state of sipi and init in cpu's apic. This way we can move the kvm specific functions out of the apic path. Signed-off-by: Glauber Costa --- cpu-defs.h |2 -- hw/apic.c | 49 - qemu-kvm.c |

Re: [PATCH] use KVMState, as upstream do

2009-06-04 Thread Glauber Costa
On Thu, Jun 04, 2009 at 10:23:29PM +0300, Gleb Natapov wrote: > On Thu, Jun 04, 2009 at 02:23:03PM -0400, Glauber Costa wrote: > > This is a pretty mechanical change. To make code look > > closer to upstream qemu, I'm renaming kvm_context_t to > > KVMState. Mid term goa

Re: [PATCH] use KVMState, as upstream do

2009-06-04 Thread Glauber Costa
On Thu, Jun 04, 2009 at 11:00:46PM +0300, Gleb Natapov wrote: > On Thu, Jun 04, 2009 at 04:33:19PM -0300, Glauber Costa wrote: > > On Thu, Jun 04, 2009 at 10:23:29PM +0300, Gleb Natapov wrote: > > > On Thu, Jun 04, 2009 at 02:23:03PM -0400, Glauber Costa wrote: > > > &g

Re: [PATCH] use KVMState, as upstream do

2009-06-04 Thread Glauber Costa
On Thu, Jun 04, 2009 at 11:09:52PM +0300, Gleb Natapov wrote: > On Thu, Jun 04, 2009 at 05:10:51PM -0300, Glauber Costa wrote: > > On Thu, Jun 04, 2009 at 11:00:46PM +0300, Gleb Natapov wrote: > > > On Thu, Jun 04, 2009 at 04:33:19PM -0300, Glauber Costa wrote: > > > &

Re: [PATCH 2/4] sipi and init: move common code

2009-06-08 Thread Glauber Costa
On Mon, Jun 08, 2009 at 12:08:17PM +0300, Avi Kivity wrote: > Glauber Costa wrote: >> provide functions to query and reset the state of sipi and >> init in cpu's apic. This way we can move the kvm specific functions >> out of the apic path. >> >> > >

Re: [PATCH 2/4] sipi and init: move common code

2009-06-08 Thread Glauber Costa
On Mon, Jun 08, 2009 at 06:48:38PM +0300, Avi Kivity wrote: > Glauber Costa wrote: >> On Mon, Jun 08, 2009 at 12:08:17PM +0300, Avi Kivity wrote: >> >>> Glauber Costa wrote: >>> >>>> provide functions to query and reset the state of sipi and

[PATCH 0/4] Start using KVMState

2009-06-08 Thread Glauber Costa
Guys, This is to address the feedback I received in the last attempt. I'm now attempting to move kvm_context inside of KVMState Patch #3 should be applied to qemu. I'll relay it to Anthony if we reach consensus on it here. Patch #4 is an example use of KVMState, to show how I intend to proceed.

[PATCH 1/4] get rid of libkvm-common.h

2009-06-08 Thread Glauber Costa
This file has no purpose in life in new scheme of things. Move its contents to libkvm-all.h. There are some name clashes in qemu-kvm.c. Those function names are then changed. Signed-off-by: Glauber Costa --- kvm.h|1 + libkvm-all.h | 82

[PATCH 2/4] pull qemu headers into libkvm

2009-06-08 Thread Glauber Costa
Those headers define qemu specific things like ram_addr_t. This will allow us to start using them in libkvm. Signed-off-by: Glauber Costa --- libkvm-all.c |2 +- libkvm-all.h |1 + target-i386/libkvm.c |2 ++ 3 files changed, 4 insertions(+), 1 deletions(-) diff

[PATCH 4/4] Use KVMState as main state container

2009-06-08 Thread Glauber Costa
Put kvm_context inside KVMState. We can then start using KVMState where we need to, to mid-term, start sharing code with qemu mainline. Signed-off-by: Glauber Costa --- kvm.h| 55 --- libkvm-all.c | 19 ++- libkvm

[PATCH 3/4] Move KVMState to common header

2009-06-08 Thread Glauber Costa
yway. Later on, we'll move our internal state inside it. Signed-off-by: Glauber Costa --- kvm-all.c | 21 - kvm.h | 40 +++- qemu-kvm.h |8 3 files changed, 31 insertions(+), 38 deletions(-) diff --git a/kvm-all

Re: [PATCH 3/4] Move KVMState to common header

2009-06-08 Thread Glauber Costa
On Mon, Jun 08, 2009 at 09:54:34PM +0200, Jan Kiszka wrote: > Glauber Costa wrote: > > This patch should be applied to main qemu, but I'll > > first post it here for appreciation. In this patch, > > we move KVMState definition to kvm.h header. With this > > done, w

[PATCH 0/2] get rid of libkvm-common.h

2009-06-09 Thread Glauber Costa
There is no place in the world for this sad header. This is part of the patch series I sent the other day (about KVMState), but it is an independent cleanup. Since that was not merged, I'm sending this part separetedly. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the bod

[PATCH 1/2] get rid of libkvm-common.h

2009-06-09 Thread Glauber Costa
This file has no purpose in life in new scheme of things. Move its contents to libkvm-all.h. There are some name clashes in qemu-kvm.c. Those function names are then changed. Signed-off-by: Glauber Costa --- kvm.h|1 + libkvm-all.h | 82

[PATCH 2/2] pull qemu headers into libkvm

2009-06-09 Thread Glauber Costa
Those headers define qemu specific things like ram_addr_t. This will allow us to start using them in libkvm. Signed-off-by: Glauber Costa --- libkvm-all.c |2 +- libkvm-all.h |1 + target-i386/libkvm.c |2 ++ 3 files changed, 4 insertions(+), 1 deletions(-) diff

Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities

2009-06-09 Thread Glauber Costa
On Fri, Jun 05, 2009 at 01:23:15PM +0300, Michael S. Tsirkin wrote: > Add routines to manage PCI capability list. First user will be MSI-X. > > Signed-off-by: Michael S. Tsirkin > --- > hw/pci.c | 98 > -- > hw/pci.h | 18 +

Re: [Qemu-devel] [PATCHv3 05/13] qemu: MSI-X support functions

2009-06-09 Thread Glauber Costa
On Fri, Jun 05, 2009 at 01:23:31PM +0300, Michael S. Tsirkin wrote: > Add functions implementing MSI-X support. First user will be virtio-pci. > Note that platform must set a flag to declare MSI supported. > For PC this will be set by APIC. > > Signed-off-by: Michael S. Tsirkin > --- > Makefile.

Re: [Qemu-devel] [PATCHv3 07/13] qemu: minimal MSI/MSI-X implementation for PC

2009-06-09 Thread Glauber Costa
> env = cpu_single_env; > if (!env) > @@ -727,7 +762,6 @@ static void apic_mem_writel(void *opaque, > target_phys_addr_t addr, uint32_t val) > printf("APIC write: %08x = %08x\n", (uint32_t)addr, val); > #endif > > -index = (addr >> 4) & 0xff; > switch(index) { > cas

Re: [Qemu-devel] [PATCHv3 08/13] qemu: add support for resizing regions

2009-06-09 Thread Glauber Costa
On Fri, Jun 05, 2009 at 01:23:55PM +0300, Michael S. Tsirkin wrote: > Make it possible to resize PCI regions. This will be used by virtio > with MSI-X, where the region size depends on whether MSI-X is enabled, > and can change across load/save. > > Signed-off-by: Michael S. Tsirkin > --- > hw/

Re: [Qemu-devel] [PATCHv3 12/13] qemu: virtio save/load bindings

2009-06-09 Thread Glauber Costa
duplicated save config. > diff --git a/hw/virtio.h b/hw/virtio.h > index 04a3c3d..ce05517 100644 > --- a/hw/virtio.h > +++ b/hw/virtio.h > @@ -72,6 +72,10 @@ typedef struct VirtQueueElement > > typedef struct { > void (*notify)(void * opaque, uint16_t vector); > +void (*save_config)(vo

Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities

2009-06-10 Thread Glauber Costa
On Wed, Jun 10, 2009 at 12:54:15PM +0300, Michael S. Tsirkin wrote: > On Tue, Jun 09, 2009 at 02:11:14PM -0300, Glauber Costa wrote: > > On Fri, Jun 05, 2009 at 01:23:15PM +0300, Michael S. Tsirkin wrote: > > > Add routines to manage PCI capability list. First

[PATCH 0/4] qemu-kvm cleanup

2009-06-10 Thread Glauber Costa
This series do some more cleanups in qemu-kvm.c I decided it is better to clean it up in place a little bit before merging it to kvm-all.c it is dependant on my previous patch: "move libkvm-all.c code to qemu-kvm.c" -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of

[PATCH 1/4] qemu-kvm.c memory cleanup

2009-06-10 Thread Glauber Costa
Now that libkvm is merged into this file, there is a lot of things we don't need. kvm_create_phys_mem() is only used by user/ files, and so can be removed from this implementation. kvm_cpu_register_physical_memory() morphs into kvm_set_phys_mem(), and uses qemu types. Signed-off-by: Gl

[PATCH 2/4] cleanup mmio coalescing functions

2009-06-10 Thread Glauber Costa
remove wrappers that existed only due to qemu/libkvm separation. Use qemu types for function definitions. Signed-off-by: Glauber Costa --- qemu-kvm.c | 27 --- qemu-kvm.h |5 - 2 files changed, 4 insertions(+), 28 deletions(-) diff --git a/qemu-kvm.c b/qemu

[PATCH 4/4] remove wrappers around ex-libkvm functions

2009-06-10 Thread Glauber Costa
Some functions in qemu existed only to call libkvm counterparts. Merge some of them Signed-off-by: Glauber Costa --- libkvm-all.h |6 ++-- qemu-kvm.c | 77 ++--- 2 files changed, 22 insertions(+), 61 deletions(-) diff --git a/libkvm

[PATCH 3/4] remove callbacks structure

2009-06-10 Thread Glauber Costa
The purpose of that was only to allow the user of libkvm to register functions pointers that corresponded to possible actions. We don't need that anymore. Signed-off-by: Glauber Costa --- libkvm-all.h |4 +- qemu-kvm.c | 380 +++-

[PATCH 0/4] qemu-kvm cleanup

2009-06-11 Thread Glauber Costa
Same series as before, but with avi's little comment addressed. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 2/4] cleanup mmio coalescing functions

2009-06-11 Thread Glauber Costa
remove wrappers that existed only due to qemu/libkvm separation. Use qemu types for function definitions. Signed-off-by: Glauber Costa --- qemu-kvm.c | 27 --- qemu-kvm.h |5 - 2 files changed, 4 insertions(+), 28 deletions(-) diff --git a/qemu-kvm.c b/qemu

[PATCH 1/4] qemu-kvm.c memory cleanup

2009-06-11 Thread Glauber Costa
Now that libkvm is merged into this file, there is a lot of things we don't need. kvm_create_phys_mem() is only used by user/ files, and so can be removed from this implementation. kvm_cpu_register_physical_memory() morphs into kvm_set_phys_mem(), and uses qemu types. Signed-off-by: Gl

[PATCH 4/4] remove wrappers around ex-libkvm functions

2009-06-11 Thread Glauber Costa
Some functions in qemu existed only to call libkvm counterparts. Merge some of them Signed-off-by: Glauber Costa --- libkvm-all.h |6 ++-- qemu-kvm.c | 77 ++--- 2 files changed, 22 insertions(+), 61 deletions(-) diff --git a/libkvm

[PATCH 3/4] remove callbacks structure

2009-06-11 Thread Glauber Costa
The purpose of that was only to allow the user of libkvm to register functions pointers that corresponded to possible actions. We don't need that anymore. Signed-off-by: Glauber Costa --- libkvm-all.h |4 +- qemu-kvm.c | 380 +++-

[PATCH] get rid of target-i386/libkvm.c

2009-06-15 Thread Glauber Costa
Same spirit of what has already been done for the generic code. Fold libkvm.c into qemu-kvm-x86.c. handle_tpr_access becomes kvm_handle_tpr_access, to avoid name clash. Signed-off-by: Glauber Costa --- Makefile.target |2 +- qemu-kvm-x86.c | 652

Re: [Qemu-devel] Live migration broken when under heavy IO

2009-06-15 Thread Glauber Costa
On Mon, Jun 15, 2009 at 03:33:41PM -0500, Anthony Liguori wrote: > The basic issue is that: > > migrate_fd_put_ready():bdrv_flush_all(); > > Does: > > block.c: > > foreach block driver: > drv->flush(bs); > > Which in the case of raw, is just fsync(s->fd). > > Any submitted request is not queu

[PATCH] remove ppc functions from callbacks

2009-06-16 Thread Glauber Costa
, and does not need it anymore. Anyway, I'm providing this patch separatedly, so that if it breaks for whenever reason, we can identify a bisection point easily Signed-off-by: Glauber Costa CC: Hollis Blanchard --- libkvm-all.h |4 qemu-kvm.c |4 qemu-kvm.h |5 ---

Re: [PATCH 0/4] Start using KVMState

2009-06-18 Thread Glauber Costa
On Thu, Jun 18, 2009 at 12:15:12PM +0300, Avi Kivity wrote: > On 06/08/2009 10:10 PM, Glauber Costa wrote: >> Guys, >> >> This is to address the feedback I received in the last attempt. >> > > Does this fix the tpr patching regression? What was the problem?

[PATCH 0/5 v2] Further cleanups to qemu-kvm.c

2009-06-18 Thread Glauber Costa
Avi, This is the patch set that should be applied. It is comprised of 4 patches. It however, depends on "[PATCH 1/5] get rid of target-i386/libkvm.c", so I'm sending it again, since it does not seem to be already applied by you. Thanks. -- To unsubscribe from this list: send the line "unsubscrib

[PATCH 2/5] qemu-kvm.c memory cleanup

2009-06-18 Thread Glauber Costa
Now that libkvm is merged into this file, there is a lot of things we don't need. kvm_create_phys_mem() is only used by user/ files, and so can be removed from this implementation. kvm_cpu_register_physical_memory() morphs into kvm_set_phys_mem(), and uses qemu types. Signed-off-by: Gl

[PATCH 1/5] get rid of target-i386/libkvm.c

2009-06-18 Thread Glauber Costa
Same spirit of what has already been done for the generic code. Fold libkvm.c into qemu-kvm-x86.c. handle_tpr_access becomes kvm_handle_tpr_access, to avoid name clash. Signed-off-by: Glauber Costa --- Makefile.target |2 +- qemu-kvm-x86.c | 652

[PATCH 3/5] cleanup mmio coalescing functions

2009-06-18 Thread Glauber Costa
remove wrappers that existed only due to qemu/libkvm separation. Use qemu types for function definitions. Signed-off-by: Glauber Costa --- qemu-kvm.c | 27 --- qemu-kvm.h |5 - 2 files changed, 4 insertions(+), 28 deletions(-) diff --git a/qemu-kvm.c b/qemu

[PATCH 4/5] remove callbacks structure

2009-06-18 Thread Glauber Costa
The purpose of that was only to allow the user of libkvm to register functions pointers that corresponded to possible actions. We don't need that anymore. Signed-off-by: Glauber Costa --- libkvm-all.h |4 +- qemu-kvm.c | 370 +++-

[PATCH 5/5] remove wrappers around ex-libkvm functions

2009-06-18 Thread Glauber Costa
Some functions in qemu existed only to call libkvm counterparts. Merge some of them Signed-off-by: Glauber Costa --- libkvm-all.h |6 ++-- qemu-kvm.c | 75 ++ 2 files changed, 21 insertions(+), 60 deletions(-) diff --git a/libkvm

Re: [PATCHv5 0/5] qemu misc save/load fixes

2009-07-06 Thread Glauber Costa
On Sun, Jul 05, 2009 at 03:58:09PM +0300, Michael S. Tsirkin wrote: > Anthony, please commit the following patches that fix save/load issues > with qemu.git They all seem fine to me. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel

[PATCH v3 1/5] qemu-kvm.c memory cleanup

2009-07-06 Thread Glauber Costa
Now that libkvm is merged into this file, there is a lot of things we don't need. kvm_create_phys_mem() is only used by user/ files, and so can be removed from this implementation. kvm_cpu_register_physical_memory() morphs into kvm_set_phys_mem(), and uses qemu types. Signed-off-by: Gl

[PATCH v3 0/5] Further qemu-kvm cleanups

2009-07-06 Thread Glauber Costa
Now that I've definitely flushed my backlog, here's a resend of the last cleanup series I sent. It fixes the segfault avi noticed. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org

[PATCH v3 2/5] cleanup mmio coalescing functions

2009-07-06 Thread Glauber Costa
remove wrappers that existed only due to qemu/libkvm separation. Use qemu types for function definitions. Signed-off-by: Glauber Costa --- qemu-kvm.c | 27 --- qemu-kvm.h |5 - 2 files changed, 4 insertions(+), 28 deletions(-) diff --git a/qemu-kvm.c b/qemu

[PATCH v3 3/5] kvm finalize

2009-07-06 Thread Glauber Costa
Signed-off-by: Glauber Costa --- qemu-kvm.c | 11 +++ qemu-kvm.h |1 - 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/qemu-kvm.c b/qemu-kvm.c index e4af96e..3b5326e 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -2262,12 +2262,12 @@ int kvm_qemu_create_context(void

[PATCH v3 5/5] remove wrappers around ex-libkvm functions

2009-07-06 Thread Glauber Costa
Some functions in qemu existed only to call libkvm counterparts. Merge some of them Signed-off-by: Glauber Costa --- libkvm-all.h |6 ++-- qemu-kvm.c | 75 ++ 2 files changed, 21 insertions(+), 60 deletions(-) diff --git a/libkvm

[PATCH v3 4/5] remove callbacks structure

2009-07-06 Thread Glauber Costa
The purpose of that was only to allow the user of libkvm to register functions pointers that corresponded to possible actions. We don't need that anymore. Signed-off-by: Glauber Costa --- libkvm-all.h |4 +- qemu-kvm-x86.c | 16 +-- qemu-kvm.c |

[PATCH 0/2] Fix compilation with --disable-kvm

2009-07-07 Thread Glauber Costa
I just came across two errors in --disable-kvm builds. here's the patches to fix it. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 1/2] surround kvm function with kvm_enabled

2009-07-07 Thread Glauber Costa
otherwise, compilation breaks with kvm disabled. Signed-off-by: Glauber Costa --- hw/pc.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index cf84416..afab0ad 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -1131,7 +1131,9 @@ static void pc_init1(ram_addr_t

[PATCH 2/2] fix compilation with kvm disabled

2009-07-07 Thread Glauber Costa
Signed-off-by: Glauber Costa --- hw/msix.c | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/hw/msix.c b/hw/msix.c index b6f3948..8636f69 100644 --- a/hw/msix.c +++ b/hw/msix.c @@ -63,6 +63,7 @@ /* Flag for interrupt controller to declare MSI-X support

Re: guest gettimeofday behavior

2009-07-08 Thread Glauber Costa
On Tue, Jul 07, 2009 at 05:12:16PM -0300, Marcelo Tosatti wrote: > On Tue, Jul 07, 2009 at 09:58:46AM +, Eran Rom wrote: > > Eran Rom il.ibm.com> writes: > > > > > > > > Eran Rom il.ibm.com> writes: > > > > > > Still getting a misbehaving clock: > > > guest uses kvmclock with kernel 2.6.27

Re: [PATCH 2/2] fix compilation with kvm disabled

2009-07-08 Thread Glauber Costa
On Wed, Jul 08, 2009 at 10:59:13AM +0300, Michael S. Tsirkin wrote: > On Tue, Jul 07, 2009 at 02:36:31PM -0400, Glauber Costa wrote: > > Signed-off-by: Glauber Costa > > --- > > hw/msix.c | 14 ++ > > 1 files changed, 14 insertions(+), 0 deletions(-) >

[PATCH] remove leftover:

2009-07-08 Thread Glauber Costa
get rid of kvm_callbacks structure definition Signed-off-by: Glauber Costa --- libkvm-all.h | 57 - 1 files changed, 0 insertions(+), 57 deletions(-) diff --git a/libkvm-all.h b/libkvm-all.h index e16646c..f0d2489 100644 --- a/libkvm

[PATCH 1/8] Provide KVMState definition outside CONFIG_KVM

2009-07-08 Thread Glauber Costa
This will allow qemu-kvm to refer to the structure, since qemu-kvm relies on USE_KVM, not CONFIG_KVM. This should be sent to qemu.git as well Signed-off-by: Glauber Costa --- kvm.h |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kvm.h b/kvm.h index d9723d7..7648c49

[PATCH 0/8] Move closer to upstream

2009-07-08 Thread Glauber Costa
Hi, This is another step at getting us closer to qemu upstream. I'm moving our code to kvm-all.c and kvm.c, and relying on the fact that we use USE_KVM, while upstream qemu uses CONFIG_KVM, to keep us isolated. The goal is to slowly reduce that isolation. To demonstrate what I aim for, the last p

[PATCH 4/8] replace malloc with qemu_malloc

2009-07-08 Thread Glauber Costa
This patch replaces both malloc and malloc+memset sequences with qemu_malloc and qemu_mallocz. Target is upstream integration Signed-off-by: Glauber Costa --- kvm-all.c | 26 +- target-i386/kvm.c | 31 --- 2 files changed, 13

[PATCH 5/8] move kvm_context inside KVMState

2009-07-08 Thread Glauber Costa
of a global KVMState Signed-off-by: Glauber Costa --- kvm-all.c| 98 + kvm.h|3 +- libkvm-all.h |3 +- 3 files changed, 47 insertions(+), 57 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 034ae52..15bd429 100644

[PATCH 6/8] provide env->kvm_fd

2009-07-08 Thread Glauber Costa
qemu upstream puts kvm information on env. Do that too, since it will allow us to use CPUState in cpu-specific functions, instead of kvm-specific types. Signed-off-by: Glauber Costa --- kvm-all.c| 12 libkvm-all.h | 12 2 files changed, 8 insertions(+), 16

[PATCH 7/8] use kvm_upstream sw_breakpoints structure

2009-07-08 Thread Glauber Costa
Signed-off-by: Glauber Costa --- kvm-all.c | 27 ++- qemu-kvm.h|6 +++--- target-i386/kvm.c |4 ++-- 3 files changed, 23 insertions(+), 14 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index b404f76..6f92874 100644 --- a/kvm-all.c +++ b/kvm

[PATCH 8/8] use upstream code for breakpoint handling

2009-07-08 Thread Glauber Costa
--- kvm-all.c | 422 +++- target-i386/kvm.c | 514 ++--- 2 files changed, 314 insertions(+), 622 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 6f92874..a364d34 100644 --- a/kvm-all.c +++ b/kv

Re: [PATCH 7/8] use kvm_upstream sw_breakpoints structure

2009-07-08 Thread Glauber Costa
On Wed, Jul 08, 2009 at 04:27:27PM +0300, Avi Kivity wrote: > On 07/08/2009 04:09 PM, Glauber Costa wrote: >> Signed-off-by: Glauber Costa >> --- >> kvm-all.c | 27 ++- >> qemu-kvm.h|6 +++--- >> target-i386/kvm.c

Re: [PATCH 3/8] put qemu-kvm-x86.c into kvm.c

2009-07-08 Thread Glauber Costa
On Wed, Jul 08, 2009 at 04:28:51PM +0300, Gleb Natapov wrote: > On Wed, Jul 08, 2009 at 09:08:57AM -0400, Glauber Costa wrote: > > big plan to start sharing code with upstream. > > > It is hard enough (for me at least) to distinguish between upstream code > and qemu-kvm when

Re: [PATCH 6/8] provide env->kvm_fd

2009-07-08 Thread Glauber Costa
On Wed, Jul 08, 2009 at 04:32:37PM +0300, Gleb Natapov wrote: > On Wed, Jul 08, 2009 at 09:09:00AM -0400, Glauber Costa wrote: > > qemu upstream puts kvm information on env. Do that too, since it will > > allow us to use CPUState in cpu-specific functions, instead of kvm-spe

Re: [PATCH 2/8] move qemu-kvm.c to kvm-all.c

2009-07-08 Thread Glauber Costa
On Wed, Jul 08, 2009 at 04:23:39PM +0300, Avi Kivity wrote: > On 07/08/2009 04:08 PM, Glauber Costa wrote: >> Big plan to start sharing code with upstream. >> >> > > This patch is very brittle - if qemu-kvm.c changes, it won't apply. I > suggest to s

Re: LILO incompatibility with KVM?

2009-07-10 Thread Glauber Costa
On Fri, Jul 10, 2009 at 12:40 PM, Andy Sy wrote: > Glauber Costa wrote: >> >> On Tue, Jul 7, 2009 at 4:03 PM, Andy Sy wrote: >>> >>> I am trying to install Slackware on KVM-based >>> VPS hosting and keep getting a "LILO keytable read >>> /

[PATCH v2 5/9] fold libkvm-all into standard qemu header

2009-07-10 Thread Glauber Costa
Sharing of structures containing each other between libkvm-all.h and qemu-kmv.h gets a bit messy in this series. So fold them together. libkvm-all.h has no place in the final schema of things anyway. Signed-off-by: Glauber Costa --- kvm.h|1 - libkvm-all.h | 904

[PATCH v2 1/9] replace USE_KVM with CONFIG_KVM

2009-07-10 Thread Glauber Costa
Make things less confuse, and we have KVM_UPSTREAM to differentiate between the two versions anyway. kvm-all.c and kvm.c gets compiled now, but protected with KVM_UPSTREAM too, so no function in there gets visible in the final binary Signed-off-by: Glauber Costa --- Makefile.target | 20

[PATCH v2 3/9] replace malloc with qemu_malloc

2009-07-10 Thread Glauber Costa
This patch replaces both malloc and malloc+memset sequences with qemu_malloc and qemu_mallocz. Target is upstream integration Signed-off-by: Glauber Costa --- qemu-kvm-x86.c | 31 --- qemu-kvm.c | 26 +- 2 files changed, 13 insertions

[PATCH v2 6/9] duplicate KVMState

2009-07-10 Thread Glauber Costa
. This way we don't need to hurry about changing all callers. kvm_init() and kvm_finalize are changed, though, since they have now to deal with the creation/destruction of a global KVMState Signed-off-by: Glauber Costa --- qemu-kvm.c |

  1   2   3   4   5   6   7   8   9   10   >