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

From
Paolo Bonzini <>
Date
2015-08-11T13:53:24+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 15:23, Michael S. Tsirkin wrote:
> OK to summarize, how about:
> 
> In free text:
> 
> The cache mode after reset can be either writeback or writethrough.
> The actual mode can be determined by reading \field{writeback}.

... after feature negotiation.  Otherwise okay.

> In conformance paragraph:
> 
> The driver MUST NOT read \field{writeback} before setting
> the FEATURES_OK \field{status} bit.

Okay.

> 
> And in legacy section:
> 
> Legacy drivers and drivers did not support the FEATURES_OK \field{status} bit,
> and used the device before setting the DRIVER_OK bit.
> Therefore:
> 
> When using the legacy interface, the driver MAY read \field{writeback}
> before setting the FEATURES_OK \field{status} field.
> 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

Paolo