From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48702) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yn4w0-0000TM-7X for qemu-devel@nongnu.org; Tue, 28 Apr 2015 08:48:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yn4vw-0008BU-BY for qemu-devel@nongnu.org; Tue, 28 Apr 2015 08:48:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35642) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yn4vw-00089h-3s for qemu-devel@nongnu.org; Tue, 28 Apr 2015 08:48:16 -0400 Date: Tue, 28 Apr 2015 14:48:01 +0200 From: "Michael S. Tsirkin" Message-ID: <20150428144735-mutt-send-email-mst@redhat.com> References: <1430221873-5788-1-git-send-email-shannon.zhao@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1430221873-5788-1-git-send-email-shannon.zhao@linaro.org> Subject: Re: [Qemu-devel] [PATCH v4 0/2] virtio: Move host features to backends List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: shannon.zhao@linaro.org Cc: peter.maydell@linaro.org, hangaohuai@huawei.com, peter.huangpeng@huawei.com, qemu-devel@nongnu.org, zhaoshenglong@huawei.com, cornelia.huck@de.ibm.com, pbonzini@redhat.com, christoffer.dall@linaro.org On Tue, Apr 28, 2015 at 07:51:11PM +0800, shannon.zhao@linaro.org wrote: > From: Shannon Zhao > > 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. > > 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. So if we move the > host features to backends, it doesn't break the backwards compatibility > for virtio-*-pci, virtio-*-s390, and virtio-*-ccw. > > 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, especially to virtio-net-device. Can you move COMMON_FEATURES too please? > changes since v3: > * detail the changes in commit log > * don't expose virtio_net_set_config_size > > changes since v2: > * move virtio_net_set_config_size to virtio-net (Cornelia) > > changes since v1: > * drop unnecessary change of adding device_plugged hook for > virtio-ccw and s390-virtio-bus (Cornelia) > > Shannon Zhao (2): > 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 | 7 ++++++- > hw/s390x/s390-virtio-bus.c | 3 --- > hw/s390x/virtio-ccw.c | 3 --- > hw/scsi/virtio-scsi.c | 5 +++++ > hw/virtio/virtio-pci.c | 3 --- > include/hw/virtio/virtio-net.h | 2 +- > include/hw/virtio/virtio-scsi.h | 1 + > 7 files changed, 13 insertions(+), 11 deletions(-) > > -- > 2.1.0