QEMU-Riscv Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] riscv-iommu: always send MRIF notice MSI
@ 2026-07-26 12:20 flavien.solt97
  2026-07-26 12:21 ` [PATCH v2 1/3] hw/misc/iommu-testdev: support PCI MSI test writes flavien.solt97
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: flavien.solt97 @ 2026-07-26 12:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-riscv, Andrew Jones

The AIA specification requires an IOMMU to send the configured notice
MSI after storing an MSI to an MRIF even when the destination interrupt
is disabled. QEMU currently reads the MRIF interrupt-enable word and
returns without sending the notice when the matching bit is clear.

This revision includes a qtest. Patch 1 lets iommu-testdev select an
MSI payload and supplies its PCI requester ID. Patch 2 removes the
invalid enable-bit gate. Patch 3 checks both enable states through
qemu-system-riscv64.

The complete RISC-V IOMMU qtest suite passes:

  MRIF notice: enable=0 pending=0x20 notice=0x12d
  MRIF notice: enable=1 pending=0x20 notice=0x12d
  6/6 tests passed

Changes in v2:
  - Wrap the fix commit message.
  - Keep the existing notification comment.
  - Add deterministic IE-clear and IE-set qtests.

Flavien Solt (3):
  hw/misc/iommu-testdev: support PCI MSI test writes
  hw/riscv/riscv-iommu.c: always send MRIF notice MSI
  tests/qtest: add RISC-V IOMMU MRIF notice tests

 hw/misc/iommu-testdev.c         |  14 ++++-
 hw/riscv/riscv-iommu.c          |  13 ----
 include/hw/misc/iommu-testdev.h |   1 +
 tests/qtest/iommu-riscv-test.c  | 102 ++++++++++++++++++++++++++++++++
 4 files changed, 115 insertions(+), 15 deletions(-)


base-commit: 499039798cdad7d86b787fec0eaf1da4151c0f05
-- 
2.54.0


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

end of thread, other threads:[~2026-07-27  6:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-26 12:20 [PATCH v2 0/3] riscv-iommu: always send MRIF notice MSI flavien.solt97
2026-07-26 12:21 ` [PATCH v2 1/3] hw/misc/iommu-testdev: support PCI MSI test writes flavien.solt97
2026-07-26 15:52   ` Tao Tang
2026-07-26 12:21 ` [PATCH v2 2/3] hw/riscv/riscv-iommu.c: always send MRIF notice MSI flavien.solt97
2026-07-26 12:22 ` [PATCH v2 3/3] tests/qtest: add RISC-V IOMMU MRIF notice tests flavien.solt97
2026-07-27  6:23   ` Chao Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox