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

2023-08-28 Thread Qian Wen
:16] to 255 as the HW does. Signed-off-by: Qian Wen Reviewed-by: Zhao Liu Reviewed-by: Xiaoyao Li Reviewed-by: Isaku Yamahata --- target/i386/cpu.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 00f913b638..fc0437bdb1 100

[PATCH v4 0/2] Fix overflow of the max number of IDs for logic processor and core

2023-08-28 Thread Qian Wen
iaoyao. - Rebase to the v8.1.0. 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: A

[PATCH v4 2/2] target/i386: Avoid overflow of the cache parameter enumerated by leaf 4

2023-08-28 Thread Qian Wen
over 64 cores, limit the max value written to EBX[31:26] to 63, so max num_cores should be 64. Signed-off-by: Qian Wen Reviewed-by: Zhao Liu Reviewed-by: Xiaoyao Li Reviewed-by: Isaku Yamahata --- target/i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386

[PATCH v3 2/2] target/i386: Avoid overflow of the cache parameter enumerated by leaf 4

2023-08-16 Thread Qian Wen
over 64 cores, limit the max value written to EBX[31:26] to 63, so max num_cores should be 64. Signed-off-by: Qian Wen Reviewed-by: Zhao Liu --- target/i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 5c008b9d7e..3b6854300a

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

2023-08-16 Thread Qian Wen
:16] to 255 as the HW does. Signed-off-by: Qian Wen Reviewed-by: Zhao Liu --- target/i386/cpu.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 97ad229d8b..5c008b9d7e 100644 --- a/target/i386/cpu.c +++ b/target/i386/cp

[PATCH v3 0/2] Fix overflow of the max number of IDs for logic processor and core

2023-08-16 Thread Qian Wen
sage 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 enumera

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

2023-08-09 Thread Qian Wen
avoid this issue caused by overflow, limit the max value written to EBX[23:16] to 255. Signed-off-by: Qian Wen --- Changes v1 -> v2: - Revise the commit message and comment to more clearer. - Rebased to v8.1.0-rc2. --- target/i386/cpu.c | 16 ++-- 1 file changed, 14 insertio

[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

[PATCH] i386: Add new CPU model EmeraldRapids

2023-05-14 Thread Qian Wen
ticable to define EMR as an alias of a new version of SPR by only updating the model number and model name, it loses the flexibility when new version of EMR cpu model are needed for adding new features (that hasn't virtalized/supported by KVM yet). So just add EMR as a standalone cpu model. Sign