From 8bdb4283deab5eb90cb5ec4dc1ad2c54480d215b Mon Sep 17 00:00:00 2001 From: Francois Marier Date: Wed, 7 Oct 2026 22:29:06 +0000 Subject: [PATCH] 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 --- tstest/natlab/vmtest/qemu.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tstest/natlab/vmtest/qemu.go b/tstest/natlab/vmtest/qemu.go index d5b93272b..7cfbc608f 100644 --- a/tstest/natlab/vmtest/qemu.go +++ b/tstest/natlab/vmtest/qemu.go @@ -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) }