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

2023-08-14 Thread Wen, Qian
On 8/14/2023 7:59 AM, Zhao Liu wrote: > Hi Qian, > > On Sun, Aug 13, 2023 at 06:49:40PM +0800, Wen, Qian wrote: > > [snip] > >>> also perhaps double check if we could do induce similar overflow >>> tweaking other -smp properties (todo for another patch[es] if there are >>> such places). >> I have

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

2023-08-13 Thread Zhao Liu
Hi Qian, On Sun, Aug 13, 2023 at 06:49:40PM +0800, Wen, Qian wrote: [snip] > > > also perhaps double check if we could do induce similar overflow > > tweaking other -smp properties (todo for another patch[es] if there are > > such places). > > I have a check, the CPUID.0x4:EAX[31:26]

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

2023-08-13 Thread Wen, Qian
On 8/9/2023 9:47 PM, Igor Mammedov wrote: > On Wed, 9 Aug 2023 21:20:48 +0800 > "Wen, Qian" wrote: > >> On 8/9/2023 7:14 PM, Igor Mammedov wrote: >>> On Wed, 9 Aug 2023 18:27:32 +0800 >>> Qian Wen wrote: >>> The legacy topology enumerated by CPUID.1.EBX[23:16] is defined in SDM

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

2023-08-09 Thread Igor Mammedov
On Wed, 9 Aug 2023 21:20:48 +0800 "Wen, Qian" wrote: > On 8/9/2023 7:14 PM, Igor Mammedov wrote: > > On Wed, 9 Aug 2023 18:27:32 +0800 > > Qian Wen wrote: > > > >> The legacy topology enumerated by CPUID.1.EBX[23:16] is defined in SDM > >> Vol2: > >> > >> Bits 23-16: Maximum number of

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

2023-08-09 Thread Wen, Qian
On 8/9/2023 7:14 PM, Igor Mammedov wrote: > On Wed, 9 Aug 2023 18:27:32 +0800 > 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. >> >> When

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

2023-08-09 Thread Igor Mammedov
On Wed, 9 Aug 2023 18:27:32 +0800 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. > > When launching the VM with -smp 256, the value written to

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

2023-08-09 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. When launching the VM with -smp 256, the value written to EBX[23:16] is 0 because of data overflow. If the guest only