Package: golang-github-go-debos-fakemachine
Version: 0.0.13-3
Severity: important
Tags: patch
User: [email protected]
Usertags: origin-ubuntu tenacious

Dear Maintainer,

When /dev/kvm is unavailable, fakemachine runs qemu-system-x86_64
without -cpu, defaulting to qemu64 (x86-64-v1). On x86-64-v2/v3
userlands (such as Ubuntu amd64v3), binaries fail immediately inside
the guest (breaking both fakemachine and debos autopkgtests on amd64v3).

The attached patch sets qemuCPU: "max" for Amd64 in backend_qemu.go
(the KVM path still uses -cpu host).

Upstream PR: https://github.com/go-debos/fakemachine/pull/362
Ubuntu bug: https://bugs.launchpad.net/bugs/2178493
Description: Use -cpu max for amd64 QEMU TCG backend
Author: Viktor Pashaiev <[email protected]>
Origin: upstream, https://github.com/go-debos/fakemachine/pull/362
Bug-Ubuntu: https://bugs.launchpad.net/bugs/2178493
Forwarded: https://github.com/go-debos/fakemachine/pull/362
Last-Update: 2026-12-02

diff --git a/backend_qemu.go b/backend_qemu.go
index c07671a..a926665 100644
--- a/backend_qemu.go
+++ b/backend_qemu.go
@@ -48,6 +48,10 @@ var qemuMachines = map[Arch]qemuMachine{
 		binary:  "qemu-system-x86_64",
 		console: "ttyS0",
 		machine: "pc",
+		/* The default qemu64 cpu is x86-64-v1 only, which breaks distros
+		 * built for x86-64-v2/v3 (e.g. RHEL 9/10, Ubuntu amd64v3). "max"
+		 * exposes all features TCG can emulate (x86-64-v3 needs QEMU >= 7.2). */
+		qemuCPU: "max",
 	},
 	Arm64: {
 		binary:  "qemu-system-aarch64",

Reply via email to