Re: [Qemu-devel] [PATCH 05/17] pseries: savevm support for XICS interrupt controller

2013-07-15 Thread Paolo Bonzini
Il 15/07/2013 15:13, Alexey Kardashevskiy ha scritto: >> > >> > The vmstate's pre_save and post_load functions can dispatch to a method >> > in the subclass. Again, i8259 does exactly what you want: >> > >> > static void pic_dispatch_pre_save(void *opaque) >> > { >> > PICCommonState *s = opa

Re: [Qemu-devel] [PATCH 05/17] pseries: savevm support for XICS interrupt controller

2013-07-15 Thread Alexey Kardashevskiy
On 07/15/2013 11:05 PM, Paolo Bonzini wrote: > Il 09/07/2013 05:37, Alexey Kardashevskiy ha scritto: >> >> btw xics-kvm does not introduce new members but does have very different >> .pre_save and .post_load. This actually was the whole point of splitting >> xics into xics and xics-kvm. I cannot se

Re: [Qemu-devel] [PATCH 05/17] pseries: savevm support for XICS interrupt controller

2013-07-15 Thread Paolo Bonzini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 09/07/2013 09:17, David Gibson ha scritto: > So, Alexey addressed the xics vs. xics-kvm issues. But there's > another factor here. It's not clear to me how you'd QOM this > component. > > What's being registered here is the "presentation server

Re: [Qemu-devel] [PATCH 05/17] pseries: savevm support for XICS interrupt controller

2013-07-15 Thread Paolo Bonzini
Il 09/07/2013 05:37, Alexey Kardashevskiy ha scritto: > > btw xics-kvm does not introduce new members but does have very different > .pre_save and .post_load. This actually was the whole point of splitting > xics into xics and xics-kvm. I cannot see how I can fix it without hacks. > Property's can

Re: [Qemu-devel] [PATCH 05/17] pseries: savevm support for XICS interrupt controller

2013-07-09 Thread David Gibson
On Mon, Jul 08, 2013 at 01:31:59PM -0500, Anthony Liguori wrote: > Alexey Kardashevskiy writes: > > From: David Gibson [snip] > > void xics_common_cpu_setup(struct icp_state *icp, PowerPCCPU *cpu) > > { > > CPUState *cs = CPU(cpu); > > @@ -523,7 +578,11 @@ void xics_common_cpu_setup(struct

Re: [Qemu-devel] [PATCH 05/17] pseries: savevm support for XICS interrupt controller

2013-07-08 Thread Alexey Kardashevskiy
On 07/09/2013 10:49 AM, Anthony Liguori wrote: > On Mon, Jul 8, 2013 at 7:06 PM, Alexey Kardashevskiy wrote: >>> You should tie the vmstate section to DeviceState::vmsd. You only need >>> to do this because you haven't converted everything to QOM yet. >>> >>> Please do that to avoid these hacks.

Re: [Qemu-devel] [PATCH 05/17] pseries: savevm support for XICS interrupt controller

2013-07-08 Thread Anthony Liguori
Alexey Kardashevskiy writes: > On 07/09/2013 10:49 AM, Anthony Liguori wrote: >> On Mon, Jul 8, 2013 at 7:06 PM, Alexey Kardashevskiy wrote: You should tie the vmstate section to DeviceState::vmsd. You only need to do this because you haven't converted everything to QOM yet.

Re: [Qemu-devel] [PATCH 05/17] pseries: savevm support for XICS interrupt controller

2013-07-08 Thread Alexey Kardashevskiy
On 07/09/2013 10:49 AM, Anthony Liguori wrote: > On Mon, Jul 8, 2013 at 7:06 PM, Alexey Kardashevskiy wrote: >>> You should tie the vmstate section to DeviceState::vmsd. You only need >>> to do this because you haven't converted everything to QOM yet. >>> >>> Please do that to avoid these hacks.

Re: [Qemu-devel] [PATCH 05/17] pseries: savevm support for XICS interrupt controller

2013-07-08 Thread Anthony Liguori
On Mon, Jul 8, 2013 at 7:06 PM, Alexey Kardashevskiy wrote: >> You should tie the vmstate section to DeviceState::vmsd. You only need >> to do this because you haven't converted everything to QOM yet. >> >> Please do that to avoid these hacks. > > > How? I want to support migration from xics to x

Re: [Qemu-devel] [PATCH 05/17] pseries: savevm support for XICS interrupt controller

2013-07-08 Thread Alexey Kardashevskiy
On 07/09/2013 04:31 AM, Anthony Liguori wrote: > Alexey Kardashevskiy writes: > >> From: David Gibson >> >> This patch adds the necessary VMStateDescription information to support >> savevm/loadvm for the XICS interrupt controller used on the pseries >> machine. >> >> Signed-off-by: David Gibson

Re: [Qemu-devel] [PATCH 05/17] pseries: savevm support for XICS interrupt controller

2013-07-08 Thread Anthony Liguori
Alexey Kardashevskiy writes: > From: David Gibson > > This patch adds the necessary VMStateDescription information to support > savevm/loadvm for the XICS interrupt controller used on the pseries > machine. > > Signed-off-by: David Gibson > [aik: added ics_resend() on post_load] > Signed-off-by

[Qemu-devel] [PATCH 05/17] pseries: savevm support for XICS interrupt controller

2013-06-26 Thread Alexey Kardashevskiy
From: David Gibson This patch adds the necessary VMStateDescription information to support savevm/loadvm for the XICS interrupt controller used on the pseries machine. Signed-off-by: David Gibson [aik: added ics_resend() on post_load] Signed-off-by: Alexey Kardashevskiy --- hw/intc/xics.c |