]> git.ipfire.org Git - thirdparty/qemu.git/commit
tests/qtest/libqos: Add RISC-V IOMMU helper library
authorChao Liu <chao.liu.zevorn@gmail.com>
Tue, 3 Feb 2026 14:27:05 +0000 (22:27 +0800)
committerFabiano Rosas <farosas@suse.de>
Tue, 17 Feb 2026 12:37:40 +0000 (09:37 -0300)
commit9d8ffbfc1d371131cd2b44dc40f3d2fa1b90faae
tree0c66091522d657c1f8fbf585881c8392d72ad547
parentece408818d27f745ef1b05fb3cc99a1e7a5bf580
tests/qtest/libqos: Add RISC-V IOMMU helper library

Introduce a libqos helper module for RISC-V IOMMU testing with
iommu-testdev. The helper provides routines to:

- Build device contexts (DC) and 3-level page tables for SV39/SV39x4
- Program command queue (CQ), fault queue (FQ), and DDTP registers
  following the RISC-V IOMMU specification
- Execute DMA translations and verify results

The current implementation supports SV39 for S-stage and SV39x4 for
G-stage translation. Support for SV48/SV48x4/SV57/SV57x4 can be added
in future patches.

Signed-off-by: Chao Liu <chao.liu.zevorn@gmail.com>
Reviewed-by: Tao Tang <tangtao1634@phytium.com.cn>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>
Link: https://lore.kernel.org/qemu-devel/a2edf8c44f0bce26dccb91a7d13edb58be50c1a3.1770127918.git.chao.liu.zevorn@gmail.com
Signed-off-by: Fabiano Rosas <farosas@suse.de>
MAINTAINERS
tests/qtest/libqos/meson.build
tests/qtest/libqos/qos-riscv-iommu.c [new file with mode: 0644]
tests/qtest/libqos/qos-riscv-iommu.h [new file with mode: 0644]