Re: [virtio] [PATCH v5] virtio-blk: restore VIRTIO_BLK_F_FLUSH and VIRTIO_BLK_F_CONFIG_WCE

From
Paolo Bonzini <>
Date
2015-08-11T17:00:59+00:00
ID
Thread
Re: [virtio] [PATCH v5] virtio-blk: restore VIRTIO_BLK_F_FLUSH and VIRTIO_BLK_F_CONFIG_WCE
On 11/08/2015 16:10, Michael S. Tsirkin wrote:
> > > When using the legacy interface, the transitional devices MAY assume
> > > that driver features won't be changed after reading \field{writeback}.
> > 
> > There is already a legacy section, so we can just add this there:
> > 
> > \item the driver MAY read or write \field{writeback} before setting the
> > DRIVER or DRIVER_OK \field{status} bit
> 
> Yes but the device needs to know the features to set it, right?
> That's why I proposed "the transitional devices MAY assume
> that driver features won't be changed".

No, I don't think that's necessary.  The simplest way for transitional
devices to obey the spec is to "modify" writeback only:

- at reset time.  In this case the spec says that modification can happen

- when the driver sets DRIVER_OK if the driver hasn't set the CONFIG_WCE
driver feature.  In this case the field doesn't really exist at all.

I'll put this in v6.

Paolo