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

2020-07-06 Thread Stefan Hajnoczi
On Tue, Jun 09, 2020 at 02:07:44PM -0400, Michael S. Tsirkin wrote: > On Tue, Jun 09, 2020 at 06:02:15PM +0100, Stefan Hajnoczi wrote: > > Many vhost devices in QEMU currently do not involve the device backend > > in feature negotiation. This seems fine at first glance when no > > device-specific f

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

2020-06-09 Thread Michael S. Tsirkin
On Wed, Jun 10, 2020 at 01:53:57PM +0800, Jason Wang wrote: > > On 2020/6/10 下午12:15, Michael S. Tsirkin wrote: > > 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

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

2020-06-09 Thread Jason Wang
On 2020/6/10 下午2:11, Michael S. Tsirkin wrote: On Wed, Jun 10, 2020 at 01:53:57PM +0800, Jason Wang wrote: On 2020/6/10 下午12:15, Michael S. Tsirkin wrote: 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_fea

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

2020-06-09 Thread Michael S. Tsirkin
On Tue, Jun 09, 2020 at 06:02:15PM +0100, Stefan Hajnoczi wrote: > Many vhost devices in QEMU currently do not involve the device backend > in feature negotiation. This seems fine at first glance when no > device-specific feature bits are defined (virtio-net has many but some > devices have none).

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

2020-06-09 Thread Jason Wang
On 2020/6/10 下午12:15, Michael S. Tsirkin wrote: 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

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

2020-06-09 Thread Michael S. Tsirkin
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 existin

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

2020-06-09 Thread Jason Wang
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

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

2020-06-09 Thread Michael S. Tsirkin
On Tue, Jun 09, 2020 at 06:02:15PM +0100, Stefan Hajnoczi wrote: > Many vhost devices in QEMU currently do not involve the device backend > in feature negotiation. This seems fine at first glance when no > device-specific feature bits are defined (virtio-net has many but some > devices have none).

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

2020-06-09 Thread Stefan Hajnoczi
Many vhost devices in QEMU currently do not involve the device backend in feature negotiation. This seems fine at first glance when no device-specific feature bits are defined (virtio-net has many but some devices have none). Unfortunately this causes problems when QEMU's virtqueue implementation