qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: shannon.zhao@linaro.org
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
Subject: [Qemu-devel] [PATCH v2 0/2] virtio: Move host features to backends
Date: Mon, 20 Apr 2015 16:19:59 +0800	[thread overview]
Message-ID: <1429518001-1040-1-git-send-email-shannon.zhao@linaro.org> (raw)

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 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

             reply	other threads:[~2015-04-20  8:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-20  8:19 shannon.zhao [this message]
2015-04-20  8:20 ` [Qemu-devel] [PATCH v2 1/2] hw/net/virtio-net: Move DEFINE_VIRTIO_NET_FEATURES to virtio-net shannon.zhao
2015-04-20  9:20   ` Cornelia Huck
2015-04-20 11:32   ` Cornelia Huck
2015-04-20 13:32     ` Shannon Zhao
2015-04-20 14:08       ` Cornelia Huck
2015-04-20 14:34         ` Peter Maydell
2015-04-20 16:44           ` Cornelia Huck
2015-04-21  1:43     ` Shannon Zhao
2015-04-21  7:30       ` Cornelia Huck
2015-04-21 10:33         ` Shannon Zhao
2015-04-20  8:20 ` [Qemu-devel] [PATCH v2 2/2] virtio-scsi: Move DEFINE_VIRTIO_SCSI_FEATURES to virtio-scsi shannon.zhao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1429518001-1040-1-git-send-email-shannon.zhao@linaro.org \
    --to=shannon.zhao@linaro.org \
    --cc=christoffer.dall@linaro.org \
    --cc=cornelia.huck@de.ibm.com \
    --cc=hangaohuai@huawei.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.huangpeng@huawei.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=zhaoshenglong@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).