All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v3 0/2] virtio: Move host features to backends
@ 2015-04-21 10:51 shannon.zhao
  2015-04-21 10:51 ` [Qemu-devel] [PATCH v3 1/2] hw/net/virtio-net: Move DEFINE_VIRTIO_NET_FEATURES to virtio-net shannon.zhao
  2015-04-21 10:51 ` [Qemu-devel] [PATCH v3 2/2] virtio-scsi: Move DEFINE_VIRTIO_SCSI_FEATURES to virtio-scsi shannon.zhao
  0 siblings, 2 replies; 12+ messages in thread
From: shannon.zhao @ 2015-04-21 10:51 UTC (permalink / raw)
  To: qemu-devel, peter.maydell, cornelia.huck, mst, pbonzini,
	christoffer.dall
  Cc: hangaohuai, peter.huangpeng, zhaoshenglong

From: Shannon Zhao <shannon.zhao@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. 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 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):
  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             | 5 +++++
 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  | 1 +
 include/hw/virtio/virtio-scsi.h | 1 +
 7 files changed, 12 insertions(+), 9 deletions(-)

-- 
2.1.0

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-04-28  9:29 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-21 10:51 [Qemu-devel] [PATCH v3 0/2] virtio: Move host features to backends shannon.zhao
2015-04-21 10:51 ` [Qemu-devel] [PATCH v3 1/2] hw/net/virtio-net: Move DEFINE_VIRTIO_NET_FEATURES to virtio-net shannon.zhao
2015-04-22 14:24   ` Cornelia Huck
2015-04-23  0:31     ` Shannon Zhao
2015-04-21 10:51 ` [Qemu-devel] [PATCH v3 2/2] virtio-scsi: Move DEFINE_VIRTIO_SCSI_FEATURES to virtio-scsi shannon.zhao
2015-04-28  0:32   ` Shannon Zhao
2015-04-28  5:55     ` Michael S. Tsirkin
2015-04-28  6:30       ` Shannon Zhao
2015-04-28  7:15         ` Michael S. Tsirkin
2015-04-28  7:28           ` Shannon Zhao
2015-04-28  8:18             ` Michael S. Tsirkin
2015-04-28  9:29               ` Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.