Re: [PATCH V2] virtio-net: introduce admin control virtqueue

From
Cornelia Huck <>
Date
2021-02-01T16:10:49+00:00
ID
Thread
Re: [PATCH V2] virtio-net: introduce admin control virtqueue
On Mon, 1 Feb 2021 11:42:31 +0800
Jason Wang <> wrote:

> On 2021/1/29 äå6:57, Cornelia Huck wrote:
> > On Thu, 28 Jan 2021 10:58:49 +0800
> > Jason Wang <> wrote:
> >  
> >> On 2021/1/27 äå6:59, Michael S. Tsirkin wrote:  
> >>> Thus, an idea. How about controlling features instead?
> >>>
> >>> And with that, the interface becomes generic and applicable
> >>> to all devices not just net ...  
> >>
> >> Yes, so I think we probably need more than this e.g I had plan to
> >> introduce a general admin virtqueue which could be use to replace the
> >> transport specific way to configure/probe virtual devices. I think we
> >> can add this new features controlling command via that virtqueue.
> >>
> >> So if this makes sense. I will drop the trust command in this patch and
> >> let admin cvq go first. Then I can post general admin virtqueue patch.
> >>
> >> Does this make sense?  
> > So, you'd introduce a generic admin virtqueue and give individual
> > device types the possibility to use it for device type specific
> > commands?  
> 
> 
> This is mainly for the trust command. The idea is to have a admin 
> virtqueue that is used to manage the features that belongs to a virtual 
> device. And in the admin virtqueue, we can introduce a command like:
> 
> VIRTIO_ADMIN_CTRL_DEV_FEATURES
> 
> that is used to control the features set of a specific virtual device. 
> Then there's no need for a specialized trust command in the admin 
> control vq for virtio-net.
> 
> E.g we can filter out VIRTIO_NET_F_CTRL_MAC_ADDR if we don't want to set 
> mac address via control virtqueue, then the virtual device can't see 
> this feature via cvq (or admin cvq).

Ok, I think I have to see the result, but it seems workable.