From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bq06H-0005qp-Hi for qemu-devel@nongnu.org; Fri, 30 Sep 2016 11:51:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bq06E-00051x-Tb for qemu-devel@nongnu.org; Fri, 30 Sep 2016 11:51:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35482) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bq06E-00051c-KS for qemu-devel@nongnu.org; Fri, 30 Sep 2016 11:51:46 -0400 Date: Fri, 30 Sep 2016 16:51:42 +0100 From: "Dr. David Alan Gilbert" Message-ID: <20160930155141.GF2095@work-vm> References: <20160930142003.53232-1-pasic@linux.vnet.ibm.com> <0cba1e29-7337-04a3-bbd1-8dcdd4eebd1b@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0cba1e29-7337-04a3-bbd1-8dcdd4eebd1b@redhat.com> Subject: Re: [Qemu-devel] [PATCH 00/11] virtio migration: simplify vmstate helper List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Halil Pasic , qemu-devel@nongnu.org, "Michael S . Tsirkin" , "Aneesh Kumar K . V" , Stefan Hajnoczi , Amit Shah , Gerd Hoffmann * Paolo Bonzini (pbonzini@redhat.com) wrote: > > > On 30/09/2016 16:19, Halil Pasic wrote: > > As a part of the long term effort to convert migration to vmstate the > > migration of virtio devices was recently partially switched to vmstate > > starting with the outer layer (commit 5943124cc "virtio: Migration > > helper function and macro" and the subsequent "virtio-*: Wrap in > > vmstate" commits). This was done by introducing a vmstate based wrapper > > driving the well know virtio migration process. As this transition is > > still in progress, some synergies were left unexploited, and some things > > can be expressed in a more vmstatish way. > > Another useful thing to do is to move code out of virtio_load and into a > post_load callback of vmstate_virtio. Yes, and I'm hoping that we'll be able to get more of virtio_load/virtio_save into normal macros within the vmstate_virtio eventually. So other than the minor issues Paolo suggested on the macro: Reviewed-by: Dr. David Alan Gilbert Dave > > Paolo > > > Let us simplify a couple of things and get rid of some code duplication. > > > > Did only a couple of smoke tests. Comprehensive testing is still to be done. > > > > Halil Pasic (11): > > virtio: add VIRTIO_DEF_DEVICE_VMSD macro > > virtio-blk: convert to VIRTIO_DEF_DEVICE_VMSD > > virtio-net: convert to VIRTIO_DEF_DEVICE_VMSD > > virtio-9p: convert to VIRTIO_DEF_DEVICE_VMSD > > virtio-serial: convert to VIRTIO_DEF_DEVICE_VMSD > > virtio-gpu: do not use VMSTATE_VIRTIO_DEVICE > > virtio-input: convert to VIRTIO_DEF_DEVICE_VMSD > > virtio-scsi: convert to VIRTIO_DEF_DEVICE_VMSD > > virtio-balloon: convert to VIRTIO_DEF_DEVICE_VMSD > > virtio-rng: convert to VIRTIO_DEF_DEVICE_VMSD > > virtio: remove unused VMSTATE_VIRTIO_DEVICE > > > > hw/9pfs/virtio-9p-device.c | 7 +------ > > hw/block/virtio-blk.c | 17 +---------------- > > hw/char/virtio-serial-bus.c | 8 +------- > > hw/display/virtio-gpu.c | 39 +++++++++++++++++++++++++++------------ > > hw/input/virtio-input.c | 13 +++---------- > > hw/net/virtio-net.c | 32 +++++++++++--------------------- > > hw/scsi/virtio-scsi.c | 18 +----------------- > > hw/virtio/virtio-balloon.c | 7 +------ > > hw/virtio/virtio-rng.c | 10 ++-------- > > hw/virtio/virtio.c | 11 ++++++++++- > > include/hw/virtio/virtio.h | 31 ++++++++++++++++++------------- > > 11 files changed, 76 insertions(+), 117 deletions(-) > > > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK