qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Bug] "-ht" flag ignored under KVM - guest still reports HT
@ 2025-04-29  3:36 Ewan Hai
  0 siblings, 0 replies; only message in thread
From: Ewan Hai @ 2025-04-29  3:36 UTC (permalink / raw)
  To: Xiaoyao Li, Zhao Liu, Paolo Bonzini
  Cc: yeeli, cobechen, ewanhai, MaryFeng, Runaguo, Xanderchen, Alansong,
	qemu-devel

Hi Community,

We have observed that the 'ht' feature bit cannot be disabled when QEMU runs 
with KVM acceleration.

qemu-system-x86_64 \
   --enable-kvm \
   -machine q35 \
   -cpu host,-ht \
   -smp 4 \
   -m 4G \
   -drive file=rootfs.img,format=raw \
   -nographic \
   -append 'console=ttyS0 root=/dev/sda rw'

Because '-ht' is specified, the guest should expose no HT capability 
(cpuid.1.edx[28] = 0), and /proc/cpuinfo shouldn't show HT feature, but we still 
saw ht in linux guest when run 'cat /proc/cpuinfo'.

XiaoYao mentioned that:

It has been the behavior of QEMU since

   commit 400281af34e5ee6aa9f5496b53d8f82c6fef9319
   Author: Andre Przywara <andre.przywara@amd.com>
   Date:   Wed Aug 19 15:42:42 2009 +0200

     set CPUID bits to present cores and threads topology

that we cannot remove HT CPUID bit from guest via "-cpu xxx,-ht" if the
VM has >= 2 vcpus.

I'd like to know whether there's a plan to address this issue, or if the current 
behaviour is considered acceptable.

Best regards,
Ewan.




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-04-29  3:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-29  3:36 [Bug] "-ht" flag ignored under KVM - guest still reports HT Ewan Hai

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).