transport-mmio: Add optional reset completion polling
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest1 patch 2 repliesIn review
- v11 patch 5 repliesSuperseded
Changes in v2 from the cover letter
- Add summary of MMIO v3 to Version register description (Matias)
- Align requirements on Status register transition to zero with transport- independent requirements (Matias)
- Change requirements relating to reset when status is already zero (Matias)
- In the commit message, document when v3 devices may be incompatible with v2 drivers (as per reply to Michael)
- Improve wording; refer to "zero" rather than "0"
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | transport-mmio: Add v3, which polls for reset completiontransport-mmio.tex | +30 | 2 replies |
Reviews trailers per patch
The patch has a Reviewed-by or Acked-by.
| Patch | Matias Ezequiel Vara Larsen |
|---|---|
| 1/1 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/1] transport-mmio: Add optional reset completion polling
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.
v2, after discussion on the mailing list, describes some edge cases differently and rewords some requirements.
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 zero 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 zero 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/[email protected]/msg07677.html
v2:
- Add summary of MMIO v3 to Version register description (Matias)
- Align requirements on Status register transition to zero with transport- independent requirements (Matias)
- Change requirements relating to reset when status is already zero (Matias)
- In the commit message, document when v3 devices may be incompatible with v2 drivers (as per reply to Michael)
- Improve wording; refer to "zero" rather than "0"
Peter Hilber (1):
transport-mmio: Add v3, which polls for reset completion
transport-mmio.tex | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-)
base-commit: 5187698cc6f40fd2f2a714ca3faa6e998c5fc231
Signature · 1 line
2.43.0