test/qtest: add riscv-iommu-pci tests
authorDaniel Henrique Barboza <dbarboza@ventanamicro.com>
Wed, 16 Oct 2024 20:40:31 +0000 (17:40 -0300)
committerAlistair Francis <alistair.francis@wdc.com>
Thu, 31 Oct 2024 03:51:24 +0000 (13:51 +1000)
commit40b44316d817b021df2db9c3a24b75ce89ce69c2
tree434757c63199c038e77dba2c7e8313a9e8045a4d
parentdf240d66ef38cba9dcc7f9a57e0804471eea86bd
test/qtest: add riscv-iommu-pci tests

To test the RISC-V IOMMU emulation we'll use its PCI representation.
Create a new 'riscv-iommu-pci' libqos device that will be present with
CONFIG_RISCV_IOMMU.  This config is only available for RISC-V, so this
device will only be consumed by the RISC-V libqos machine.

Start with basic tests: a PCI sanity check and a reset state register
test. The reset test was taken from the RISC-V IOMMU spec chapter 5.2,
"Reset behavior".

More tests will be added later.

Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Frank Chang <frank.chang@sifive.com>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20241016204038.649340-8-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
tests/qtest/libqos/meson.build
tests/qtest/libqos/riscv-iommu.c [new file with mode: 0644]
tests/qtest/libqos/riscv-iommu.h [new file with mode: 0644]
tests/qtest/meson.build
tests/qtest/riscv-iommu-test.c [new file with mode: 0644]