From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46072) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bv5oh-0001t2-50 for qemu-devel@nongnu.org; Fri, 14 Oct 2016 12:58:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bv5od-0003Cy-Qx for qemu-devel@nongnu.org; Fri, 14 Oct 2016 12:58:43 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:55939 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bv5od-0003Ct-Lo for qemu-devel@nongnu.org; Fri, 14 Oct 2016 12:58:39 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u9EGrdSL084159 for ; Fri, 14 Oct 2016 12:58:39 -0400 Received: from e31.co.us.ibm.com (e31.co.us.ibm.com [32.97.110.149]) by mx0b-001b2d01.pphosted.com with ESMTP id 262ymq36b6-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 14 Oct 2016 12:58:39 -0400 Received: from localhost by e31.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 14 Oct 2016 10:58:38 -0600 References: <1476394254-7987-1-git-send-email-duanj@linux.vnet.ibm.com> <1476394254-7987-2-git-send-email-duanj@linux.vnet.ibm.com> <20161014092322.GB2030@work-vm> From: Jianjun Duan Date: Fri, 14 Oct 2016 09:58:28 -0700 MIME-Version: 1.0 In-Reply-To: <20161014092322.GB2030@work-vm> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Message-Id: Subject: Re: [Qemu-devel] [QEMU PATCH v6 1/2] migration: extend VMStateInfo List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert" Cc: qemu-devel@nongnu.org, qemu-ppc@nongnu.org, dmitry@daynix.com, peter.maydell@linaro.org, kraxel@redhat.com, mst@redhat.com, david@gibson.dropbear.id.au, pbonzini@redhat.com, veroniabahaa@gmail.com, quintela@redhat.com, amit.shah@redhat.com, mreitz@redhat.com, kwolf@redhat.com, rth@twiddle.net, aurelien@aurel32.net, leon.alrae@imgtec.com, blauwirbel@gmail.com, mark.cave-ayland@ilande.co.uk, mdroth@linux.vnet.ibm.com On 10/14/2016 02:23 AM, Dr. David Alan Gilbert wrote: > * Jianjun Duan (duanj@linux.vnet.ibm.com) 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 >> --- >> 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(-) > > > >> -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 / dgilbert@redhat.com / Manchester, UK >