From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59791) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yn48m-0005B5-It for qemu-devel@nongnu.org; Tue, 28 Apr 2015 07:57:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yn42q-0003vR-VX for qemu-devel@nongnu.org; Tue, 28 Apr 2015 07:51:56 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:34593) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yn42q-0003vH-Oi for qemu-devel@nongnu.org; Tue, 28 Apr 2015 07:51:20 -0400 Received: by pacyx8 with SMTP id yx8so162332530pac.1 for ; Tue, 28 Apr 2015 04:51:19 -0700 (PDT) From: shannon.zhao@linaro.org Date: Tue, 28 Apr 2015 19:51:11 +0800 Message-Id: <1430221873-5788-1-git-send-email-shannon.zhao@linaro.org> Subject: [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: qemu-devel@nongnu.org, peter.maydell@linaro.org, cornelia.huck@de.ibm.com, mst@redhat.com, pbonzini@redhat.com, christoffer.dall@linaro.org Cc: hangaohuai@huawei.com, peter.huangpeng@huawei.com, zhaoshenglong@huawei.com 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. 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