qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Bug] QEMU TCG warnings after commit c6bd2dd63420 - HTT / CMP_LEG bits
@ 2025-04-29  3:02 Ewan Hai
  2025-04-29  3:13 ` Ewan Hai
  2025-04-29  5:55 ` Xiaoyao Li
  0 siblings, 2 replies; 6+ messages in thread
From: Ewan Hai @ 2025-04-29  3:02 UTC (permalink / raw)
  To: Xiaoyao Li, Zhao Liu, Paolo Bonzini
  Cc: yeeli, cobechen, ewanhai, MaryFeng, Runaguo, Xanderchen, Alansong,
	qemu-devel

Hi Community,

This email contains 3 bugs appear to share the same root cause.

[1] We ran into the following warnings when running QEMU v10.0.0 in TCG mode:

qemu-system-x86_64 \
   -machine q35 \
   -m 4G -smp 4 \
   -kernel ./arch/x86/boot/bzImage \
   -bios /usr/share/ovmf/OVMF.fd \
   -drive file=~/kernel/rootfs.ext4,index=0,format=raw,media=disk \
   -drive file=~/kernel/swap.img,index=1,format=raw,media=disk \
   -nographic \
   -append 'root=/dev/sda rw resume=/dev/sdb console=ttyS0 nokaslr'

qemu-system-x86_64: warning: TCG doesn't support requested feature: 
CPUID.01H:EDX.ht [bit 28]
qemu-system-x86_64: warning: TCG doesn't support requested feature: 
CPUID.80000001H:ECX.cmp-legacy [bit 1]
(repeats 4 times, once per vCPU)

Tracing the history shows that commit c6bd2dd63420 "i386/cpu: Set up CPUID_HT in 
x86_cpu_expand_features() instead of cpu_x86_cpuid()" is what introduced the 
warnings.

Since that commit, TCG unconditionally advertises HTT (CPUID 1 EDX[28]) and 
CMP_LEG (CPUID 8000_0001 ECX[1]). Because TCG itself has no SMT support, these 
bits trigger the warnings above.

[2] Also, Zhao pointed me to a similar report on GitLab:
https://gitlab.com/qemu-project/qemu/-/issues/2894
The symptoms there look identical to what we're seeing.

By convention we file one issue per email, but these two appear to share the 
same root cause, so I'm describing them together here.

[3] My colleague Alan noticed what appears to be a related problem: if we launch 
a guest with '-cpu <model>,-ht --enable-kvm', which means explicitly removing 
the ht flag, but the guest still reports HT(cat /proc/cpuinfo in linux guest) 
enabled. In other words, under KVM the ht bit seems to be forced on even when 
the user tries to disable it.

Best regards,
Ewan


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

end of thread, other threads:[~2025-05-08 10:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-29  3:02 [Bug] QEMU TCG warnings after commit c6bd2dd63420 - HTT / CMP_LEG bits Ewan Hai
2025-04-29  3:13 ` Ewan Hai
2025-05-08  9:04   ` Zhao Liu
2025-05-08  9:45     ` Ewan Hai
2025-04-29  5:55 ` Xiaoyao Li
2025-05-08  8:55   ` Zhao Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).