From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34992) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yk6wD-0007qr-GX for qemu-devel@nongnu.org; Mon, 20 Apr 2015 04:20:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yk6wA-000499-9E for qemu-devel@nongnu.org; Mon, 20 Apr 2015 04:20:17 -0400 Received: from mail-pd0-f175.google.com ([209.85.192.175]:36488) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yk6wA-00048i-3y for qemu-devel@nongnu.org; Mon, 20 Apr 2015 04:20:14 -0400 Received: by pdea3 with SMTP id a3so200696653pde.3 for ; Mon, 20 Apr 2015 01:20:12 -0700 (PDT) From: shannon.zhao@linaro.org Date: Mon, 20 Apr 2015 16:19:59 +0800 Message-Id: <1429518001-1040-1-git-send-email-shannon.zhao@linaro.org> Subject: [Qemu-devel] [PATCH v2 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 v1: * drop unnecessary change of adding device_plugged hook for virtio-ccw and s390-virtio-bus (Cornelia) Shannon Zhao (2): 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 | 2 -- hw/s390x/virtio-ccw.c | 2 -- 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, 11 insertions(+), 6 deletions(-) -- 2.0.4