From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49125) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yj6Ye-0003jI-5f for qemu-devel@nongnu.org; Fri, 17 Apr 2015 09:43:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yj6Ya-00041V-1L for qemu-devel@nongnu.org; Fri, 17 Apr 2015 09:43:48 -0400 Received: from e06smtp11.uk.ibm.com ([195.75.94.107]:44741) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yj6YZ-0003yh-Ov for qemu-devel@nongnu.org; Fri, 17 Apr 2015 09:43:43 -0400 Received: from /spool/local by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 17 Apr 2015 14:43:42 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 593402190056 for ; Fri, 17 Apr 2015 14:43:24 +0100 (BST) Received: from d06av03.portsmouth.uk.ibm.com (d06av03.portsmouth.uk.ibm.com [9.149.37.213]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t3HDhdoP64946358 for ; Fri, 17 Apr 2015 13:43:39 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 t3HDhcBE019763 for ; Fri, 17 Apr 2015 07:43:38 -0600 Date: Fri, 17 Apr 2015 15:43:35 +0200 From: Cornelia Huck Message-ID: <20150417154335.7fa224ce.cornelia.huck@de.ibm.com> In-Reply-To: <1429272826-4145-1-git-send-email-shannon.zhao@linaro.org> References: <1429272826-4145-1-git-send-email-shannon.zhao@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 0/4] virtio: Move host features to backends List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Shannon Zhao Cc: peter.maydell@linaro.org, mst@redhat.com, peter.huangpeng@huawei.com, qemu-devel@nongnu.org, zhaoshenglong@huawei.com, pbonzini@redhat.com, christoffer.dall@linaro.org On Fri, 17 Apr 2015 20:13:42 +0800 Shannon Zhao wrote: [Some questions may be silly, but I'm not familiar with the virtio-mmio code] > The reason to do this is that the virtio-net-device can't expose host > features to guest while using virtio-mmio. So the performance is low. So how does virtio-mmio expose any host features? > > The virtio-*-pci, virtio-*-s390, and virtio-*-ccw already have the ability > to forward property accesses to the backend child, by calling > *_virtio_*_instance_init -> qdev_alias_all_properties. Is there a way virtio-mmio could make use of instance_init? > > Here we move the host features to backends, involving > DEFINE_VIRTIO_NET_FEATURES, DEFINE_VIRTIO_SCSI_FEATURES. So the virtio-mmio > devices could have the host freatures, and this has a great performance > improvement to virtio-mmio. > > This is also backward compatible for s390 and x86. > > Shannon Zhao (4): > hw/s390x/virtio-ccw: Add virtio_ccw_device_plugged for virtio-ccw > hw/s390x/s390-virtio-bus: Add virtio_s390_device_plugged for > s390-virtio > hw/net/virtio-net: Move DEFINE_VIRTIO_NET_FEATURES to virtio-net > virtio-scsi: Move DEFINE_VIRTIO_SCSI_FEATURES to virtio-scsi > > hw/net/virtio-net.c | 4 ++++ > hw/s390x/s390-virtio-bus.c | 12 ++++++++++-- > hw/s390x/virtio-ccw.c | 13 +++++++++++-- > hw/scsi/virtio-scsi.c | 5 +++++ > hw/virtio/virtio-pci.c | 2 -- > include/hw/virtio/virtio-net.h | 1 + > include/hw/virtio/virtio-scsi.h | 1 + > 7 files changed, 32 insertions(+), 6 deletions(-) >