RE: [virtio-comment] [PATCH v3] virtio: Improve queue_reset polarity to match to default reset state

From
Parav Pandit <>
Date
2022-04-28T21:53:54+00:00
ID
Thread
RE: [virtio-comment] [PATCH v3] virtio: Improve queue_reset polarity to match to default reset state
> From: Michael S. Tsirkin <>
> Sent: Thursday, April 28, 2022 5:49 PM

> >  If VIRTIO_F_RING_RESET has been negotiated, after the driver writes 1
> > to -\field{queue_reset} to reset the queue, it MUST verify that the
> > queue -has been reset by reading back \field{queue_reset} and ensuring
> > that it -is 1. The driver MAY re-enable the queue by writing a 1 to
> > -\field{queue_enable} after ensuring that the other virtqueue fields
> > have -been set up correctly. The driver MAY set driver-writeable queue
> > configuration
> > +\field{queue_reset} to reset the queue, the driver MUST NOT consider
> > +queue reset to be complete until it reads back 0 in both
> > +\field{queue_reset} and \field{queue_enable}.
> 
> two reads are now required, this is unfortunate.
> why is it not enough to read back 0 in queue_reset?
> 
Two reads are not required.
Only queue_reset read is required.
The wording movement let to this.
As a result, queue got disabled so queue_enable also becomes zero.

Above wording is incorrect from driver point of view.
I better write this in the device section and rephase only for queue_reset.