Re: [Qemu-devel] Re: [PATCH v2 4/9] provide in-kernel apic

2009-10-12 Thread Anthony Liguori
Avi Kivity wrote: On 10/09/2009 09:49 PM, Anthony Liguori wrote: If I've just been sent an image produced by someone running KVM, and my machine is not KVM-capable, or I cannot upgrade the KVM kernel module because it's in use by other VMs (had this problem a few times), there's no choice but

Re: [Qemu-devel] Re: [PATCH v2 4/9] provide in-kernel apic

2009-10-11 Thread Avi Kivity
On 10/09/2009 09:49 PM, Anthony Liguori wrote: If I've just been sent an image produced by someone running KVM, and my machine is not KVM-capable, or I cannot upgrade the KVM kernel module because it's in use by other VMs (had this problem a few times), there's no choice but to change the

Re: [Qemu-devel] Re: [PATCH v2 4/9] provide in-kernel apic

2009-10-09 Thread Jamie Lokier
Glauber Costa wrote: It ensures the two models are compatible. Since they're the same device from the point of view of the guest, there's no reason for them to have different representations or to be incompatible. live migration between something that has in-kernel irqchip and

Re: [Qemu-devel] Re: [PATCH v2 4/9] provide in-kernel apic

2009-10-09 Thread Glauber Costa
On Fri, Oct 09, 2009 at 11:06:41AM +0100, Jamie Lokier wrote: Glauber Costa wrote: It ensures the two models are compatible. Since they're the same device from the point of view of the guest, there's no reason for them to have different representations or to be incompatible.

Re: [Qemu-devel] Re: [PATCH v2 4/9] provide in-kernel apic

2009-10-09 Thread Jamie Lokier
Glauber Costa wrote: On Fri, Oct 09, 2009 at 11:06:41AM +0100, Jamie Lokier wrote: Glauber Costa wrote: It ensures the two models are compatible. Since they're the same device from the point of view of the guest, there's no reason for them to have different

Re: [Qemu-devel] Re: [PATCH v2 4/9] provide in-kernel apic

2009-10-09 Thread Glauber Costa
On Fri, Oct 09, 2009 at 05:48:31PM +0100, Jamie Lokier wrote: Glauber Costa wrote: On Fri, Oct 09, 2009 at 11:06:41AM +0100, Jamie Lokier wrote: Glauber Costa wrote: It ensures the two models are compatible. Since they're the same device from the point of view of the

Re: [Qemu-devel] Re: [PATCH v2 4/9] provide in-kernel apic

2009-10-09 Thread Anthony Liguori
Jamie Lokier wrote: Glauber Costa wrote: On Fri, Oct 09, 2009 at 11:06:41AM +0100, Jamie Lokier wrote: Glauber Costa wrote: It ensures the two models are compatible. Since they're the same device from the point of view of the guest, there's no reason for them to have

Re: [Qemu-devel] Re: [PATCH v2 4/9] provide in-kernel apic

2009-10-08 Thread Avi Kivity
On 10/08/2009 03:55 PM, Anthony Liguori wrote: Glauber Costa wrote: This patch provides kvm with an in-kernel apic. We are currently not enabling it. The code is heavily based on what's in qemu-kvm.git. Signed-off-by: Glauber Costa glom...@redhat.com --- hw/apic.c | 135

Re: [Qemu-devel] Re: [PATCH v2 4/9] provide in-kernel apic

2009-10-08 Thread Glauber Costa
On Thu, Oct 08, 2009 at 04:09:27PM +0200, Avi Kivity wrote: On 10/08/2009 03:55 PM, Anthony Liguori wrote: Glauber Costa wrote: This patch provides kvm with an in-kernel apic. We are currently not enabling it. The code is heavily based on what's in qemu-kvm.git. Signed-off-by: Glauber

Re: [Qemu-devel] Re: [PATCH v2 4/9] provide in-kernel apic

2009-10-08 Thread Anthony Liguori
Avi Kivity wrote: On 10/08/2009 03:55 PM, Anthony Liguori wrote: You should probably just setup VMState such that it directly saves kvm_lapic_state and then have the pre/post functions call the kernel ioctls to sync it. There's not a whole lot of point switching the state between two

Re: [Qemu-devel] Re: [PATCH v2 4/9] provide in-kernel apic

2009-10-08 Thread Avi Kivity
On 10/08/2009 04:26 PM, Anthony Liguori wrote: Avi Kivity wrote: On 10/08/2009 03:55 PM, Anthony Liguori wrote: You should probably just setup VMState such that it directly saves kvm_lapic_state and then have the pre/post functions call the kernel ioctls to sync it. There's not a whole lot

Re: [Qemu-devel] Re: [PATCH v2 4/9] provide in-kernel apic

2009-10-08 Thread Glauber Costa
On Thu, Oct 08, 2009 at 04:31:57PM +0200, Avi Kivity wrote: On 10/08/2009 04:26 PM, Anthony Liguori wrote: Avi Kivity wrote: On 10/08/2009 03:55 PM, Anthony Liguori wrote: You should probably just setup VMState such that it directly saves kvm_lapic_state and then have the pre/post

Re: [Qemu-devel] Re: [PATCH v2 4/9] provide in-kernel apic

2009-10-08 Thread Glauber Costa
On Thu, Oct 08, 2009 at 09:39:13AM -0500, Anthony Liguori wrote: The sync stuff is really ugly too. It would be much cleaner to have a separate state for the in-kernel device models that saved the structures from the kernel directly instead of having to translate between formats. More