[Qemu-devel] [PATCH v9 4/7] i386: Clean up cache CPUID code

2018-05-14 Thread Babu Moger
duardo Habkost <ehabk...@redhat.com> Signed-off-by: Babu Moger <babu.mo...@amd.com> --- target/i386/cpu.c | 145 +- target/i386/cpu.h | 14 +++-- 2 files changed, 75 insertions(+), 84 deletions(-) diff --git a/target/i386/cpu.c b/targe

[Qemu-devel] [PATCH v9 2/7] i386: Add new property to control cache info

2018-05-14 Thread Babu Moger
ious cache structures to legacy_*. If there is any change in the cache information, then it needs to be initialized in builtin_x86_defs. Signed-off-by: Babu Moger <babu.mo...@amd.com> Tested-by: Geoffrey McRae <ge...@hostfission.com> --- include/hw/i386/pc.h | 5 +++ tar

[Qemu-devel] [PATCH v9 1/7] pc: add 2.13 machine types

2018-05-14 Thread Babu Moger
Add pc-q35-2.13 and pc-i440fx-2.13 machine types Signed-off-by: Babu Moger <babu.mo...@amd.com> --- hw/i386/pc_piix.c| 15 --- hw/i386/pc_q35.c | 13 +++-- include/hw/i386/pc.h | 3 +++ 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/hw/i386/pc_

[Qemu-devel] [PATCH v9 5/7] i386: Add support for CPUID_8000_001E for AMD

2018-05-14 Thread Babu Moger
Populate threads/core_id/apic_ids/socket_id when CPUID_EXT3_TOPOEXT feature is supported. This is required to support hyperthreading feature on AMD CPUs. This is supported via CPUID_8000_001E extended functions. Signed-off-by: Babu Moger <babu.mo...@amd.com> Tested-by: Geoffrey McR

[Qemu-devel] [PATCH v9 6/7] i386: Enable TOPOEXT feature on AMD EPYC CPU

2018-05-14 Thread Babu Moger
Enable TOPOEXT feature on EPYC CPU. This is required to support hyperthreading on VM guests. Also extend xlevel to 0x801E. Disable TOPOEXT feature for legacy (2.12 or older) machine types. Signed-off-by: Babu Moger <babu.mo...@amd.com> Tested-by: Geoffrey McRae <ge...@hostfi

[Qemu-devel] [PATCH v9 0/7] i386: Enable TOPOEXT to support hyperthreading on AMD CPU

2018-05-14 Thread Babu Moger
Fixes cache associativity. Patch 4. Adds TOPOEXT feature on AMD EPYC CPU. Babu Moger (6): pc: add 2.13 machine types i386: Add new property to control cache info i386: Populate AMD Processor Cache Information for cpuid 0x801D i386: Add support for CPUID_8000_001E for AMD i386: Enabl

[Qemu-devel] [PATCH v9 7/7] i386: Remove generic SMT thread check

2018-05-14 Thread Babu Moger
Remove generic non-intel check while validating hyperthreading support. Certain AMD CPUs can support hyperthreading now. CPU family with TOPOEXT feature can support hyperthreading now. Signed-off-by: Babu Moger <babu.mo...@amd.com> Tested-by: Geoffrey McRae <ge...@hostfission.com&

[Qemu-devel] [PATCH v9 3/7] i386: Populate AMD Processor Cache Information for cpuid 0x8000001D

2018-05-14 Thread Babu Moger
Add information for cpuid 0x801D leaf. Populate cache topology information for different cache types(Data Cache, Instruction Cache, L2 and L3) supported by 0x801D leaf. Please refer Processor Programming Reference (PPR) for AMD Family 17h Model for more details. Signed-off-by: Babu Moger

[Qemu-devel] [PATCH v8 3/8] i386: Add new property to control cache info

2018-05-10 Thread Babu Moger
The property legacy-cache will be used to control the cache information. If user passes "-cpu legacy-cache" then older information will be displayed even if the hardware supports new information. Otherwise use the statically loaded cache definitions if available. Signed-off-by:

[Qemu-devel] [PATCH v8 0/8] i386: Enable TOPOEXT to support hyperthreading on AMD CPU

2018-05-10 Thread Babu Moger
8192) based on CPUID_Fn801D_ECX_x03. Added 2 more patches. Patch 1. Fixes cache associativity. Patch 4. Adds TOPOEXT feature on AMD EPYC CPU. Babu Moger (7): i386: Add cache information in X86CPUDefinition i386: Add new property to control cache info i386: Initialize cache infor

[Qemu-devel] [PATCH v8 7/8] i386: Enable TOPOEXT feature on AMD EPYC CPU

2018-05-10 Thread Babu Moger
Enable TOPOEXT feature on EPYC CPU. This is required to support hyperthreading on VM guests. Also extend xlevel to 0x801E. Signed-off-by: Babu Moger <babu.mo...@amd.com> Tested-by: Geoffrey McRae <ge...@hostfission.com> Reviewed-by: Eduardo Habkost <ehabk...@redhat.com> ---

[Qemu-devel] [PATCH v8 5/8] i386: Populate AMD Processor Cache Information for cpuid 0x8000001D

2018-05-10 Thread Babu Moger
Add information for cpuid 0x801D leaf. Populate cache topology information for different cache types(Data Cache, Instruction Cache, L2 and L3) supported by 0x801D leaf. Please refer Processor Programming Reference (PPR) for AMD Family 17h Model for more details. Signed-off-by: Babu Moger

[Qemu-devel] [PATCH v8 6/8] i386: Add support for CPUID_8000_001E for AMD

2018-05-10 Thread Babu Moger
Populate threads/core_id/apic_ids/socket_id when CPUID_EXT3_TOPOEXT feature is supported. This is required to support hyperthreading feature on AMD CPUs. This is supported via CPUID_8000_001E extended functions. Signed-off-by: Babu Moger <babu.mo...@amd.com> Tested-by: Geoffrey McR

[Qemu-devel] [PATCH v8 2/8] i386: Add cache information in X86CPUDefinition

2018-05-10 Thread Babu Moger
Add cache information in X86CPUDefinition and CPUX86State. Signed-off-by: Babu Moger <babu.mo...@amd.com> Tested-by: Geoffrey McRae <ge...@hostfission.com> Reviewed-by: Eduardo Habkost <ehabk...@redhat.com> --- target/i386/cpu.c | 1 + target/i386/cpu.h | 7 +++ 2 files cha

[Qemu-devel] [PATCH v8 4/8] i386: Initialize cache information for EPYC family processors

2018-05-10 Thread Babu Moger
Initialize pre-determined cache information for EPYC processors. Signed-off-by: Babu Moger <babu.mo...@amd.com> Tested-by: Geoffrey McRae <ge...@hostfission.com> --- target/i386/cpu.c | 52 +++ 1 file changed, 52 insertions(+) diff --git a

[Qemu-devel] [PATCH v8 1/8] i386: Helpers to encode cache information consistently

2018-05-10 Thread Babu Moger
encode CPUID leaves for a cache. This will help us ensure consistency between cache information CPUID leaves, and make the existing inconsistencies in CPUID info more visible. Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> Signed-off-by: Babu Moger <babu.mo...@amd.com> Tested-by:

[Qemu-devel] [PATCH v8 8/8] i386: Remove generic SMT thread check

2018-05-10 Thread Babu Moger
Remove generic non-intel check while validating hyperthreading support. Certain AMD CPUs can support hyperthreading now. CPU family with TOPOEXT feature can support hyperthreading now. Signed-off-by: Babu Moger <babu.mo...@amd.com> Tested-by: Geoffrey McRae <ge...@hostfission.com&

[Qemu-devel] [PATCH v10 0/5] i386: Enable TOPOEXT to support hyperthreading on AMD CPU

2018-05-21 Thread Babu Moger
eric non-intel check and made a separate patch with some changes(Patch 5). 3.Fixed L3_N_SETS_AMD(from 4096 to 8192) based on CPUID_Fn801D_ECX_x03. Added 2 more patches. Patch 1. Fixes cache associativity. Patch 4. Adds TOPOEXT feature on AMD EPYC CPU. Babu Moger (4): i386: Populate A

[Qemu-devel] [PATCH v10 2/5] i386: Populate AMD Processor Cache Information for cpuid 0x8000001D

2018-05-21 Thread Babu Moger
Add information for cpuid 0x801D leaf. Populate cache topology information for different cache types(Data Cache, Instruction Cache, L2 and L3) supported by 0x801D leaf. Please refer Processor Programming Reference (PPR) for AMD Family 17h Model for more details. Signed-off-by: Babu Moger

[Qemu-devel] [PATCH v11 0/5] i386: Enable TOPOEXT to support hyperthreading on AMD CPU

2018-05-24 Thread Babu Moger
ciativity. Patch 4. Adds TOPOEXT feature on AMD EPYC CPU. Babu Moger (4): i386: Populate AMD Processor Cache Information for cpuid 0x801D i386: Add support for CPUID_8000_001E for AMD i386: Enable TOPOEXT feature on AMD EPYC CPU i386: Remove generic SMT thread check Eduardo Habkos

[Qemu-devel] [PATCH v11 5/5] i386: Remove generic SMT thread check

2018-05-24 Thread Babu Moger
Remove generic non-intel check while validating hyperthreading support. Certain AMD CPUs can support hyperthreading now. CPU family with TOPOEXT feature can support hyperthreading now. Signed-off-by: Babu Moger <babu.mo...@amd.com> Tested-by: Geoffrey McRae <ge...@hostfission.com&

[Qemu-devel] [PATCH v11 3/5] i386: Add support for CPUID_8000_001E for AMD

2018-05-24 Thread Babu Moger
Add support for cpuid leaf CPUID_8000_001E. Build the config that closely match the underlying hardware. Please refer to the Processor Programming Reference (PPR) for AMD Family 17h Model for more details. Signed-off-by: Babu Moger <babu.mo...@amd.com> --- target/i386/cpu.

[Qemu-devel] [PATCH v11 4/5] i386: Enable TOPOEXT feature on AMD EPYC CPU

2018-05-24 Thread Babu Moger
Enable TOPOEXT feature on EPYC CPU. This is required to support hyperthreading on VM guests. Also extend xlevel to 0x801E. Disable TOPOEXT feature for legacy machines and also disable TOPOEXT feature if the config cannot be supported. Signed-off-by: Babu Moger <babu.mo...@amd.

[Qemu-devel] [PATCH v11 2/5] i386: Populate AMD Processor Cache Information for cpuid 0x8000001D

2018-05-24 Thread Babu Moger
-by: Babu Moger <babu.mo...@amd.com> --- target/i386/cpu.c | 117 ++ target/i386/kvm.c | 29 -- 2 files changed, 143 insertions(+), 3 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 5c9bdc9..0d423e5 100644 --- a/

[Qemu-devel] [PATCH v11 1/5] i386: Clean up cache CPUID code

2018-05-24 Thread Babu Moger
duardo Habkost <ehabk...@redhat.com> Signed-off-by: Babu Moger <babu.mo...@amd.com> --- target/i386/cpu.c | 117 +++--- target/i386/cpu.h | 14 --- 2 files changed, 67 insertions(+), 64 deletions(-) diff --git a/target/i386/cpu.c b

[Qemu-devel] [PATCH v10 4/5] i386: Enable TOPOEXT feature on AMD EPYC CPU

2018-05-21 Thread Babu Moger
Enable TOPOEXT feature on EPYC CPU. This is required to support hyperthreading on VM guests. Also extend xlevel to 0x801E. Disable TOPOEXT feature for legacy machines and also disable TOPOEXT feature if the config cannot be supported. Signed-off-by: Babu Moger <babu.mo...@amd.

[Qemu-devel] [PATCH v10 1/5] i386: Clean up cache CPUID code

2018-05-21 Thread Babu Moger
duardo Habkost <ehabk...@redhat.com> Signed-off-by: Babu Moger <babu.mo...@amd.com> --- target/i386/cpu.c | 117 +++--- target/i386/cpu.h | 14 --- 2 files changed, 67 insertions(+), 64 deletions(-) diff --git a/target/i386/cpu.c b

[Qemu-devel] [PATCH v10 3/5] i386: Add support for CPUID_8000_001E for AMD

2018-05-21 Thread Babu Moger
Add support for cpuid leaf CPUID_8000_001E. Build the config that closely match the underlying hardware. Please refer Processor Programming Reference (PPR) for AMD Family 17h Model for more details. Signed-off-by: Babu Moger <babu.mo...@amd.com> --- target/i386/cpu.

[Qemu-devel] [PATCH v10 5/5] i386: Remove generic SMT thread check

2018-05-21 Thread Babu Moger
Remove generic non-intel check while validating hyperthreading support. Certain AMD CPUs can support hyperthreading now. CPU family with TOPOEXT feature can support hyperthreading now. Signed-off-by: Babu Moger <babu.mo...@amd.com> Tested-by: Geoffrey McRae <ge...@hostfission.com&

[Qemu-devel] [PATCH v13 5/5] i386: Remove generic SMT thread check

2018-06-08 Thread Babu Moger
Remove generic non-intel check while validating hyperthreading support. Certain AMD CPUs can support hyperthreading now. CPU family with TOPOEXT feature can support hyperthreading now. Signed-off-by: Babu Moger Tested-by: Geoffrey McRae Reviewed-by: Eduardo Habkost --- target/i386/cpu.c | 17

[Qemu-devel] [PATCH v13 2/5] i386: Introduce auto_topoext bit to manage topoext

2018-06-08 Thread Babu Moger
Introduce the auto_topoext bit to to control topoext feature. Also add new field auto_topoext(in X86CPUDefinition). This will be used to enable topoext on newer CPU models where topoext can be supported. Signed-off-by: Babu Moger --- include/hw/i386/pc.h | 4 target/i386/cpu.c| 12

[Qemu-devel] [PATCH v13 0/5] i386: Enable TOPOEXT to support hyperthreading on AMD CPU

2018-06-08 Thread Babu Moger
D_ECX_x03. Added 2 more patches. Patch 1. Fixes cache associativity. Patch 4. Adds TOPOEXT feature on AMD EPYC CPU. Babu Moger (5): i386: Add support for CPUID_8000_001E for AMD i386: Introduce auto_topoext bit to manage topoext i386: Enable TOPOEXT feature on AMD EPYC CPU i386: Verify and en

[Qemu-devel] [PATCH v13 3/5] i386: Enable TOPOEXT feature on AMD EPYC CPU

2018-06-08 Thread Babu Moger
Enable TOPOEXT feature on EPYC CPU. This is required to support hyperthreading on VM guests. Also extend xlevel to 0x801E. TOPOEXT feature is disabled for legacy machines. Signed-off-by: Babu Moger --- target/i386/cpu.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/target/i386

[Qemu-devel] [PATCH v13 4/5] i386: Verify and enable topoext feature if supported

2018-06-08 Thread Babu Moger
If the CPU model supports topoext feature, enabled the feature automatically if it can be supported. Signed-off-by: Babu Moger --- target/i386/cpu.c | 40 1 file changed, 40 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 4dd9a82

[Qemu-devel] [PATCH v13 1/5] i386: Add support for CPUID_8000_001E for AMD

2018-06-08 Thread Babu Moger
Add support for cpuid leaf CPUID_8000_001E. Build the config that closely match the underlying hardware. Please refer to the Processor Programming Reference (PPR) for AMD Family 17h Model for more details. Signed-off-by: Babu Moger --- target/i386/cpu.c | 86

Re: [Qemu-devel] [PATCH v13 3/5] i386: Enable TOPOEXT feature on AMD EPYC CPU

2018-06-12 Thread Babu Moger
On 06/12/2018 02:05 PM, Eduardo Habkost wrote: On Tue, Jun 12, 2018 at 06:38:08PM +, Moger, Babu wrote: [...] I'm starting to think that enabling TOPOEXT automatically is adding too much complexity and compatibility problems, and it's better to leave this task to management software.

[Qemu-devel] [PATCH v15 0/3] i386: Enable TOPOEXT to support hyperthreading on AMD CPU

2018-06-15 Thread Babu Moger
atch 2 and 3). 2.Removed the generic non-intel check and made a separate patch with some changes(Patch 5). 3.Fixed L3_N_SETS_AMD(from 4096 to 8192) based on CPUID_Fn801D_ECX_x03. Added 2 more patches. Patch 1. Fixes cache associativity. Patch 4. Adds TOPOEXT feature on AMD EPYC CPU. Ba

[Qemu-devel] [PATCH v15 2/3] i386: Enable TOPOEXT feature on AMD EPYC CPU

2018-06-15 Thread Babu Moger
Enable TOPOEXT feature on EPYC CPU. This is required to support hyperthreading on VM guests. Also extend xlevel to 0x801E. Disable topoext on PC_COMPAT_2_12 and keep xlevel 0x800a. Signed-off-by: Babu Moger --- include/hw/i386/pc.h | 8 target/i386/cpu.c| 10 ++ 2

[Qemu-devel] [PATCH v15 3/3] i386: Remove generic SMT thread check

2018-06-15 Thread Babu Moger
Remove generic non-intel check while validating hyperthreading support. Certain AMD CPUs can support hyperthreading now. CPU family with TOPOEXT feature can support hyperthreading now. Signed-off-by: Babu Moger Tested-by: Geoffrey McRae Reviewed-by: Eduardo Habkost --- target/i386/cpu.c | 17

[Qemu-devel] [PATCH v15 1/3] i386: Fix up the Node id for CPUID_8000_001E

2018-06-15 Thread Babu Moger
here. We can achieve this by shifting the bits. Signed-off-by: Babu Moger --- target/i386/cpu.c | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 7a4484b..5246be4 100644 --- a/target/i386/cpu.c +++ b/target/i386

[Qemu-devel] [PATCH v16 0/3] i386: Enable TOPOEXT to support hyperthreading on AMD CPU

2018-06-19 Thread Babu Moger
1D and 0x801E (Patch 2 and 3). 2.Removed the generic non-intel check and made a separate patch with some changes(Patch 5). 3.Fixed L3_N_SETS_AMD(from 4096 to 8192) based on CPUID_Fn801D_ECX_x03. Added 2 more patches. Patch 1. Fixes cache associativity. Patch 4. Adds TOPOEXT feature on A

[Qemu-devel] [PATCH v16 3/3] i386: Remove generic SMT thread check

2018-06-19 Thread Babu Moger
Remove generic non-intel check while validating hyperthreading support. Certain AMD CPUs can support hyperthreading now. CPU family with TOPOEXT feature can support hyperthreading now. Signed-off-by: Babu Moger Tested-by: Geoffrey McRae Reviewed-by: Eduardo Habkost --- target/i386/cpu.c | 17

[Qemu-devel] [PATCH v16 1/3] i386: Fix up the Node id for CPUID_8000_001E

2018-06-19 Thread Babu Moger
the node id to make this work. We can achieve this by shifting the socket_id bits left to address more nodes. Signed-off-by: Babu Moger --- target/i386/cpu.c | 26 +- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index

[Qemu-devel] [PATCH v16 2/3] i386: Enable TOPOEXT feature on AMD EPYC CPU

2018-06-19 Thread Babu Moger
Enable TOPOEXT feature on EPYC CPU. This is required to support hyperthreading on VM guests. Also extend xlevel to 0x801E. Disable topoext on PC_COMPAT_2_12 and keep xlevel 0x800a. Signed-off-by: Babu Moger --- include/hw/i386/pc.h | 8 target/i386/cpu.c| 10 ++ 2

[Qemu-devel] [PATCH v14 2/6] i386: Enable TOPOEXT feature on AMD EPYC CPU

2018-06-13 Thread Babu Moger
Enable TOPOEXT feature on EPYC CPU. This is required to support hyperthreading on VM guests. Also extend xlevel to 0x801E. Signed-off-by: Babu Moger --- target/i386/cpu.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c

[Qemu-devel] [PATCH v14 3/6] i386: Disable TOPOEXT feature on pc-2.12

2018-06-13 Thread Babu Moger
Disable TOPOEXT feature for older machines. Signed-off-by: Babu Moger --- include/hw/i386/pc.h | 4 1 file changed, 4 insertions(+) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 04d1f8c..ecccf6b 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -303,6

[Qemu-devel] [PATCH v14 5/6] i386: Disable TOPOEXT feature if it cannot be supported

2018-06-13 Thread Babu Moger
Disable the TOPOEXT feature if it cannot be supported. We cannot support this feature with more than 2 nr_threads or more than 32 cores in a socket. Signed-off-by: Babu Moger --- target/i386/cpu.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/target/i386

[Qemu-devel] [PATCH v14 1/6] i386: Set TOPOEXT unconditionally for comapatibility

2018-06-13 Thread Babu Moger
Enabling TOPOEXT feature might cause compatibility issues if older kernels does not set this feature. Lets set this feature unconditionally. Signed-off-by: Babu Moger --- target/i386/kvm.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/target/i386/kvm.c b/target/i386/kvm.c index

[Qemu-devel] [PATCH v14 4/6] cpus: Add new function topology_supports_topoext

2018-06-13 Thread Babu Moger
Add new function topology_supports_topoext to verify if we can support topoext feature. Will be used to enable/disable topoext feature. Signed-off-by: Babu Moger --- accel/tcg/user-exec-stub.c | 5 + cpus.c | 13 + include/qom/cpu.h | 9

[Qemu-devel] [PATCH v14 6/6] i386: Remove generic SMT thread check

2018-06-13 Thread Babu Moger
Remove generic non-intel check while validating hyperthreading support. Certain AMD CPUs can support hyperthreading now. CPU family with TOPOEXT feature can support hyperthreading now. Signed-off-by: Babu Moger Tested-by: Geoffrey McRae Reviewed-by: Eduardo Habkost --- target/i386/cpu.c | 17

[Qemu-devel] [PATCH v14 0/6] i386: Enable TOPOEXT to support hyperthreading on AMD CPU

2018-06-13 Thread Babu Moger
D_ECX_x03. Added 2 more patches. Patch 1. Fixes cache associativity. Patch 4. Adds TOPOEXT feature on AMD EPYC CPU. Babu Moger (6): i386: Set TOPOEXT unconditionally for comapatibility i386: Enable TOPOEXT feature on AMD EPYC CPU i386: Disable TOPOEXT feature on pc-2.12 cpus: Add new function t

[Qemu-devel] [PATCH v12 3/4] i386: Enable TOPOEXT feature on AMD EPYC CPU

2018-06-06 Thread Babu Moger
Enable TOPOEXT feature on EPYC CPU. This is required to support hyperthreading on VM guests. Also extend xlevel to 0x801E. Disable TOPOEXT feature for legacy machines. Signed-off-by: Babu Moger --- include/hw/i386/pc.h | 4 target/i386/cpu.c| 11 +-- 2 files changed, 13

[Qemu-devel] [PATCH v12 0/4] i386: Enable TOPOEXT to support hyperthreading on AMD CPU

2018-06-06 Thread Babu Moger
ges(Patch 5). 3.Fixed L3_N_SETS_AMD(from 4096 to 8192) based on CPUID_Fn801D_ECX_x03. Added 2 more patches. Patch 1. Fixes cache associativity. Patch 4. Adds TOPOEXT feature on AMD EPYC CPU. Babu Moger (4): i386: Add support for CPUID_8000_001E for AMD i386: Verify if topoext feature can be

[Qemu-devel] [PATCH v12 2/4] i386: Verify if topoext feature can be supported

2018-06-06 Thread Babu Moger
topoext feature cannot be supported in certain cases with large number of cores or threads. Add the check. Signed-off-by: Babu Moger --- target/i386/cpu.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 86fb1a4

[Qemu-devel] [PATCH v12 1/4] i386: Add support for CPUID_8000_001E for AMD

2018-06-06 Thread Babu Moger
Add support for cpuid leaf CPUID_8000_001E. Build the config that closely match the underlying hardware. Please refer to the Processor Programming Reference (PPR) for AMD Family 17h Model for more details. Signed-off-by: Babu Moger --- target/i386/cpu.c | 86

[Qemu-devel] [PATCH v12 4/4] i386: Remove generic SMT thread check

2018-06-06 Thread Babu Moger
Remove generic non-intel check while validating hyperthreading support. Certain AMD CPUs can support hyperthreading now. CPU family with TOPOEXT feature can support hyperthreading now. Signed-off-by: Babu Moger Tested-by: Geoffrey McRae Reviewed-by: Eduardo Habkost --- target/i386/cpu.c | 17

[Qemu-devel] [PATCH v7 3/9] i386: Initialize cache information for EPYC family processors

2018-04-26 Thread Babu Moger
Initialize pre-determined cache information for EPYC processors. Signed-off-by: Babu Moger <babu.mo...@amd.com> Tested-by: Geoffrey McRae <ge...@hostfission.com> --- target/i386/cpu.c | 96 +++ 1 file changed, 96 insertions(+)

[Qemu-devel] [PATCH v7 6/9] i386: Populate AMD Processor Cache Information for cpuid 0x8000001D

2018-04-26 Thread Babu Moger
Add information for cpuid 0x801D leaf. Populate cache topology information for different cache types(Data Cache, Instruction Cache, L2 and L3) supported by 0x801D leaf. Please refer Processor Programming Reference (PPR) for AMD Family 17h Model for more details. Signed-off-by: Babu Moger

[Qemu-devel] [PATCH v7 4/9] i386: Add new property to control cache info

2018-04-26 Thread Babu Moger
for compatibility. Signed-off-by: Babu Moger <babu.mo...@amd.com> Tested-by: Geoffrey McRae <ge...@hostfission.com> --- include/hw/i386/pc.h | 4 target/i386/cpu.c| 1 + target/i386/cpu.h| 5 + 3 files changed, 10 insertions(+) diff --git a/include/hw/i386/pc.h b/i

[Qemu-devel] [PATCH v7 9/9] i386: Remove generic SMT thread check

2018-04-26 Thread Babu Moger
Remove generic non-intel check while validating hyperthreading support. Certain AMD CPUs can support hyperthreading now. CPU family with TOPOEXT feature can support hyperthreading now. Signed-off-by: Babu Moger <babu.mo...@amd.com> Tested-by: Geoffrey McRae <ge...@hostfission.com>

[Qemu-devel] [PATCH v7 7/9] i386: Add support for CPUID_8000_001E for AMD

2018-04-26 Thread Babu Moger
Populate threads/core_id/apic_ids/socket_id when CPUID_EXT3_TOPOEXT feature is supported. This is required to support hyperthreading feature on AMD CPUs. This is supported via CPUID_8000_001E extended functions. Signed-off-by: Babu Moger <babu.mo...@amd.com> Tested-by: Geoffrey McR

[Qemu-devel] [PATCH v7 2/9] i386: Add cache information in X86CPUDefinition

2018-04-26 Thread Babu Moger
Add cache information in X86CPUDefinition and CPUX86State. Signed-off-by: Babu Moger <babu.mo...@amd.com> Tested-by: Geoffrey McRae <ge...@hostfission.com> --- target/i386/cpu.c | 4 target/i386/cpu.h | 8 2 files changed, 12 insertions(+) diff --git a/target/i386/cp

[Qemu-devel] [PATCH v7 8/9] i386: Enable TOPOEXT feature on AMD EPYC CPU

2018-04-26 Thread Babu Moger
Enable TOPOEXT feature on EPYC CPU. This is required to support hyperthreading on VM guests. Also extend xlevel to 0x801E. Signed-off-by: Babu Moger <babu.mo...@amd.com> Tested-by: Geoffrey McRae <ge...@hostfission.com> --- target/i386/cpu.c | 11 +-- 1 file changed,

[Qemu-devel] [PATCH v7 1/9] i386: Helpers to encode cache information consistently

2018-04-26 Thread Babu Moger
encode CPUID leaves for a cache. This will help us ensure consistency between cache information CPUID leaves, and make the existing inconsistencies in CPUID info more visible. Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> Signed-off-by: Babu Moger <babu.mo...@amd.com> Tested-by:

[Qemu-devel] [PATCH v7 0/9] i386: Enable TOPOEXT to support hyperthreading on AMD CPU

2018-04-26 Thread Babu Moger
). 2.Removed the generic non-intel check and made a separate patch with some changes(Patch 5). 3.Fixed L3_N_SETS_AMD(from 4096 to 8192) based on CPUID_Fn801D_ECX_x03. Added 2 more patches. Patch 1. Fixes cache associativity. Patch 4. Adds TOPOEXT feature on AMD EPYC CPU. Babu Moger (8): i386: A

[Qemu-devel] [PATCH v7 5/9] i386: Use the statically loaded cache definitions

2018-04-26 Thread Babu Moger
Use the statically loaded cache definitions if available and legacy-cache parameter is not set. Signed-off-by: Babu Moger <babu.mo...@amd.com> Tested-by: Geoffrey McRae <ge...@hostfission.com> --- target/i386/cpu.c | 22 +- 1 file changed, 17 insertions(+),

Re: [Qemu-devel] [PATCH] AMD Processor Topology Information

2018-01-25 Thread Babu Moger
Hi Stanislav, I am working on to support hyperthreading feature on kvm/qemu guests for AMD EPYC family of processors. I saw your patch series https://patchwork.ozlabs.org/patch/834022/. I am planning to refresh these patches with few changes. Let me know if it is fine with you. Thanks Babu

[Qemu-devel] [PATCH 5/5] target/i386: Remove generic SMT thread check

2018-01-26 Thread Babu Moger
Remove generic non-intel check while validating hyperthreading support. Certain AMD CPUs can support hyperthreading now. CPU family with TOPOEXT feature can support hyperthreading now. Signed-off-by: Babu Moger <babu.mo...@amd.com> --- target/i386/cpu.c | 13 - 1 file chan

[Qemu-devel] [PATCH 0/5] Enable TOPOEXT to support hyperthreading on AMD CPU

2018-01-26 Thread Babu Moger
feature on AMD EPYC CPU. Babu Moger (3): target/i386: Fix instruction cache associativity for AMD target/i386: Enable TOPOEXT feature on AMD EPYC CPU target/i386: Remove generic SMT thread check Stanislav Lanci (2): target/i386: Populate AMD Processor Cache Information target/i386: Add

[Qemu-devel] [PATCH 1/5] target/i386: Fix instruction cache associativity for AMD

2018-01-26 Thread Babu Moger
Per Processor Programming Reference, CPUID_Fn8005_EDX should report L1 instruction cache associativity as 4(way) instead of 2(way). Signed-off-by: Babu Moger <babu.mo...@amd.com> --- target/i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/c

[Qemu-devel] [PATCH 3/5] target/i386: Add support for CPUID_8000_001E for AMD

2018-01-26 Thread Babu Moger
nci <p...@polepetko.eu> Signed-off-by: Babu Moger <babu.mo...@amd.com> --- target/i386/cpu.c | 8 1 file changed, 8 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 31ee746dac..52591a1486 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -3219,

[Qemu-devel] [PATCH 4/5] target/i386: Enable TOPOEXT feature on AMD EPYC CPU

2018-01-26 Thread Babu Moger
Enable TOPOEXT feature on EPYC CPU. This is required to support hyperthreading on VM guests. These are supported via CPUID_8000_001E extended functions. Signed-off-by: Babu Moger <babu.mo...@amd.com> --- target/i386/cpu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff

[Qemu-devel] [PATCH 2/5] target/i386: Populate AMD Processor Cache Information

2018-01-26 Thread Babu Moger
From: Stanislav Lanci <p...@polepetko.eu> Adds information about cache size and topology from cpuid 0x801D leaf for different cache types on AMD processors. Signed-off-by: Stanislav Lanci <p...@polepetko.eu> Signed-off-by: Babu Moger <babu.mo...@amd.com> --- targ

[Qemu-devel] [Bug 1703506] Re: SMT not supported by QEMU on AMD Ryzen CPU

2018-01-30 Thread Babu Moger
Posted few patches to support this feature on AMD EPYC processors. Feel free to test and review. 1. Kernel kvm patch https://patchwork.kernel.org/patch/10190107/ 2. qemu patches https://patchwork.kernel.org/project/qemu-devel/list/?submitter=178527 Thanks -- You received this bug

[Qemu-devel] [Bug 1703506] Re: SMT not supported by QEMU on AMD Ryzen CPU

2018-01-30 Thread Babu Moger
just to be clear.. The kernel kvm patch is rebased on linux-next. If you are on older kernel then try this kernel patch. https://patchwork.kernel.org/patch/10031775/ plus qemu patch. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

[Qemu-devel] [PATCH v2 1/5] target/i386: Fix a minor typo found while reviwing

2018-02-23 Thread Babu Moger
Changed KVM_CPUID_FLAG_SIGNIFCANT_INDEX to KVM_CPUID_FLAG_SIGNIFICANT_INDEX Signed-off-by: Babu Moger <babu.mo...@amd.com> --- linux-headers/asm-x86/kvm.h | 2 +- target/i386/kvm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-headers/asm-x86/k

[Qemu-devel] [PATCH v2 5/5] target/i386: Remove generic SMT thread check

2018-02-23 Thread Babu Moger
Remove generic non-intel check while validating hyperthreading support. Certain AMD CPUs can support hyperthreading now. CPU family with TOPOEXT feature can support hyperthreading now. Signed-off-by: Babu Moger <babu.mo...@amd.com> --- target/i386/cpu.c | 15 +-- 1 file chan

[Qemu-devel] [PATCH v2 4/5] target/i386: Enable TOPOEXT feature on AMD EPYC CPU

2018-02-23 Thread Babu Moger
Enable TOPOEXT feature on EPYC CPU. This is required to support hyperthreading on VM guests. Also extend xlevel to 0x801E. These are supported via CPUID_8000_001E extended functions. Signed-off-by: Babu Moger <babu.mo...@amd.com> --- target/i386/cpu.c | 5 +++-- 1 file changed, 3 inse

[Qemu-devel] [PATCH v2 3/5] target/i386: Add support for CPUID_8000_001E for AMD

2018-02-23 Thread Babu Moger
nci <p...@polepetko.eu> Signed-off-by: Babu Moger <babu.mo...@amd.com> --- target/i386/cpu.c | 8 1 file changed, 8 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index a5a480e..191e850 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -3666,6 +3666,14 @@

[Qemu-devel] [PATCH v2 0/5] Enable TOPOEXT to support hyperthreading on AMD CPU

2018-02-23 Thread Babu Moger
4096 to 8192) based on CPUID_Fn801D_ECX_x03. Added 2 more patches. Patch 1. Fixes cache associativity. Patch 4. Adds TOPOEXT feature on AMD EPYC CPU. Babu Moger (3): target/i386: Fix a minor typo found while reviwing target/i386: Enable TOPOEXT feature on AMD EPYC CPU target/i386: Remove

[Qemu-devel] [PATCH v2 2/5] target/i386: Populate AMD Processor Cache Information

2018-02-23 Thread Babu Moger
From: Stanislav Lanci <p...@polepetko.eu> Adds information about cache size and topology from cpuid 0x801D leaf for different cache types on AMD processors. Signed-off-by: Stanislav Lanci <p...@polepetko.eu> Signed-off-by: Babu Moger <babu.mo...@amd.com> --- targ

[Qemu-devel] [PATCH v4 2/5] target/i386: Populate AMD Processor Cache Information

2018-03-12 Thread Babu Moger
Model for more details. Signed-off-by: Stanislav Lanci <p...@polepetko.eu> Signed-off-by: Babu Moger <babu.mo...@amd.com> --- target/i386/cpu.c | 65 +++ target/i386/kvm.c | 29 ++--- 2 files changed, 91 insertio

[Qemu-devel] [PATCH v4 3/5] target/i386: Add support for CPUID_8000_001E for AMD

2018-03-12 Thread Babu Moger
nci <p...@polepetko.eu> Signed-off-by: Babu Moger <babu.mo...@amd.com> --- target/i386/cpu.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 5fdbedd..ba63d0c 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -3655,6 +3655,13 @@

[Qemu-devel] [PATCH v4 1/5] target/i386: Generalize some of the macro definitions

2018-03-12 Thread Babu Moger
Generalize some of the macro definitions which are generic cache properties that are common between CPUID 4 and CPUID 0x801D in preparation for adding support for 0x801D. Signed-off-by: Babu Moger <babu.mo...@amd.com> --- target/i386/cpu.

[Qemu-devel] [PATCH v4 0/5] Enable TOPOEXT to support hyperthreading on AMD CPU

2018-03-12 Thread Babu Moger
XT feature on AMD EPYC CPU. Babu Moger (3): target/i386: Generalize some of the macro definitions target/i386: Enable TOPOEXT feature on AMD EPYC CPU target/i386: Remove generic SMT thread check Stanislav Lanci (2): target/i386: Populate AMD Processor Cache Information target/i386: A

[Qemu-devel] [PATCH v4 4/5] target/i386: Enable TOPOEXT feature on AMD EPYC CPU

2018-03-12 Thread Babu Moger
Enable TOPOEXT feature on EPYC CPU. This is required to support hyperthreading on VM guests. Also extend xlevel to 0x801E. Signed-off-by: Babu Moger <babu.mo...@amd.com> --- target/i386/cpu.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/target/i386/c

[Qemu-devel] [PATCH v4 5/5] target/i386: Remove generic SMT thread check

2018-03-12 Thread Babu Moger
Remove generic non-intel check while validating hyperthreading support. Certain AMD CPUs can support hyperthreading now. CPU family with TOPOEXT feature can support hyperthreading now. Signed-off-by: Babu Moger <babu.mo...@amd.com> --- target/i386/cpu.c | 15 +-- 1 file chan

[Qemu-devel] [PATCH v6 5/9] i386: Use the statically loaded cache definitions

2018-04-10 Thread Babu Moger
Use the statically loaded cache definitions if available and legacy-cache parameter is not set. Signed-off-by: Babu Moger <babu.mo...@amd.com> Tested-by: Geoffrey McRae <ge...@hostfission.com> --- target/i386/cpu.c | 22 +- 1 file changed, 17 insertions(+),

[Qemu-devel] [PATCH v6 7/9] i386: Add support for CPUID_8000_001E for AMD

2018-04-10 Thread Babu Moger
Populate threads/core_id/apic_ids/socket_id when CPUID_EXT3_TOPOEXT feature is supported. This is required to support hyperthreading feature on AMD CPUs. This is supported via CPUID_8000_001E extended functions. Signed-off-by: Babu Moger <babu.mo...@amd.com> Tested-by: Geoffrey McR

[Qemu-devel] [PATCH v6 4/9] i386: Add new property to control cache info

2018-04-10 Thread Babu Moger
for compatibility. Signed-off-by: Babu Moger <babu.mo...@amd.com> Tested-by: Geoffrey McRae <ge...@hostfission.com> --- include/hw/i386/pc.h | 4 target/i386/cpu.c| 1 + target/i386/cpu.h| 5 + 3 files changed, 10 insertions(+) diff --git a/include/hw/i386/pc.h b/i

[Qemu-devel] [PATCH v6 3/9] i386: Initialize cache information for EPYC family processors

2018-04-10 Thread Babu Moger
Initialize pre-determined cache information for EPYC processors. Signed-off-by: Babu Moger <babu.mo...@amd.com> Tested-by: Geoffrey McRae <ge...@hostfission.com> --- target/i386/cpu.c | 96 +++ 1 file changed, 96 insertions(+)

[Qemu-devel] [PATCH v6 6/9] i386: Populate AMD Processor Cache Information for cpuid 0x8000001D

2018-04-10 Thread Babu Moger
Add information for cpuid 0x801D leaf. Populate cache topology information for different cache types(Data Cache, Instruction Cache, L2 and L3) supported by 0x801D leaf. Please refer Processor Programming Reference (PPR) for AMD Family 17h Model for more details. Signed-off-by: Babu Moger

[Qemu-devel] [PATCH v6 2/9] i386: Add cache information in X86CPUDefinition

2018-04-10 Thread Babu Moger
Add cache information in X86CPUDefinition and CPUX86State. Signed-off-by: Babu Moger <babu.mo...@amd.com> Tested-by: Geoffrey McRae <ge...@hostfission.com> --- target/i386/cpu.c | 4 target/i386/cpu.h | 8 2 files changed, 12 insertions(+) diff --git a/target/i386/cp

[Qemu-devel] [PATCH v6 0/9] i386: Enable TOPOEXT to support hyperthreading on AMD CPU

2018-04-10 Thread Babu Moger
ty. Patch 4. Adds TOPOEXT feature on AMD EPYC CPU. Babu Moger (8): i386: Add cache information in X86CPUDefinition i386: Initialize cache information for EPYC family processors i386: Add new property to control cache info i386: Use the statically loaded cache definitions i386: Populate A

[Qemu-devel] [PATCH v6 1/9] i386: Helpers to encode cache information consistently

2018-04-10 Thread Babu Moger
encode CPUID leaves for a cache. This will help us ensure consistency between cache information CPUID leaves, and make the existing inconsistencies in CPUID info more visible. Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> Signed-off-by: Babu Moger <babu.mo...@amd.com> Tested-by:

[Qemu-devel] [PATCH v6 8/9] i386: Enable TOPOEXT feature on AMD EPYC CPU

2018-04-10 Thread Babu Moger
Enable TOPOEXT feature on EPYC CPU. This is required to support hyperthreading on VM guests. Also extend xlevel to 0x801E. Signed-off-by: Babu Moger <babu.mo...@amd.com> Tested-by: Geoffrey McRae <ge...@hostfission.com> --- target/i386/cpu.c | 11 +-- 1 file changed,

[Qemu-devel] [PATCH v6 9/9] i386: Remove generic SMT thread check

2018-04-10 Thread Babu Moger
Remove generic non-intel check while validating hyperthreading support. Certain AMD CPUs can support hyperthreading now. CPU family with TOPOEXT feature can support hyperthreading now. Signed-off-by: Babu Moger <babu.mo...@amd.com> Tested-by: Geoffrey McRae <ge...@hostfission.com>

[Qemu-devel] [PATCH v5 1/9] i386: Helpers to encode cache information consistently

2018-03-27 Thread Babu Moger
encode CPUID leaves for a cache. This will help us ensure consistency between cache information CPUID leaves, and make the existing inconsistencies in CPUID info more visible. Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> Signed-off-by: Babu Moger <babu.mo...@amd.com> --- targe

[Qemu-devel] [PATCH v5 0/9] i386: Enable TOPOEXT to support hyperthreading on AMD CPU

2018-03-27 Thread Babu Moger
4096 to 8192) based on CPUID_Fn801D_ECX_x03. Added 2 more patches. Patch 1. Fixes cache associativity. Patch 4. Adds TOPOEXT feature on AMD EPYC CPU. Babu Moger (8): i386: Add cache information in X86CPUDefinition i386: Initialize cache information for EPYC family processors i386: Add new

[Qemu-devel] [PATCH v5 2/9] i386: Add cache information in X86CPUDefinition

2018-03-27 Thread Babu Moger
Add cache information in X86CPUDefinition and CPUX86State. Signed-off-by: Babu Moger <babu.mo...@amd.com> --- target/i386/cpu.c | 4 target/i386/cpu.h | 8 2 files changed, 12 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index da59dc4..eec4a97

  1   2   3   4   >