From 22c0ec4fcfe58ff7a292f0a69e3357923f06b349 Mon Sep 17 00:00:00 2001 From: Yegor Yefremov Date: Thu, 17 Sep 2026 09:53:26 +0200 Subject: [PATCH] package/qemu: host-qemu does not support XOP capable CPUs Commit 1f7efaf89f03 ("package/qemu: do not support x86_steamroller or x86_core_avx2") excluded BR2_x86_steamroller from BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS. This is still needed, but for a different reason than AVX, and the exclusion is incomplete. steamroller is bdver3, and what the Qemu TCG engine cannot emulate there is not AVX, but the Bulldozer-specific XOP, FMA4, TBM and LWP extensions. In Qemu 11.0.0 (the version we currently package) and 11.1.1, target/i386/cpu.c has: #define TCG_EXT3_FEATURES (CPUID_EXT3_LAHF_LM | CPUID_EXT3_SVM | \ CPUID_EXT3_CR8LEG | CPUID_EXT3_ABM | CPUID_EXT3_SSE4A | \ CPUID_EXT3_3DNOWPREFETCH | CPUID_EXT3_KERNEL_FEATURES | \ CPUID_EXT3_CMP_LEG) CPUID_EXT3_XOP, CPUID_EXT3_FMA4, CPUID_EXT3_TBM and CPUID_EXT3_LWP are defined in target/i386/cpu.h, but are not part of that mask, i.e. TCG does not implement them. Binaries using those instructions therefore die with: qemu: uncaught target signal 4 (Illegal instruction) - core dumped This affects the whole Bulldozer family, not only steamroller: bulldozer (bdver1), piledriver (bdver2) and excavator (bdver4) are equally unsupported, but were never excluded. Use the newly introduced BR2_X86_CPU_HAS_XOP symbol, which covers all four variants, instead of listing BR2_x86_steamroller alone. As for AVX512, this disables gobject-introspection and nodejs, which are the two packages needing host-qemu in user mode. Signed-off-by: Yegor Yefremov Assisted-by: Claude:claude-opus-5 Signed-off-by: Thomas Petazzoni --- package/qemu/Config.in.host | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/package/qemu/Config.in.host b/package/qemu/Config.in.host index 48979fd7ce..fbc989b003 100644 --- a/package/qemu/Config.in.host +++ b/package/qemu/Config.in.host @@ -22,10 +22,11 @@ config BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS default y if BR2_sparc64 default y if BR2_xtensa default y if BR2_x86_64 - depends on !BR2_x86_steamroller - # The Qemu TCG engine does not implement the AVX512 - # instruction set, so binaries built for such CPUs cannot be - # emulated. + # The Qemu TCG engine implements neither the XOP instruction set + # nor the other Bulldozer-specific extensions (FMA4, TBM, LWP), + # and it does not implement the AVX512 instruction set either, + # so binaries built for such CPUs cannot be emulated. + depends on !BR2_X86_CPU_HAS_XOP depends on !BR2_X86_CPU_HAS_AVX512 depends on !BR2_powerpc_620 && !BR2_powerpc_630