qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] Fix overflow of the max number of IDs for logic processor and core
@ 2023-08-16  8:06 Qian Wen
  2023-08-16  8:06 ` [PATCH v3 1/2] target/i386: Avoid cpu number overflow in legacy topology Qian Wen
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Qian Wen @ 2023-08-16  8:06 UTC (permalink / raw)
  To: qemu-devel
  Cc: xiaoyao.li, zhao1.liu, pbonzini, richard.henderson, babu.moger,
	Qian Wen

CPUID.1.EBX[23:16]: Maximum number of addressable IDs for logical
processors in this physical package.
CPUID.4:EAX[31:26]: Maximum number of addressable IDs for processor cores
in the physical package.

The current qemu code doesn't limit the value written to these two fields.
If the guest has a huge number of cores, APs (application processor) will
fail to bring up and the wrong info will be reported.
According to HW behavior, setting max value written to CPUID.1.EBX[23:16]
to 255, and CPUID.4:EAX[31:26] to 63.

---
Changes v2 -> v3:
  - Add patch 2.
  - Revise the commit message and comment to be clearer.
  - Using MIN() for limitation.
Changes v1 -> v2:
  - Revise the commit message and comment to more clearer.
  - Rebased to v8.1.0-rc2.

Qian Wen (2):
  target/i386: Avoid cpu number overflow in legacy topology
  target/i386: Avoid overflow of the cache parameter enumerated by leaf 4

 target/i386/cpu.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

base-commit: 0d52116fd82cdd1f4a88837336af5b6290c364a4
-- 
2.25.1



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

end of thread, other threads:[~2023-08-22  7:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-16  8:06 [PATCH v3 0/2] Fix overflow of the max number of IDs for logic processor and core Qian Wen
2023-08-16  8:06 ` [PATCH v3 1/2] target/i386: Avoid cpu number overflow in legacy topology Qian Wen
2023-08-17  2:04   ` Xiaoyao Li
2023-08-17 19:33   ` Isaku Yamahata
2023-08-16  8:06 ` [PATCH v3 2/2] target/i386: Avoid overflow of the cache parameter enumerated by leaf 4 Qian Wen
2023-08-17  2:07   ` Xiaoyao Li
2023-08-17 19:34   ` Isaku Yamahata
2023-08-17 19:33 ` [PATCH v3 0/2] Fix overflow of the max number of IDs for logic processor and core Isaku Yamahata
2023-08-22  7:56   ` Wen, Qian

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