qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 4/7] vhost: involve device backends in feature negotiation


From: Michael S. Tsirkin
Subject: Re: [PATCH v2 4/7] vhost: involve device backends in feature negotiation
Date: Wed, 10 Jun 2020 00:15:02 -0400

On Wed, Jun 10, 2020 at 11:21:50AM +0800, Jason Wang wrote:
> 
> On 2020/6/10 上午2:07, Michael S. Tsirkin wrote:
> > > +/*
> > > + * Default vhost_get_features() feature bits for existing device types 
> > > that do
> > > + * not define their own.
> > > + *
> > > + * This is a workaround for existing device types, do not use this in 
> > > new vhost
> > > + * device types. Explicitly define a list of feature bits instead.
> > > + *
> > > + * The following feature bits are excluded because libvhost-user device
> > > + * backends did not advertise them for a long time. Therefore we cannot 
> > > detect
> > > + * their presence. Instead we assume they are always supported by the 
> > > device
> > > + * backend:
> > > + * VIRTIO_F_NOTIFY_ON_EMPTY
> > > + * VIRTIO_F_ANY_LAYOUT
> > > + * VIRTIO_F_VERSION_1
> > > + * VIRTIO_RING_F_INDIRECT_DESC
> > > + * VIRTIO_RING_F_EVENT_IDX
> > Weird. I remember that it's common for vhost-user not to set
> > VIRTIO_RING_F_INDIRECT_DESC - they have huge queues so
> > don't need it and inline descriptors give them better
> > performance.
> > 
> > So what's going on here?
> 
> 
> I guess one reason is to support live migration between vhost-user and
> vhost-net.
> 
> Thanks
> 

But how can we force-enable features backend doesn't want to enable?
This may or may not break backends ...
I would rather just be strict and ask backends to fix their feature
bits. See user_feature_bits in hw/net/vhost-net.c which supports
all these features.

-- 
MST




reply via email to

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