From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35899) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YkVVK-0001RA-JB for qemu-devel@nongnu.org; Tue, 21 Apr 2015 06:34:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YkVVE-000175-Hl for qemu-devel@nongnu.org; Tue, 21 Apr 2015 06:34:10 -0400 Received: from mail-pd0-f172.google.com ([209.85.192.172]:35220) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YkVVE-00016x-Bj for qemu-devel@nongnu.org; Tue, 21 Apr 2015 06:34:04 -0400 Received: by pdbqd1 with SMTP id qd1so238164209pdb.2 for ; Tue, 21 Apr 2015 03:34:03 -0700 (PDT) Message-ID: <5536278D.8010503@linaro.org> Date: Tue, 21 Apr 2015 18:33:49 +0800 From: Shannon Zhao MIME-Version: 1.0 References: <1429518001-1040-1-git-send-email-shannon.zhao@linaro.org> <1429518001-1040-2-git-send-email-shannon.zhao@linaro.org> <20150420133203.2fd6caff.cornelia.huck@de.ibm.com> <5535AB48.6010808@linaro.org> <20150421093025.4a64d51e.cornelia.huck@de.ibm.com> In-Reply-To: <20150421093025.4a64d51e.cornelia.huck@de.ibm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 1/2] hw/net/virtio-net: Move DEFINE_VIRTIO_NET_FEATURES to virtio-net List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cornelia Huck Cc: peter.maydell@linaro.org, hangaohuai@huawei.com, mst@redhat.com, peter.huangpeng@huawei.com, qemu-devel@nongnu.org, zhaoshenglong@huawei.com, pbonzini@redhat.com, christoffer.dall@linaro.org On 2015/4/21 15:30, Cornelia Huck wrote: > On Tue, 21 Apr 2015 09:43:36 +0800 > Shannon Zhao wrote: > >> On 2015/4/20 19:32, Cornelia Huck wrote: >>> On Mon, 20 Apr 2015 16:20:00 +0800 >>> shannon.zhao@linaro.org wrote: >>> >>>> From: Shannon Zhao >>>> >>>> Move DEFINE_VIRTIO_NET_FEATURES to the backend virtio-net. >>>> The transports just sync the host features from backend. >>>> >>>> Signed-off-by: Shannon Zhao >>>> Signed-off-by: Shannon Zhao >>>> --- >>>> hw/net/virtio-net.c | 4 ++++ >>>> hw/s390x/s390-virtio-bus.c | 1 - >>>> hw/s390x/virtio-ccw.c | 1 - >>>> hw/virtio/virtio-pci.c | 1 - >>>> include/hw/virtio/virtio-net.h | 1 + >>>> 5 files changed, 5 insertions(+), 3 deletions(-) >>> >>> I need the following change to make this work for virtio-ccw: >>> >> >> >> Maybe we can use following patch. This moves virtio_net_set_config_size to >> virtio_net_device_realize function. As the features are moved to virtio-net, >> so we should set the config_size in virtio-net too. And this can be useful to >> virtio-mmio which now doesn't call virtio_net_set_config_size in >> virtio-mmio's realize function. > > I think this makes sense. > >> >> Cornelia, could you check if this works on s390? Thanks. > > Networking works again via virtio-ccw with this patch on top. > > I'll still try to figure out a better sequence for realizing/plugging > virtio-ccw devices, but I think that is orthogonal to this patch. > Cornelia, thanks for your help :) Will add this and send them as v3. -- Shannon