From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57944) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkbJh-0005fO-Ai for qemu-devel@nongnu.org; Wed, 14 May 2014 11:42:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WkbJX-0006wy-PT for qemu-devel@nongnu.org; Wed, 14 May 2014 11:42:01 -0400 Received: from e06smtp14.uk.ibm.com ([195.75.94.110]:54767) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkbJX-0006wu-FV for qemu-devel@nongnu.org; Wed, 14 May 2014 11:41:51 -0400 Received: from /spool/local by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 14 May 2014 16:41:50 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 2CA4617D8047 for ; Wed, 14 May 2014 16:42:57 +0100 (BST) Received: from d06av03.portsmouth.uk.ibm.com (d06av03.portsmouth.uk.ibm.com [9.149.37.213]) by b06cxnps3075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s4EFfmO9065792 for ; Wed, 14 May 2014 15:41:48 GMT Received: from d06av03.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av03.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s4EFfmqT010124 for ; Wed, 14 May 2014 09:41:48 -0600 From: Greg Kurz Date: Wed, 14 May 2014 17:41:45 +0200 Message-ID: <20140514154145.10746.4110.stgit@bahia.local> In-Reply-To: <20140514154130.10746.1412.stgit@bahia.local> References: <20140514154130.10746.1412.stgit@bahia.local> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH RFC 2/8] virtio-net: migrate subsections List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , Anthony Liguori , "Michael S. Tsirkin" , Stefan Hajnoczi , Amit Shah , Paolo Bonzini Cc: Juan Quintela , Fam Zheng , Alexander Graf , Andreas =?utf-8?q?F=C3=A4rber?= , qemu-devel@nongnu.org Signed-off-by: Greg Kurz --- hw/net/virtio-net.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index fd23c46..4004d02 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -1300,6 +1300,8 @@ static void virtio_net_save(QEMUFile *f, void *opaque) if ((1 << VIRTIO_NET_F_CTRL_GUEST_OFFLOADS) & vdev->guest_features) { qemu_put_be64(f, n->curr_guest_offloads); } + + virtio_save_subsections(vdev, f); } static int virtio_net_load(QEMUFile *f, void *opaque, int version_id) @@ -1396,6 +1398,11 @@ static int virtio_net_load(QEMUFile *f, void *opaque, int version_id) n->curr_guest_offloads = virtio_net_supported_guest_offloads(n); } + ret = virtio_load_subsections(vdev, f); + if (ret) { + return ret; + } + if (peer_has_vnet_hdr(n)) { virtio_net_apply_guest_offloads(n); }