[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [QEMU PATCH v6 1/2] migration: extend VMStat
From: |
Jianjun Duan |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [QEMU PATCH v6 1/2] migration: extend VMStateInfo |
Date: |
Fri, 14 Oct 2016 09:58:28 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 |
On 10/14/2016 02:23 AM, Dr. David Alan Gilbert wrote:
> * Jianjun Duan (address@hidden) wrote:
>> Current migration code cannot handle some data structures such as
>> QTAILQ in qemu/queue.h. Here we extend the signatures of put/get
>> in VMStateInfo so that customized handling is supported.
>>
>> Signed-off-by: Jianjun Duan <address@hidden>
>> ---
>> hw/display/virtio-gpu.c | 6 ++-
>> hw/net/vmxnet3.c | 18 +++++---
>> hw/nvram/eeprom93xx.c | 6 ++-
>> hw/nvram/fw_cfg.c | 6 ++-
>> hw/pci/msix.c | 6 ++-
>> hw/pci/pci.c | 12 +++--
>> hw/pci/shpc.c | 5 ++-
>> hw/scsi/scsi-bus.c | 6 ++-
>> hw/timer/twl92230.c | 6 ++-
>> hw/usb/redirect.c | 18 +++++---
>> hw/virtio/virtio-pci.c | 6 ++-
>> hw/virtio/virtio.c | 12 +++--
>> include/migration/vmstate.h | 15 +++++--
>> migration/savevm.c | 5 ++-
>> migration/vmstate.c | 104
>> ++++++++++++++++++++++++++++----------------
>> target-alpha/machine.c | 5 ++-
>> target-arm/machine.c | 12 +++--
>> target-i386/machine.c | 21 ++++++---
>> target-mips/machine.c | 10 +++--
>> target-ppc/machine.c | 10 +++--
>> target-sparc/machine.c | 5 ++-
>> 21 files changed, 192 insertions(+), 102 deletions(-)
>
> <snip>
>
>> -static int get_int32_as_uint16(QEMUFile *f, void *pv, size_t size)
>> +static int get_int32_as_uint16(QEMUFile *f, void *pv, size_t size,
>> + VMStateField *field)
>> {
>> int *v = pv;
>> *v = qemu_get_be16(f);
>> return 0;
>> }
>>
>> -static void put_int32_as_uint16(QEMUFile *f, void *pv, size_t size)
>> +static void put_int32_as_uint16(QEMUFile *f, void *pv, size_t size,
>> + VMStateField *field, QJSON *vmdesc)
>> {
>> int *v = pv;
>> qemu_put_be16(f, *v);
>> diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
>> index d4ca026..1b85c51 100644
>> --- a/hw/usb/redirect.c
>> +++ b/hw/usb/redirect.c
>> @@ -2158,7 +2158,8 @@ static int usbredir_post_load(void *priv, int
>> version_id)
>> }
>>
>> /* For usbredirparser migration */
>> -static void usbredir_put_parser(QEMUFile *f, void *priv, size_t unused)
>> +static void usbredir_put_parser(QEMUFile *f, void *priv, size_t unused,
>> + void *opaque, QJSON *vmdesc)
>> {
>> USBRedirDevice *dev = priv;
>> uint8_t *data;
>> @@ -2178,7 +2179,8 @@ static void usbredir_put_parser(QEMUFile *f, void
>> *priv, size_t unused)
>> free(data);
>> }
>>
>> -static int usbredir_get_parser(QEMUFile *f, void *priv, size_t unused)
>> +static int usbredir_get_parser(QEMUFile *f, void *priv, size_t unused,
>> + void *opaque)
>
> The types here are wrong for usbredir_put_parser and usbredir_get_parser; the
> 'void *opaque'
> should be a VMStateField *field; it causes a build failure for me (I suspect
> only
> if you have the usbredir libraries)
>
> Also, are you missing kvm_flic_load/save from hw/intc/s390_flic_kvm.c ?
>
> Other than that, it looks good.
>
Will double check.
Thanks,
Jianjun
> Dave
>
> --
> Dr. David Alan Gilbert / address@hidden / Manchester, UK
>
- [Qemu-ppc] [QEMU PATCH v6 0/2] migration: migrate QTAILQ, Jianjun Duan, 2016/10/13
- Re: [Qemu-ppc] [QEMU PATCH v6 2/2] migration: migrate QTAILQ, Jianjun Duan, 2016/10/14
- Re: [Qemu-ppc] [QEMU PATCH v6 2/2] migration: migrate QTAILQ, Dr. David Alan Gilbert, 2016/10/14
- Re: [Qemu-ppc] [QEMU PATCH v6 2/2] migration: migrate QTAILQ, Jianjun Duan, 2016/10/14
- Re: [Qemu-ppc] [Qemu-devel] [QEMU PATCH v6 2/2] migration: migrate QTAILQ, Halil Pasic, 2016/10/15