On 27/8/26 01:08, Alistair Francis wrote:
On Tue, 2026-08-25 at 10:40 +0400, Marc-André Lureau wrote:
On Mon, Aug 24, 2026 at 9:55 AM <[email protected]> wrote:
From: Tao Ding <[email protected]>
This commit adds test cases for GSDMA.
Imitate the behavior of the driver, set LLT and sdma registers.
After the data transmission is completed, check the destination
address data.
Update MAINTAINERS for this test.
Run this qtest:
$ mkdir build && cd build && ../configure --target-
list="riscv64-softmmu"
$ QTEST_QEMU_BINARY=./qemu-system-riscv64 tests/qtest/k230-
gsdma-test
Signed-off-by: Tao Ding <[email protected]>
Reviewed-by: Daniel Henrique Barboza
<[email protected]>
Reviewed-by: Junze Cao <[email protected]>
Message-ID: <[email protected]>
Signed-off-by: Alistair Francis <[email protected]>
---
MAINTAINERS | 3 +
docs/system/riscv/k230.rst | 1 +
include/hw/misc/k230_decomp_gzip.h | 92 ++++++
hw/misc/k230_decomp_gzip.c | 511
+++++++++++++++++++++++++++++
tests/qtest/k230-gsdma-test.c | 201 ++++++++++++
hw/misc/Kconfig | 3 +
hw/misc/meson.build | 1 +
hw/misc/trace-events | 8 +-
tests/qtest/meson.build | 2 +-
9 files changed, 816 insertions(+), 6 deletions(-)
create mode 100644 include/hw/misc/k230_decomp_gzip.h
create mode 100644 hw/misc/k230_decomp_gzip.c
create mode 100644 tests/qtest/k230-gsdma-test.c
diff --git a/hw/misc/trace-events b/hw/misc/trace-events
index 2d6d2238c5..16db4ba0cc 100644
--- a/hw/misc/trace-events
+++ b/hw/misc/trace-events
@@ -443,8 +443,6 @@ iommu_testdev_dma_verify(uint32_t expected,
uint32_t actual) "expected=0x%x actu
iommu_testdev_dma_result(uint32_t result) "DMA completed
result=0x%x"
iommu_testdev_dma_armed(bool armed) "armed=%d"
-# vmlaunchupdate.c
-launch_update_write(void) ""
-vmlaunch_reset_enter(void) ""
-vm_launchupdate_finalize(void) ""
-restore_host_x86_igvm(void) ""
+# k230_decomp_gzip.c
+k230_decomp_gzip_read(uint64_t offset, unsigned int size, uint64_t
value) "K230 DECOMP GZIP read: [0x%"PRIx64"] size %u -> 0x%"PRIx64
+k230_decomp_gzip_write(uint64_t offset, unsigned int size,
uint64_t value) "K230 DECOMP GZIP write: [0x%"PRIx64"] size %u <-
0x%"PRIx64
../hw/misc/vmlaunchupdate.c: In function ‘restore_host_x86_igvm’:
../hw/misc/vmlaunchupdate.c:151:5: error: implicit declaration of
function ‘trace_restore_host_x86_igvm’; did you mean
‘restore_host_x86_igvm’? [-Wimplicit-function-declaration]
151 | trace_restore_host_x86_igvm();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
bad conflict resolution, probably
That's my fault! Sorry about that. I'm not sure how that slipped
through my build tests.
Well, it passed our CI. Is IGVM not tested?
Thanks for fixing it
Alistair