qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 0/4] virtio: Move host features to backends


From: Cornelia Huck
Subject: Re: [Qemu-devel] [PATCH 0/4] virtio: Move host features to backends
Date: Mon, 20 Apr 2015 10:54:11 +0200

On Fri, 17 Apr 2015 15:00:45 +0100
Peter Maydell <address@hidden> wrote:

> On 17 April 2015 at 14:43, Cornelia Huck <address@hidden> wrote:
> > On Fri, 17 Apr 2015 20:13:42 +0800
> > Shannon Zhao <address@hidden> 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]