From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57010) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yj5AR-00051P-B9 for qemu-devel@nongnu.org; Fri, 17 Apr 2015 08:14:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yj5AN-0001vd-3J for qemu-devel@nongnu.org; Fri, 17 Apr 2015 08:14:43 -0400 Received: from mail-pa0-f42.google.com ([209.85.220.42]:33961) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yj5AM-0001um-UU for qemu-devel@nongnu.org; Fri, 17 Apr 2015 08:14:39 -0400 Received: by pacyx8 with SMTP id yx8so123594619pac.1 for ; Fri, 17 Apr 2015 05:14:36 -0700 (PDT) From: Shannon Zhao Date: Fri, 17 Apr 2015 20:13:42 +0800 Message-Id: <1429272826-4145-1-git-send-email-shannon.zhao@linaro.org> Subject: [Qemu-devel] [PATCH 0/4] virtio: Move host features to backends List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, mst@redhat.com, peter.huangpeng@huawei.com, shannon.zhao@linaro.org, zhaoshenglong@huawei.com, pbonzini@redhat.com, christoffer.dall@linaro.org 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. 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(-) -- 2.0.4