Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/3] package/qemu: fix x86 CPU variant exclusions
@ 2026-09-17  7:53 Yegor Yefremov via buildroot
  2026-09-17  7:53 ` [Buildroot] [PATCH 1/3] package/qemu: drop x86_core_avx2 exclusion Yegor Yefremov via buildroot
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Yegor Yefremov via buildroot @ 2026-09-17  7:53 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour, thomas.petazzoni

From: Yegor Yefremov <yegorslists@googlemail.com>

This series is a follow-up to the discussion on

  package/qemu: host-qemu does not support AVX512 CPUs
  https://patchwork.buildroot.org/project/buildroot/patch/20260914092612.1283030-1-yegorslists@gmail.com/

where Thomas rightfully questioned whether the BR2_x86_core_avx2
exclusion in BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS still makes sense, and
pointed out that excluding BR2_x86_core_avx2 but not the equivalent
BR2_x86_haswell is inconsistent.

Thomas ACKed this approach in
https://lore.kernel.org/buildroot/aqrl-vOwcHy1wpBs@windsurf/

Short answer: the core-avx2 exclusion does not make sense anymore, and
the neighbouring BR2_x86_steamroller exclusion, while still needed, is
incomplete.

Both exclusions come from commit 1f7efaf89f03 ("package/qemu: do not
support x86_steamroller or x86_core_avx2"), from the Qemu 4.2 era:

 - core-avx2: the TCG engine had no AVX support at all back then. Since
   Qemu 7.2 it implements AVX, AVX2, F16C, FMA3 and VAES, so the
   exclusion is obsolete. It was also inconsistent, as gcc's core-avx2
   is a deprecated alias for haswell (same feature bits, same
   BR2_X86_CPU_HAS_* selects), and haswell, broadwell, skylake, zen*,
   x86-64-v3, ... were never excluded. Patch 1 drops it.

 - steamroller: the real blocker is not AVX, but the Bulldozer-specific
   XOP/FMA4/TBM/LWP extensions, which TCG still does not implement.
   And the whole Bulldozer family is affected: bulldozer (bdver1),
   piledriver (bdver2) and excavator (bdver4) were never excluded,
   although they are just as broken. Patches 2 and 3 introduce a
   BR2_X86_CPU_HAS_XOP capability symbol and use it, mirroring what is
   already done for BR2_X86_CPU_HAS_AVX512.

I verified the TCG feature masks in target/i386/cpu.c of both Qemu
11.0.0 (the version we currently package) and 11.1.1; they are
identical, so bumping Qemu will not change the picture:

  TCG_EXT_FEATURES     has CPUID_EXT_AVX, CPUID_EXT_F16C, CPUID_EXT_FMA
  TCG_7_0_EBX_FEATURES has CPUID_7_0_EBX_AVX2, BMI1, BMI2
  TCG_EXT3_FEATURES    has no XOP, FMA4, TBM or LWP
  no TCG mask          references any AVX512 bit

Tested with olddefconfig on all affected CPU variants;
BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS is now:

  haswell, core-avx2, broadwell, skylake, zen, x86-64  ->  y
  bulldozer, piledriver, steamroller, excavator        ->  n
  skylake-avx512                                       ->  n (unchanged)

Note: while looking at this, I noticed that bulldozer, piledriver and
steamroller do not select BR2_X86_CPU_HAS_AVX in arch/Config.in.x86,
although gcc enables AVX for bdver1 to bdver3. That looks like a
separate pre-existing bug, so I left it out of this series.

Yegor Yefremov (3):
  package/qemu: drop x86_core_avx2 exclusion
  arch/Config.in.x86: add BR2_X86_CPU_HAS_XOP
  package/qemu: host-qemu does not support XOP capable CPUs

 arch/Config.in.x86          | 12 ++++++++++++
 package/qemu/Config.in.host |  9 +++++----
 2 files changed, 17 insertions(+), 4 deletions(-)

-- 
2.34.1

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

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

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

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-17  7:53 [Buildroot] [PATCH 0/3] package/qemu: fix x86 CPU variant exclusions Yegor Yefremov via buildroot
2026-09-17  7:53 ` [Buildroot] [PATCH 1/3] package/qemu: drop x86_core_avx2 exclusion Yegor Yefremov via buildroot
2026-09-25 14:46   ` Raphaël Mélotte via buildroot
2026-09-17  7:53 ` [Buildroot] [PATCH 2/3] arch/Config.in.x86: add BR2_X86_CPU_HAS_XOP Yegor Yefremov via buildroot
2026-09-25 14:46   ` Raphaël Mélotte via buildroot
2026-09-17  7:53 ` [Buildroot] [PATCH 3/3] package/qemu: host-qemu does not support XOP capable CPUs Yegor Yefremov via buildroot
2026-09-25 14:46   ` Raphaël Mélotte via buildroot
2026-09-17  9:21 ` [Buildroot] [PATCH 0/3] package/qemu: fix x86 CPU variant exclusions Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox