[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [PATCH 05/17] pseries: savevm support for XI
From: |
Anthony Liguori |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [PATCH 05/17] pseries: savevm support for XICS interrupt controller |
Date: |
Mon, 08 Jul 2013 20:25:33 -0500 |
User-agent: |
Notmuch/0.15.2+202~g0c4b8aa (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) |
Alexey Kardashevskiy <address@hidden> writes:
> On 07/09/2013 10:49 AM, Anthony Liguori wrote:
>> On Mon, Jul 8, 2013 at 7:06 PM, Alexey Kardashevskiy <address@hidden> 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 xics-kvm and vice versa.
>>> vmsd cannot be inherited and even if they could, different device names
>>> would kill that support.
>>
>> Please look at hw/intc/i8259_common.c and then hw/i386/kvm/i8259.c and
>> hw/i386/intc/i8259.c.
>>
>> The vmsd is in the common base class shared between the KVM version
>> and the non-KVM version. As long as the subclasses don't introduce
>> any new state members, you can safely migrate between the two devices.
>
> Ok, thanks.
>
>> You should consider splitting the implementations up into separate
>> files just like i8259 too.
>
>
> I already split it to xics and xics-kvm devices so you are are definitely
> talking about something else but I do not understand what exactly...
There are three classes for the i8259 split between three files. I was
suggesting factoring out a base class and putting that in a separate
file.
Regards,
Anthony Liguori
>
>
>
>> Regards,
>>
>> Anthony Liguori
>>
>>>
>>>
>>>>
>>>> Regards,
>>>>
>>>> Anthony Liguori
>>>>
>>>>> }
>>>>>
>>>>> void xics_common_init(struct icp_state *icp, qemu_irq_handler handler)
>>>>> @@ -555,6 +614,10 @@ static void xics_realize(DeviceState *dev, Error
>>>>> **errp)
>>>>> spapr_rtas_register("ibm,int-off", rtas_int_off);
>>>>> spapr_rtas_register("ibm,int-on", rtas_int_on);
>>>>>
>>>>> + /* We use each the ICS's offset into the global irq number space
>>>>> + * as an instance id. This means we can extend to multiple ICS
>>>>> + * instances without needing to change the savevm format */
>>>>> + vmstate_register(NULL, icp->ics->offset, &vmstate_ics, icp->ics);
>>>>> }
>>>>>
>>>>> static Property xics_properties[] = {
>>>>> --
>>>>> 1.7.10.4
>>>>
>>>
>>>
>>> --
>>> Alexey
>>>
>
>
> --
> Alexey
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 05/17] pseries: savevm support for XICS interrupt controller, Anthony Liguori, 2013/07/08
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 05/17] pseries: savevm support for XICS interrupt controller, Alexey Kardashevskiy, 2013/07/08
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 05/17] pseries: savevm support for XICS interrupt controller, Anthony Liguori, 2013/07/08
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 05/17] pseries: savevm support for XICS interrupt controller, Alexey Kardashevskiy, 2013/07/08
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 05/17] pseries: savevm support for XICS interrupt controller, Paolo Bonzini, 2013/07/15
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 05/17] pseries: savevm support for XICS interrupt controller, Alexey Kardashevskiy, 2013/07/15
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 05/17] pseries: savevm support for XICS interrupt controller, Paolo Bonzini, 2013/07/15
Re: [Qemu-ppc] [Qemu-devel] [PATCH 05/17] pseries: savevm support for XICS interrupt controller, David Gibson, 2013/07/09