Documentation
¶
Overview ¶
Headless go-virtio blk validate harness: boots tamago/amd64 under QEMU, drives a real virtio-blk-pci device through the go-virtio/blk driver, and performs an entirely in-guest write/read-back equality proof over a scratch raw disk. No host-side observation is needed — the guest writes a deterministic, LBA-stamped pattern to several sectors (including a non-zero LBA and a multi-block run), Flushes, reads them back, asserts byte-equality itself, and reports BLK-VALIDATE: ... PASS/FAIL plus a checksum over the serial console. run-blk.sh parses the verdict and exits non-zero on FAIL.
This mirrors the gpu harness: a *real* virtio-blk-pci device (not the fake transport the unit tests use) is what exercises the descriptor-chain build, the device-written status byte, capacity/devcfg reads, and DMA alignment on actual QEMU emulation.
The 8 MiB scratch image (run-blk.sh creates it) is 8*1024*1024/512 = 16384 sectors; the harness sanity-checks the reported capacity against that.