qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	"Huangpeng (Peter)" <peter.huangpeng@huawei.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Shannon Zhao <shannon.zhao@linaro.org>,
	Shannon Zhao <zhaoshenglong@huawei.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Christoffer Dall <christoffer.dall@linaro.org>
Subject: Re: [Qemu-devel] [PATCH 0/4] virtio: Move host features to backends
Date: Mon, 20 Apr 2015 14:43:59 +0200	[thread overview]
Message-ID: <20150420141523-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <20150420141430.2f35b3f9.cornelia.huck@de.ibm.com>

On Mon, Apr 20, 2015 at 02:14:30PM +0200, Cornelia Huck wrote:
> On Mon, 20 Apr 2015 11:12:37 +0200
> "Michael S. Tsirkin" <mst@redhat.com> wrote:
> 
> > On Mon, Apr 20, 2015 at 10:54:11AM +0200, Cornelia Huck wrote:
> > > On Fri, 17 Apr 2015 15:00:45 +0100
> > > Peter Maydell <peter.maydell@linaro.org> wrote:
> > > 
> > > > On 17 April 2015 at 14:43, Cornelia Huck <cornelia.huck@de.ibm.com> wrote:
> > > > > On Fri, 17 Apr 2015 20:13:42 +0800
> > > > > Shannon Zhao <shannon.zhao@linaro.org> wrote:
> > > > >
> > > > > [Some questions may be silly, but I'm not familiar with the virtio-mmio
> > > > > code]
> > > > >
> > > > >> 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.
> > > > >
> > > > > So how does virtio-mmio expose any host features?
> > > > 
> > > > The features are properties of the backend, not the transport.
> > > > So for devices where we didn't set these up as "properties
> > > > exist on the backend and the compatibility transport+backend
> > > > wrapper devices just forward those properties to the backend",
> > > > you can't set the properties. We got this right for some of
> > > > the backends (eg blk) but not all of them, I think.
> > > 
> > > The reason why blk is ok is that it adds the feature bits in its
> > > ->get_features() callback. net expects the feature bits already present
> > > and removes not supported ones and therefore requires
> > > statically-defined bits somewhere.
> > > 
> > > If we move the feature bits to virtio-net and virtio-scsi, it should
> > > work for virtio-mmio - but the feature bit propagation from the device
> > > into the transport becomes a bit useless.
> > > 
> > > Could net and scsi add the feature bits dynamically in their
> > > ->get_features() callback instead? This should work for virtio-mmio as
> > > well afaics.
> > > 
> > > In the end, we should probably end up with the same mechanism for all
> > > device types.
> > 
> > I think I would also prefer that the host features live in the
> > generic virtio device structure. 
> 
> You mean in the virtio device instead of the proxy device?

Yes.

> I think that
> makes sense conceptually, provided we get the realize/plug sequence
> correct.
> 
> > This would make it possible
> > e.g. to validate guest features on vm load in generic code.
> > 
> 
> Doesn't virtio_load() already do some validation?

You are right here.

-- 
MST

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

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-17 12:13 [Qemu-devel] [PATCH 0/4] virtio: Move host features to backends Shannon Zhao
2015-04-17 12:13 ` [Qemu-devel] [PATCH 1/4] hw/s390x/virtio-ccw: Add virtio_ccw_device_plugged for virtio-ccw Shannon Zhao
2015-04-17 13:44   ` Cornelia Huck
2015-04-17 14:50     ` Shannon Zhao
2015-04-17 15:33   ` Peter Maydell
2015-04-18  1:36     ` Shannon Zhao
2015-04-17 12:13 ` [Qemu-devel] [PATCH 2/4] hw/s390x/s390-virtio-bus: Add virtio_s390_device_plugged for s390-virtio Shannon Zhao
2015-04-17 12:13 ` [Qemu-devel] [PATCH 3/4] hw/net/virtio-net: Move DEFINE_VIRTIO_NET_FEATURES to virtio-net Shannon Zhao
2015-04-17 14:05   ` Peter Maydell
2015-04-17 14:50     ` Shannon Zhao
2015-04-17 15:03       ` Peter Maydell
2015-04-17 12:13 ` [Qemu-devel] [PATCH 4/4] virtio-scsi: Move DEFINE_VIRTIO_SCSI_FEATURES to virtio-scsi Shannon Zhao
2015-04-17 13:43 ` [Qemu-devel] [PATCH 0/4] virtio: Move host features to backends Cornelia Huck
2015-04-17 14:00   ` Peter Maydell
2015-04-20  8:54     ` Cornelia Huck
2015-04-20  9:02       ` Peter Maydell
2015-04-20  9:12       ` Michael S. Tsirkin
2015-04-20 12:14         ` Cornelia Huck
2015-04-20 12:43           ` Michael S. Tsirkin [this message]

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=20150420141523-mutt-send-email-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=christoffer.dall@linaro.org \
    --cc=cornelia.huck@de.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.huangpeng@huawei.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=shannon.zhao@linaro.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).