single-gpu machine
Overview
single-gpu is the canonical one-GPU guest board: one machine, one
vhost-x86-rocm QEMU vHost and one gem5 MI300X device sharing a 24 GiB
memory pool.
Topology
# resources/machines/single-gpu.yaml
version: 1
imports:
- vhosts/qemu.yaml
- devices/gpu/mi300x.yaml
templates:
node1:
vhost: {use: vhost-x86-rocm}
devices:
- {use: mi300x}
machines:
- {id: m0, use: node1}
Machine count: one (
m0); both host and device come from imported templates.node1combinesvhost-x86-rocmwith the defaultmi300x. The vHost template selectsubuntu/24.04/x86_64/rocm/7.0.
Hardware resources
Resource |
Value |
Source |
|---|---|---|
Machine |
1 ( |
|
vHost profile |
|
|
Guest RAM |
8 GiB; the x86_64 PCI hole is rendered by |
|
Device |
1 × |
|
Memory pool |
24 GiB = 8 GiB RAM + 16 GiB VRAM |
|
PCIe topology |
One |
|
Executables |
QEMU |
The two templates |
Software stack
Layer |
Component |
Description |
|---|---|---|
Guest OS |
Ubuntu 24.04.2 LTS, kernel 6.8.0-124-generic |
Direct kernel boot through the vHost |
GPU driver |
|
|
GPU user space |
ROCm 7.0 / HIP |
|
Device model |
gem5 MI300X ( |
Partial PM4, SDMA and CU behavior; model details are in chapter 4 |
Guest initialization |
|
Writes the ROM with |
Running this machine
# Validate and preview only
just run-cli validate resources/machines/single-gpu.yaml --assets
just run-topology resources/machines/single-gpu.yaml --dry-run
# Start a session
just run-topology resources/machines/single-gpu.yaml
The serial console, login and shutdown flow are in First session.
A host exiting with status 0 ends its machine; SIGINT or SIGTERM starts a graceful shutdown.
--assetschecks that the QEMU and gem5 binaries, the vHost kernel and the disk image exist.
Verification
The plan output contains one machine, one host process and one device process, a 24 GiB pool, and
mi300x-0.vramat 8 GiB.After guest boot
amdgpubinds the simulated device; the gfx target reported byrocminfoisgfx942.The repository's ROCm regression is generated by
scripts/ci/run_rocm.pyas an equivalent single-machine, single-GPU topology, and the integration workflow runs it through the same Rust launcher.just test-gem5-mi300xseparately checks the model and the pool; the sample itself is loaded by the render test.
Limitations
The guest disk image is about 55 GB, so the first preparation needs enough disk space.
PSP and SMU are not modeled: never set bit 3 of
ip_block_mask.BIOS/IP discovery paths are not modeled: the guest must write
mi300.romto0xC0000beforemodprobe.The YAML adapter starts one GPU per process (
--num-gpus=1); more GPUs means more device entries, see gpu-8 machine.Booting a guest needs KVM; running a session needs Linux glibc and
setpriv.