From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59928) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZaJjG-0002Hh-Q5 for qemu-devel@nongnu.org; Fri, 11 Sep 2015 04:30:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZaJjD-0007nK-4n for qemu-devel@nongnu.org; Fri, 11 Sep 2015 04:30:42 -0400 Received: from e06smtp12.uk.ibm.com ([195.75.94.108]:32843) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZaJjC-0007jS-Gq for qemu-devel@nongnu.org; Fri, 11 Sep 2015 04:30:38 -0400 Received: from /spool/local by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 11 Sep 2015 09:30:25 +0100 Date: Fri, 11 Sep 2015 10:30:21 +0200 From: Cornelia Huck Message-ID: <20150911103021.19f73181.cornelia.huck@de.ibm.com> In-Reply-To: <1441958516-21107-1-git-send-email-jasowang@redhat.com> References: <1441958516-21107-1-git-send-email-jasowang@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] virtio-net: unbreak self announcement and guest offloads after migration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jason Wang Cc: qemu-stable@nongnu.org, Gerd Hoffmann , qemu-devel@nongnu.org, mst@redhat.com On Fri, 11 Sep 2015 16:01:56 +0800 Jason Wang wrote: > After commit 019a3edbb25f1571e876f8af1ce4c55412939e5d ("virtio: make > features 64bit wide"). Device's guest_features was actually set after > vdc->load(). This breaks the assumption that device specific load() > function can check guest_features. For virtio-net, self announcement > and guest offloads won't work after migration. > > Fixing this by defer them to virtio_net_load() where guest_features > were guaranteed to be set. Other virtio devices looks fine. > > Fixes: 019a3edbb25f1571e876f8af1ce4c55412939e5d > ("virtio: make features 64bit wide") > Cc: qemu-stable@nongnu.org > Cc: Gerd Hoffmann > Signed-off-by: Jason Wang > --- > hw/net/virtio-net.c | 40 +++++++++++++++++++++++----------------- > 1 file changed, 23 insertions(+), 17 deletions(-) Migration support for virtio is really a twisty maze, it's easy to make mistakes like that :( Reviewed-by: Cornelia Huck