tstest/natlab/vmtest: use -icount for gokrazy VMs under TCG

On hosts without hardware virtualization, gokrazy VMs can hang at
boot with no console output. Timing jitter under software emulation
breaks the kernel's early boot timer calibration, causing it to spin
waiting for timer interrupts that never arrive.

Passing -icount shift=auto ties virtual clocks to instruction execution,
making timer calibration deterministic and preventing the boot hang.

Updates #cleanup

Change-Id: I7c0aa96e5344041af9a7246f7d50bed1da47ab95
Signed-off-by: Francois Marier <[email protected]>
This commit is contained in:
Francois Marier authored and François Marier committed 2026-10-07 18:54:33 -07:00
1 parent 852c3d1f0a
commit 8bdb4283de
1 file changed
+4
+4
View File
@@ -157,6 +157,10 @@ func (e *Env) startGokrazyQEMU(n *Node, basePath string) error {
}
args = append(args, qemuAccelArgs()...)
if !hardwareAccelAvailable() {
// Make boot timer calibration deterministic to avoid boot hangs.
args = append(args, "-icount", "shift=auto")
}
return e.launchQEMU(n.name, logPath, args)
}