All of lore.kernel.org
 help / color / mirror / Atom feed
* [virtio-dev] queue_reset register polarity to improve
@ 2022-04-24  0:49 Parav Pandit
  2022-04-24  6:46 ` [virtio-dev] " Michael S. Tsirkin
  2022-04-24  7:28 ` [virtio-dev] " Xuan Zhuo
  0 siblings, 2 replies; 23+ messages in thread
From: Parav Pandit @ 2022-04-24  0:49 UTC (permalink / raw)
  To: virtio-dev, Michael S. Tsirkin

Hi,

A recently defined queue_reset register has a little weird definition that we should improve.
When driver initiate queue reset, it writes queue_reset = 1.
When device is busy resetting the queue, on this driver request, it is expected to return queue_reset=0.
Once queue reset is completed it is expected to return queue_reset = 1.
(Polarity changed twice to same value as what was driver set). See more below.

So state wise,
# q_enable, q_reset represents :
a) 0,0 -> device init time value
b) 1,0 -> vq is enabled and working
c) 1,1 -> vq is enabled, driver initiated reset
d) 1,0 -> vq is enabled, but device is busy doing the reset (conflicting definition with above #b )
e) 0,1 -> vq reset is complete in the device and VQ is now disabled (again conflict with #a above )

Instead, I think we should have below better, consistent definition, no matter how queue reset occurs (init time or later).

q_enable, q_reset
A) 0, 0 -> default, device init time
B) 1, 0 -> driver has enabled vq
C) 1, 1 -> driver started q reset
D) 1, 1 -> q_reset stays 1 until device is busy resetting vq (communicating that its working on resetting, consistent with #C)
E) 0, 0 -> q_reset by device is completed, q got disabled (now matches the state same as device init time #A)

Parav

---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2022-04-27 23:52 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-24  0:49 [virtio-dev] queue_reset register polarity to improve Parav Pandit
2022-04-24  6:46 ` [virtio-dev] " Michael S. Tsirkin
2022-04-24  7:01   ` Jason Wang
2022-04-25 13:43     ` Michael S. Tsirkin
2022-04-25 10:06   ` [virtio-dev] " Parav Pandit
2022-04-25 13:00     ` [virtio-dev] " Michael S. Tsirkin
2022-04-25 11:42   ` Cornelia Huck
2022-04-25 12:01     ` Parav Pandit
2022-04-25 13:42       ` Michael S. Tsirkin
2022-04-25 14:56         ` Parav Pandit
2022-04-25 17:32           ` Michael S. Tsirkin
2022-04-24  7:28 ` [virtio-dev] " Xuan Zhuo
2022-04-26  8:48   ` Stefan Hajnoczi
2022-04-26  8:59     ` Xuan Zhuo
2022-04-26  9:52     ` Michael S. Tsirkin
2022-04-26  9:55       ` Xuan Zhuo
2022-04-26 11:07         ` Parav Pandit
2022-04-26 12:00   ` Parav Pandit
2022-04-27  8:28     ` Xuan Zhuo
2022-04-27 20:29       ` Michael S. Tsirkin
2022-04-27 23:52         ` Parav Pandit
2022-04-26 14:26   ` Michael S. Tsirkin
2022-04-27  8:50     ` Xuan Zhuo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.