All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/qemu: host-qemu does not support AVX512 CPUs
@ 2026-09-14  9:26 Yegor Yefremov via buildroot
  2026-09-16 18:57 ` Thomas Petazzoni via buildroot
  2026-09-25 14:44 ` Raphaël Mélotte via buildroot
  0 siblings, 2 replies; 5+ messages in thread
From: Yegor Yefremov via buildroot @ 2026-09-14  9:26 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour

From: Yegor Yefremov <yegorslists@googlemail.com>

Building gobject-introspection for an x86 CPU variant with AVX512 fails
when g-ir-scanner runs the freshly built target binaries under
qemu-user:

  qemu: uncaught target signal 4 (Illegal instruction) - core dumped

The Qemu TCG engine implements AVX, AVX2, F16C, FMA3 and VAES since Qemu
7.2, but it does not implement the AVX512 instruction set at all [0].
Therefore no -cpu value passed through
BR2_PACKAGE_HOST_QEMU_USER_MODE_ARGS can make such binaries run, and
user-mode emulation is simply not possible for these CPU variants.

Mark those CPUs as unsupported by host-qemu, the same way it is already
done for x86_steamroller and x86_core_avx2. This relies on the existing
BR2_X86_CPU_HAS_AVX512 symbol, so all AVX512 capable variants are
covered, and it disables gobject-introspection and nodejs, which are the
two packages needing host-qemu in user mode.

[0] https://gitlab.com/qemu-project/qemu/-/issues/2878

Fixes:

  https://autobuild.buildroot.org/results/7ed7f9c36dae1ddb965a0f0021db6cd319927b47/

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Assisted-by: Claude:claude-opus-5
---
 package/qemu/Config.in.host | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/qemu/Config.in.host b/package/qemu/Config.in.host
index c7dd5876e5..e5379e7224 100644
--- a/package/qemu/Config.in.host
+++ b/package/qemu/Config.in.host
@@ -23,6 +23,10 @@ config BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS
 	default y if BR2_xtensa
 	default y if BR2_x86_64
 	depends on !BR2_x86_steamroller && !BR2_x86_core_avx2
+	# The Qemu TCG engine does not implement the AVX512
+	# instruction set, so binaries built for such CPUs cannot be
+	# emulated.
+	depends on !BR2_X86_CPU_HAS_AVX512
 	depends on !BR2_powerpc_620 && !BR2_powerpc_630
 
 config BR2_PACKAGE_HOST_QEMU_SYSTEM_ARCH_SUPPORTS
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-09-25 14:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-14  9:26 [Buildroot] [PATCH] package/qemu: host-qemu does not support AVX512 CPUs Yegor Yefremov via buildroot
2026-09-16 18:57 ` Thomas Petazzoni via buildroot
2026-09-17  6:56   ` Yegor Yefremov via buildroot
2026-09-17  7:26     ` Thomas Petazzoni via buildroot
2026-09-25 14:44 ` Raphaël Mélotte via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.