All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] transport-mmio: Add optional reset completion polling
@ 2026-02-04 11:50 Peter Hilber
  2026-02-04 11:50 ` [PATCH 1/1] transport-mmio: Add v3, which polls for reset completion Peter Hilber
  2026-03-10 12:32 ` [PATCH 0/1] transport-mmio: Add optional reset completion polling Peter Hilber
  0 siblings, 2 replies; 7+ messages in thread
From: Peter Hilber @ 2026-02-04 11:50 UTC (permalink / raw)
  To: virtio-comment; +Cc: Trilok Soni, Peter Hilber

Let devices using the MMIO transport avoid stalling the driver (virtual)
CPU during device reset, which requires introducing a new MMIO transport
version. This proposal is similar to [1], but simpler.

If the device reset includes terminating device activity which may
interfere with the driver, the reset should always have completed by the
time the driver considers the reset complete. After device reset, the
driver may free previously exposed buffers. Per the current MMIO transport
specification, the device must hence complete the reset during the write of
0 to the Status register. If terminating the device activity takes long,
the (virtual) CPU doing this write to the Status register must be stalled
for extended time, which may violate real-time requirements (including
those for hypervisor trap-and-emulate).

Address this by introducing a new MMIO transport version, v3, where the
driver must poll for reset completion, and, hence, the device reset does
not have to finish during the write of 0 to the Status register. Polling
for an operation to finish is a pattern also used for the PCI transport
device reset, device suspend, and MMIO transport QueueReset writes.

Unlike [1], this proposal does not require a reset-in-progress status bit.
Unlike [1], devices cannot indicate that the reset failed, which appears
unneeded.

This proposal has been verified with proof-of-concept implementations for
the Linux kernel and EDK2 OVMF Virtio drivers (supporting v2 and v3), and
for the QEMU Virtio devices.

[1] https://www.mail-archive.com/virtio-dev@lists.oasis-open.org/msg07677.html

Signed-off-by: Peter Hilber <peter.hilber@oss.qualcomm.com>


Peter Hilber (1):
  transport-mmio: Add v3, which polls for reset completion

 transport-mmio.tex | 26 +++++++++++++++++++++++---
 1 file changed, 23 insertions(+), 3 deletions(-)


base-commit: 5187698cc6f40fd2f2a714ca3faa6e998c5fc231
-- 
2.43.0


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

end of thread, other threads:[~2026-03-27 18:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-04 11:50 [PATCH 0/1] transport-mmio: Add optional reset completion polling Peter Hilber
2026-02-04 11:50 ` [PATCH 1/1] transport-mmio: Add v3, which polls for reset completion Peter Hilber
2026-03-26 18:44   ` Matias Ezequiel Vara Larsen
2026-03-27 18:26     ` Peter Hilber
2026-03-26 23:13   ` Michael S. Tsirkin
2026-03-27 18:47     ` Peter Hilber
2026-03-10 12:32 ` [PATCH 0/1] transport-mmio: Add optional reset completion polling Peter Hilber

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.