Re: [PATCH] target/i386: Avoid cpu number overflow in legacy topology

2023-08-07 Thread Wen, Qian
On 8/7/2023 4:08 PM, Zhao Liu wrote: > On Fri, Jul 28, 2023 at 04:01:50PM +0800, Qian Wen wrote: >> Date: Fri, 28 Jul 2023 16:01:50 +0800 >> From: Qian Wen >> Subject: [PATCH] target/i386: Avoid cpu number overflow in legacy topology >> X-Mailer: git-send-email 2.25.

Re: [PATCH] target/i386: Avoid cpu number overflow in legacy topology

2023-08-07 Thread Wen, Qian
On 8/7/2023 3:36 PM, Xiaoyao Li wrote: > On 7/28/2023 4:01 PM, Qian Wen wrote: >> The legacy topology enumerated by CPUID.1.EBX[23:16] is defined in SDM >> Vol2: >> >> Bits 23-16: Maximum number of addressable IDs for logical processors in >> this physical package. >> >> To avoid data overflow, lim

Re: [PATCH] target/i386: Avoid cpu number overflow in legacy topology

2023-08-07 Thread Zhao Liu
On Fri, Jul 28, 2023 at 04:01:50PM +0800, Qian Wen wrote: > Date: Fri, 28 Jul 2023 16:01:50 +0800 > From: Qian Wen > Subject: [PATCH] target/i386: Avoid cpu number overflow in legacy topology > X-Mailer: git-send-email 2.25.1 > > The legacy topology enumerated by CPUID.1.EBX[23

Re: [PATCH] target/i386: Avoid cpu number overflow in legacy topology

2023-08-07 Thread Xiaoyao Li
On 7/28/2023 4:01 PM, Qian Wen wrote: The legacy topology enumerated by CPUID.1.EBX[23:16] is defined in SDM Vol2: Bits 23-16: Maximum number of addressable IDs for logical processors in this physical package. To avoid data overflow, limit the max value written to EBX[23:16] to 255. It's bett

[PATCH] target/i386: Avoid cpu number overflow in legacy topology

2023-07-28 Thread Qian Wen
The legacy topology enumerated by CPUID.1.EBX[23:16] is defined in SDM Vol2: Bits 23-16: Maximum number of addressable IDs for logical processors in this physical package. To avoid data overflow, limit the max value written to EBX[23:16] to 255. Signed-off-by: Qian Wen --- target/i386/cpu.c |