Re: [PATCH v3] target/i386: Fix CPUID encoding of Fn8000001E_ECX

2024-05-10 Thread Moger, Babu
Hi Daniel, On 5/10/2024 3:10 AM, Daniel P. Berrangé wrote: On Fri, May 10, 2024 at 11:05:44AM +0300, Michael Tokarev wrote: 09.05.2024 17:11, Daniel P. Berrangé wrote: On Thu, May 09, 2024 at 04:54:16PM +0300, Michael Tokarev wrote: 03.05.2024 20:46, Babu Moger wrote: diff --git

Re: [PATCH v2] target/i386: Fix CPUID encoding of Fn8000001E_ECX

2024-03-22 Thread Moger, Babu
Any feedback or concerns with this patch? Otherwise can this be merged? Thanks Babu On 1/2/24 17:17, Babu Moger wrote: > Observed the following failure while booting the SEV-SNP guest and the > guest fails to boot with the smp parameters: > "-smp 192,sockets=1,dies=12,cores=8,threads=2". > >

Re: [PATCH v9 00/21] Introduce smp.modules for x86 in QEMU

2024-02-29 Thread Moger, Babu
Sanity tested on AMD machine. Looks good. Tested-by: Babu Moger On 2/27/24 04:32, Zhao Liu wrote: > From: Zhao Liu > > Hi list, > > This is the our v9 patch series, rebased on the master branch at the > commit 03d496a992d9 ("Merge tag 'pull-qapi-2024-02-26' of >

Re: [PATCH v9 07/21] i386/cpu: Use APIC ID info get NumSharingCache for CPUID[0x8000001D].EAX[bits 25:14]

2024-02-29 Thread Moger, Babu
On 2/27/24 04:32, Zhao Liu wrote: > From: Zhao Liu > > The commit 8f4202fb1080 ("i386: Populate AMD Processor Cache Information > for cpuid 0x801D") adds the cache topology for AMD CPU by encoding > the number of sharing threads directly. > > From AMD's APM, NumSharingCache

Re: [PATCH v9 21/21] i386/cpu: Use CPUCacheInfo.share_level to encode CPUID[0x8000001D].EAX[bits 25:14]

2024-02-29 Thread Moger, Babu
On 2/27/24 04:32, Zhao Liu wrote: > From: Zhao Liu > > CPUID[0x801D].EAX[bits 25:14] NumSharingCache: number of logical > processors sharing cache. > > The number of logical processors sharing this cache is > NumSharingCache + 1. > > After cache models have topology information, we can

Re: [PATCH v9 18/21] hw/i386/pc: Support smp.modules for x86 PC machine

2024-02-29 Thread Moger, Babu
On 2/29/24 01:32, Zhao Liu wrote: > Hi Babu, > >>> DEF("smp", HAS_ARG, QEMU_OPTION_smp, >>> "-smp >>> [[cpus=]n][,maxcpus=maxcpus][,drawers=drawers][,books=books][,sockets=sockets]\n" > > Here the "drawers" and "books" are listed... > >>> -" >>>

Re: [PATCH v9 18/21] hw/i386/pc: Support smp.modules for x86 PC machine

2024-02-28 Thread Moger, Babu
Hi Zhao, On 2/27/24 04:32, Zhao Liu wrote: > From: Zhao Liu > > As module-level topology support is added to X86CPU, now we can enable > the support for the modules parameter on PC machines. With this support, > we can define a 5-level x86 CPU topology with "-smp": > > -smp

Re: [PATCH v7 00/16] Support smp.clusters for x86 in QEMU

2024-01-08 Thread Moger, Babu
Hi Zhao, Ran few basic tests on AMD systems. Changes look good. Thanks Babu Tested-by: Babu Moger On 1/8/24 02:27, Zhao Liu wrote: > From: Zhao Liu > > Hi list, > > This is the our v7 patch series, rebased on the master branch at the > commit d328fef93ae7 ("Merge tag 'pull-20231230' of

Re: [PATCH] target/i386: Fix CPUID encoding of Fn8000001E_ECX

2023-12-14 Thread Moger, Babu
Hi Zhao, On 12/14/2023 8:08 AM, Zhao Liu wrote: On Fri, Nov 10, 2023 at 11:08:06AM -0600, Babu Moger wrote: Date: Fri, 10 Nov 2023 11:08:06 -0600 From: Babu Moger Subject: [PATCH] target/i386: Fix CPUID encoding of Fn801E_ECX X-Mailer: git-send-email 2.34.1 Observed the following failure

Re: [PATCH] target/i386: Fix CPUID encoding of Fn8000001E_ECX

2023-12-13 Thread Moger, Babu
Gentle reminder. Please let me know if there are any concerns or please pull these patches for next update. Thanks Babu On 11/10/23 11:08, Babu Moger wrote: Observed the following failure while booting the SEV-SNP guest and the guest fails to boot with the smp parameters: "-smp

Re: [PATCH v4 20/21] i386: Use CPUCacheInfo.share_level to encode CPUID[0x8000001D].EAX[bits 25:14]

2023-09-22 Thread Moger, Babu
On 9/14/2023 2:21 AM, Zhao Liu wrote: From: Zhao Liu CPUID[0x801D].EAX[bits 25:14] NumSharingCache: number of logical processors sharing cache. The number of logical processors sharing this cache is NumSharingCache + 1. After cache models have topology information, we can use

Re: [PATCH v4 19/21] i386: Use offsets get NumSharingCache for CPUID[0x8000001D].EAX[bits 25:14]

2023-09-22 Thread Moger, Babu
On 9/14/2023 2:21 AM, Zhao Liu wrote: From: Zhao Liu The commit 8f4202fb1080 ("i386: Populate AMD Processor Cache Information for cpuid 0x801D") adds the cache topology for AMD CPU by encoding the number of sharing threads directly. From AMD's APM, NumSharingCache

Re: [PATCH v4 00/21] Support smp.clusters for x86 in QEMU

2023-09-22 Thread Moger, Babu
Tested the series on AMD system. Created a VM and ran some basic commands. Everything looks good. Tested-by: Babu Moger On 9/14/2023 2:21 AM, Zhao Liu wrote: From: Zhao Liu Hi list, (CC k...@vger.kernel.org for better browsing.) This is the our v4 patch series, rebased on the master

Re: [PATCH v4 01/21] i386: Fix comment style in topology.h

2023-09-22 Thread Moger, Babu
On 9/14/2023 2:21 AM, Zhao Liu wrote: From: Zhao Liu For function comments in this file, keep the comment style consistent with other files in the directory. Signed-off-by: Zhao Liu Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Yanan Wang Reviewed-by: Xiaoyao Li Acked-by: Michael S.

Re: [PATCH v2 1/2] i386: Add support for SUCCOR feature

2023-09-06 Thread Moger, Babu
Hi John, On 9/5/2023 10:01 AM, John Allen wrote: On Fri, Sep 01, 2023 at 11:30:53AM +0100, Joao Martins wrote: On 26/07/2023 21:41, John Allen wrote: Add cpuid bit definition for the SUCCOR feature. This cpuid bit is required to be exposed to guests to allow them to handle machine check

Re: [PATCH v3 14/17] i386: Use CPUCacheInfo.share_level to encode CPUID[4]

2023-08-23 Thread Moger, Babu
Hi Zhao, On 8/18/23 02:37, Zhao Liu wrote: > Hi Babu, > > On Mon, Aug 14, 2023 at 11:03:53AM -0500, Moger, Babu wrote: >> Date: Mon, 14 Aug 2023 11:03:53 -0500 >> From: "Moger, Babu" >> Subject: Re: [PATCH v3 14/17] i386: Use CPUCacheInfo.share_level

Re: [PATCH v3 14/17] i386: Use CPUCacheInfo.share_level to encode CPUID[4]

2023-08-14 Thread Moger, Babu
Hi Zhao, On 8/14/23 03:22, Zhao Liu wrote: > Hi Babu, > > On Fri, Aug 04, 2023 at 10:48:29AM -0500, Moger, Babu wrote: >> Date: Fri, 4 Aug 2023 10:48:29 -0500 >> From: "Moger, Babu" >> Subject: Re: [PATCH v3 14/17] i386: Use CPUCacheInfo.share_level

Re: [PATCH v3 16/17] i386: Use CPUCacheInfo.share_level to encode CPUID[0x8000001D].EAX[bits 25:14]

2023-08-04 Thread Moger, Babu
Hi Zhao, On 8/4/23 04:56, Zhao Liu wrote: > Hi Babu, > > On Thu, Aug 03, 2023 at 03:44:13PM -0500, Moger, Babu wrote: >> Date: Thu, 3 Aug 2023 15:44:13 -0500 >> From: "Moger, Babu" >> Subject: Re: [PATCH v3 16/17] i386: Use CPUCacheInfo.share_level to encode

Re: [PATCH v3 14/17] i386: Use CPUCacheInfo.share_level to encode CPUID[4]

2023-08-04 Thread Moger, Babu
Hi Zhao, On 8/4/23 04:48, Zhao Liu wrote: > Hi Babu, > > On Thu, Aug 03, 2023 at 11:41:40AM -0500, Moger, Babu wrote: >> Date: Thu, 3 Aug 2023 11:41:40 -0500 >> From: "Moger, Babu" >> Subject: Re: [PATCH v3 14/17] i386: Use CPUCacheInfo.share_level

Re: [PATCH v3 16/17] i386: Use CPUCacheInfo.share_level to encode CPUID[0x8000001D].EAX[bits 25:14]

2023-08-03 Thread Moger, Babu
Hi Zhao, Please copy the thread to k...@vger.kernel.org also. It makes it easier to browse. On 8/1/23 05:35, Zhao Liu wrote: > From: Zhao Liu > > CPUID[0x801D].EAX[bits 25:14] is used to represent the cache > topology for amd CPUs. Please change this to. CPUID[0x801D].EAX[bits

Re: [PATCH v3 15/17] i386: Fix NumSharingCache for CPUID[0x8000001D].EAX[bits 25:14]

2023-08-03 Thread Moger, Babu
Hi Zhao, On 8/1/23 05:35, Zhao Liu wrote: > From: Zhao Liu > > The commit 8f4202fb1080 ("i386: Populate AMD Processor Cache Information > for cpuid 0x801D") adds the cache topology for AMD CPU by encoding > the number of sharing threads directly. > > From AMD's APM, NumSharingCache

Re: [PATCH v3 14/17] i386: Use CPUCacheInfo.share_level to encode CPUID[4]

2023-08-03 Thread Moger, Babu
Hi Zhao, On 8/2/23 18:49, Moger, Babu wrote: > Hi Zhao, > > Hitting this error after this patch. > > ERROR:../target/i386/cpu.c:257:max_processor_ids_for_cache: code should > not be reached > Bail out! ERROR:../target/i386/cpu.c:257:max_processor_ids_for_cache: code &g

Re: [PATCH v3 14/17] i386: Use CPUCacheInfo.share_level to encode CPUID[4]

2023-08-02 Thread Moger, Babu
Hi Zhao, Hitting this error after this patch. ERROR:../target/i386/cpu.c:257:max_processor_ids_for_cache: code should not be reached Bail out! ERROR:../target/i386/cpu.c:257:max_processor_ids_for_cache: code should not be reached Aborted (core dumped) Looks like share_level for all the caches

Re: [PATCH v3 10/17] i386/cpu: Introduce cluster-id to X86CPU

2023-08-02 Thread Moger, Babu
Hi Zhao, On 8/1/23 05:35, Zhao Liu wrote: > From: Zhuocheng Ding > > We introduce cluster-id other than module-id to be consistent with s/We introduce/Introduce/ Thanks Babu > CpuInstanceProperties.cluster-id, and this avoids the confusion > of parameter names when hotplugging. > >

Re: [PATCH v3 08/17] i386: Support modules_per_die in X86CPUTopoInfo

2023-08-02 Thread Moger, Babu
Hi Zhao, On 8/1/23 05:35, Zhao Liu wrote: > From: Zhuocheng Ding > > Support module level in i386 cpu topology structure "X86CPUTopoInfo". > > Since x86 does not yet support the "clusters" parameter in "-smp", > X86CPUTopoInfo.modules_per_die is currently always 1. Therefore, the > module

Re: [PATCH v3 06/17] i386/cpu: Consolidate the use of topo_info in cpu_x86_cpuid()

2023-08-02 Thread Moger, Babu
Hi Zhao, On 8/1/23 05:35, Zhao Liu wrote: > From: Zhao Liu > > In cpu_x86_cpuid(), there are many variables in representing the cpu > topology, e.g., topo_info, cs->nr_cores/cs->nr_threads. > > Since the names of cs->nr_cores/cs->nr_threads does not accurately > represent its meaning, the use

Re: [PATCH v3 05/17] i386/cpu: Use APIC ID offset to encode cache topo in CPUID[4]

2023-08-02 Thread Moger, Babu
Hi Zhao, On 8/1/23 05:35, Zhao Liu wrote: > From: Zhao Liu > > Refer to the fixes of cache_info_passthrough ([1], [2]) and SDM, the > CPUID.04H:EAX[bits 25:14] and CPUID.04H:EAX[bits 31:26] should use the > nearest power-of-2 integer. > > The nearest power-of-2 integer can be caculated by

Re: [PATCH v3 03/17] softmmu: Fix CPUSTATE.nr_cores' calculation

2023-08-02 Thread Moger, Babu
Hi Zhao, On 8/1/23 05:35, Zhao Liu wrote: > From: Zhuocheng Ding > > From CPUState.nr_cores' comment, it represents "number of cores within > this CPU package". > > After 003f230e37d7 ("machine: Tweak the order of topology members in > struct CpuTopology"), the meaning of smp.cores changed to

Re: [PATCH v3 02/17] tests: Rename test-x86-cpuid.c to test-x86-topo.c

2023-08-01 Thread Moger, Babu
Zhao, On 8/1/23 05:35, Zhao Liu wrote: > From: Zhao Liu > > In fact, this unit tests APIC ID other than CPUID. This is not clear. The tests in test-x86-topo.c actually test the APIC ID combinations. Rename to test-x86-topo.c to make its name more in line with its actual content. > Rename to

Re: [PATCH v3 00/17] Support smp.clusters for x86

2023-08-01 Thread Moger, Babu
Hi Zhao, On 8/1/23 05:35, Zhao Liu wrote: > From: Zhao Liu > > Hi list, > > This is the our v3 patch series, rebased on the master branch at the > commit 234320cd0573 ("Merge tag 'pull-target-arm-20230731' of https: > //git.linaro.org/people/pmaydell/qemu-arm into staging"). > > Comparing

Re: [PATCH v3 01/17] i386: Fix comment style in topology.h

2023-08-01 Thread Moger, Babu
Hi Zhao, On 8/1/23 05:35, Zhao Liu wrote: > From: Zhao Liu > > For function comments in this file, keep the comment style consistent > with other places. s/with other places./with other files in the directory./ > > Signed-off-by: Zhao Liu > Reviewed-by: Philippe Mathieu-Daudé Reviewed-by:

Re: [PATCH 1/2] i386: Add support for SUCCOR feature

2023-07-06 Thread Moger, Babu
Hi John, Thanks for the patches. Few comments below. On 7/6/23 14:40, John Allen wrote: > Add cpuid bit definition for the SUCCOR feature. This cpuid bit is required to > be exposed to guests to allow them to handle machine check exceptions on AMD > hosts. > > Reported-by: William Roche >

RE: [PATCH v4 0/7] Add EPYC-Genoa model and update previous EPYC Models

2023-05-05 Thread Moger, Babu
[AMD Official Use Only - General] > -Original Message- > From: Paolo Bonzini > Sent: Friday, May 5, 2023 3:31 AM > To: Moger, Babu > Cc: pbonz...@redhat.com; richard.hender...@linaro.org; > weijiang.y...@intel.com; phi...@linaro.org; d...@amazon.co.uk; > p...

Re: [PATCH v3 1/7] target/i386: allow versioned CPUs to specify new cache_info

2023-05-04 Thread Moger, Babu
Hi Robert, On 4/25/23 10:22, Moger, Babu wrote: > Hi Robert, > > On 4/25/23 00:42, Robert Hoo wrote: >> Babu Moger 于2023年4月25日周二 00:42写道: >>> >>> From: Michael Roth >>> >>> New EPYC CPUs versions require small changes to their cache_info's. &

RE: [PATCH v3 2/7] target/i386: Add new EPYC CPU versions with updated cache_info

2023-04-28 Thread Moger, Babu
[AMD Official Use Only - General] Hi Maksim, > -Original Message- > From: Maksim Davydov > Sent: Wednesday, April 26, 2023 3:35 AM > To: Moger, Babu > Cc: weijiang.y...@intel.com; phi...@linaro.org; d...@amazon.co.uk; > p...@xen.org; joao.m.mart...@oracle.com; qem

Re: [PATCH v3 2/7] target/i386: Add new EPYC CPU versions with updated cache_info

2023-04-25 Thread Moger, Babu
Hi Maksim, On 4/25/23 07:51, Maksim Davydov wrote: > > On 4/24/23 19:33, Babu Moger wrote: >> From: Michael Roth >> >> Introduce new EPYC cpu versions: EPYC-v4 and EPYC-Rome-v3. >> The only difference vs. older models is an updated cache_info with >> the 'complex_indexing' bit unset, since this

Re: [PATCH v3 1/7] target/i386: allow versioned CPUs to specify new cache_info

2023-04-25 Thread Moger, Babu
Hi Robert, On 4/25/23 00:42, Robert Hoo wrote: > Babu Moger 于2023年4月25日周二 00:42写道: >> >> From: Michael Roth >> >> New EPYC CPUs versions require small changes to their cache_info's. > > Do you mean, for the real HW of EPYC CPU, each given model, e.g. Rome, > has HW version updates

Re: [PATCH 0/2] i386: fixup number of logical CPUs when host-cache-info=on

2022-05-25 Thread Moger, Babu
On 5/25/22 02:05, Igor Mammedov wrote: > On Tue, 24 May 2022 14:48:29 -0500 > "Moger, Babu" wrote: > >> On 5/24/22 10:19, Igor Mammedov wrote: >>> On Tue, 24 May 2022 11:10:18 -0400 >>> Igor Mammedov wrote: >>> >>> CCing AM

Re: [PATCH 0/2] i386: fixup number of logical CPUs when host-cache-info=on

2022-05-25 Thread Moger, Babu
On 5/24/22 18:23, Alejandro Jimenez wrote: > On 5/24/2022 3:48 PM, Moger, Babu wrote: >> >> On 5/24/22 10:19, Igor Mammedov wrote: >>> On Tue, 24 May 2022 11:10:18 -0400 >>> Igor Mammedov wrote: >>> >>> CCing AMD folks as that might be of int

Re: [PATCH 0/2] i386: fixup number of logical CPUs when host-cache-info=on

2022-05-24 Thread Moger, Babu
On 5/24/22 10:19, Igor Mammedov wrote: > On Tue, 24 May 2022 11:10:18 -0400 > Igor Mammedov wrote: > > CCing AMD folks as that might be of interest to them I am trying to recreate the bug on my AMD system here.. Seeing this message.. qemu-system-x86_64: -numa node,nodeid=0,memdev=ram-node0:

RE: [PATCH v7 00/13] APIC ID fixes for AMD EPYC CPU model

2020-03-23 Thread Moger, Babu
[AMD Official Use Only - Internal Distribution Only] > -Original Message- > From: Igor Mammedov > Sent: Wednesday, March 18, 2020 5:47 AM > To: Moger, Babu > Cc: Eduardo Habkost ; marcel.apfelb...@gmail.com; > pbonz...@redhat.com; r...@twiddle.net; m...@redh

RE: [PATCH v7 00/13] APIC ID fixes for AMD EPYC CPU model

2020-03-17 Thread Moger, Babu
[AMD Official Use Only - Internal Distribution Only] > -Original Message- > From: Eduardo Habkost > Sent: Tuesday, March 17, 2020 6:46 PM > To: Moger, Babu > Cc: marcel.apfelb...@gmail.com; pbonz...@redhat.com; r...@twiddle.net; > m...@redhat.com; imamm...@redh

RE: [PATCH v7 00/13] APIC ID fixes for AMD EPYC CPU model

2020-03-17 Thread Moger, Babu
[AMD Official Use Only - Internal Distribution Only] Ok. I am looking at it. > -Original Message- > From: Eduardo Habkost > Sent: Tuesday, March 17, 2020 6:22 PM > To: Moger, Babu > Cc: marcel.apfelb...@gmail.com; pbonz...@redhat.com; r...@twiddle.net; > m...

RE: [PATCH v5 16/16] tests: Update the Unit tests

2020-03-10 Thread Moger, Babu
[AMD Official Use Only - Internal Distribution Only] > -Original Message- > From: Eduardo Habkost > Sent: Tuesday, March 10, 2020 6:06 PM > To: Moger, Babu > Cc: marcel.apfelb...@gmail.com; pbonz...@redhat.com; r...@twiddle.net; > m...@redhat.com; imamm...@redh

RE: [PATCH] i386: pass CLZERO to guests with EPYC CPU model on AMD ZEN platform

2020-02-05 Thread Moger, Babu
[AMD Official Use Only - Internal Distribution Only] > -Original Message- > From: Eduardo Habkost > Sent: Wednesday, February 5, 2020 4:38 PM > To: Ani Sinha > Cc: Paolo Bonzini ; r...@twiddle.net; qemu- > de...@nongnu.org; Singh, Brijesh ; Moger, Babu > > S

[PATCH v2 2/2] i386: Add 2nd Generation AMD EPYC processors

2019-11-07 Thread Moger, Babu
Adds the support for 2nd Gen AMD EPYC Processors. The model display name will be EPYC-Rome. Adds the following new feature bits on top of the feature bits from the first generation EPYC models. perfctr-core : core performance counter extensions support. Enables the VM to use

[PATCH v2 1/2] i386: Add missing cpu feature bits in EPYC model

2019-11-07 Thread Moger, Babu
Adds the following missing CPUID bits: perfctr-core : core performance counter extensions support. Enables the VM to use extended performance counter support. It enables six programmable counters instead of 4 counters. clzero : instruction zeroes out the 64 byte

[PATCH v2 0/2] Add support for 2nd generation AMD EPYC processors

2019-11-07 Thread Moger, Babu
The following series adds the support for 2nd generation AMD EPYC Processors on qemu guests. The model display name for 2nd generation will be EPYC-Rome. Also fixes few missed cpu feature bits in 1st generation EPYC models. The Reference documents are available at

RE: [PATCH 1/2] i386: Add missing cpu feature bits in EPYC model

2019-11-05 Thread Moger, Babu
> -Original Message- > From: Eduardo Habkost > Sent: Tuesday, November 5, 2019 3:43 PM > To: Moger, Babu > Cc: m...@redhat.com; marcel.apfelb...@gmail.com; pbonz...@redhat.com; > r...@twiddle.net; qemu-devel@nongnu.org > Subject: Re: [PATCH 1/2] i386: Add mis

[PATCH 2/2] i386: Add 2nd Generation AMD EPYC processors

2019-11-05 Thread Moger, Babu
Adds the support for 2nd Gen AMD EPYC Processors. The model display name will be EPYC-Rome. Adds the following new feature bits on top of the feature bits from the first generation EPYC models. perfctr-core : core performance counter extensions support. Enables the VM to use

[PATCH 1/2] i386: Add missing cpu feature bits in EPYC model

2019-11-05 Thread Moger, Babu
Adds the following missing CPUID bits: perfctr-core : core performance counter extensions support. Enables the VM to use extended performance counter support. It enables six programmable counters instead of 4 counters. clzero : instruction zeroes out the 64 byte

[PATCH 0/2] Add support for 2nd generation AMD EPYC processors

2019-11-05 Thread Moger, Babu
The following series adds the support for 2nd generation AMD EPYC Processors on qemu guests. The model display name for will be EPYC-Rome. Also fixes few missed cpu feature bits in 1st generation EPYC models. The Reference documents are available at

Re: [Qemu-devel] [RFC 2 PATCH 13/16] machine: Add new epyc property in PCMachineState

2019-10-11 Thread Moger, Babu
On 10/10/19 10:59 PM, Eduardo Habkost wrote: > On Fri, Sep 06, 2019 at 07:13:09PM +0000, Moger, Babu wrote: >> Adds new epyc property in PCMachineState and also in MachineState. >> This property will be used to initialize the mode specific handlers >> to generate apic

Re: [Qemu-devel] [RFC 2 PATCH 13/16] machine: Add new epyc property in PCMachineState

2019-10-11 Thread Moger, Babu
On 10/10/19 10:59 PM, Eduardo Habkost wrote: > On Fri, Sep 06, 2019 at 07:13:09PM +0000, Moger, Babu wrote: >> Adds new epyc property in PCMachineState and also in MachineState. >> This property will be used to initialize the mode specific handlers >> to generate apic

Re: [RFC 2 PATCH 06/16] hw/core: Add core complex id in X86CPU topology

2019-09-23 Thread Moger, Babu
On 9/22/19 7:48 AM, Michael S. Tsirkin wrote: > On Fri, Sep 06, 2019 at 07:12:18PM +0000, Moger, Babu wrote: >> Introduce cpu core complex id(ccx_id) in x86CPU topology. >> Each CCX can have upto 4 cores and share same L3 cache. >> This information is required to build t

Re: [RFC 2 PATCH 00/16] APIC ID fixes for AMD EPYC CPU models

2019-09-20 Thread Moger, Babu
Eduardo and all, Waiting for the feedback on this to move forward. Appreciate your time. Thanks Babu On 9/6/19 2:11 PM, Moger, Babu wrote: > These series fixes the problems encoding APIC ID for AMD EPYC cpu models. > https://bugzilla.redhat.com/show_bug.cgi?id=1728166 > > This i

Re: [Qemu-devel] [RFC 2 PATCH 06/16] hw/core: Add core complex id in X86CPU topology

2019-09-06 Thread Moger, Babu
On 9/6/19 2:20 PM, Eric Blake wrote: > On 9/6/19 2:12 PM, Moger, Babu wrote: >> Introduce cpu core complex id(ccx_id) in x86CPU topology. >> Each CCX can have upto 4 cores and share same L3 cache. >> This information is required to build the topology in >> new

[Qemu-devel] [RFC 2 PATCH 15/16] i386: Fix pkg_id offset for epyc mode

2019-09-06 Thread Moger, Babu
Signed-off-by: Babu Moger --- target/i386/cpu.c | 24 +++- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index f25491a029..f8b1fc5c07 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -4094,9 +4094,10 @@ void

[Qemu-devel] [RFC 2 PATCH 13/16] machine: Add new epyc property in PCMachineState

2019-09-06 Thread Moger, Babu
Adds new epyc property in PCMachineState and also in MachineState. This property will be used to initialize the mode specific handlers to generate apic ids. Signed-off-by: Babu Moger --- hw/i386/pc.c | 23 +++ include/hw/boards.h |2 ++ include/hw/i386/pc.h |

[Qemu-devel] [RFC 2 PATCH 14/16] hw/i386: Introduce epyc mode function handlers

2019-09-06 Thread Moger, Babu
Introduce following handlers for new epyc mode. x86_apicid_from_cpu_idx_epyc: Generate apicid from cpu index. x86_topo_ids_from_apicid_epyc: Generate topo ids from apic id. x86_apicid_from_topo_ids_epyci: Generate apicid from topo ids. Signed-off-by: Babu Moger --- hw/i386/pc.c |5 + 1

[Qemu-devel] [RFC 2 PATCH 16/16] hw/core: Fix up the machine_set_cpu_numa_node for epyc

2019-09-06 Thread Moger, Babu
Current topology id match will not work for epyc mode when setting the node id. In epyc mode, ids like smt_id, thread_id, core_id, ccx_id, socket_id can be same for more than one CPUs with across two numa nodes. For example, we can have two CPUs with following ids on two different node. 1.

[Qemu-devel] [RFC 2 PATCH 11/16] Introduce-topo_ids_from_apicid-handler

2019-09-06 Thread Moger, Babu
hw/i386: Introduce topo_ids_from_apicid handler PCMachineState Add function pointer topo_ids_from_apicid in PCMachineState. Initialize with correct handler based on mode selected. x86_apicid_from_cpu_idx will be the default handler. Signed-off-by: Babu Moger --- hw/i386/pc.c | 13

[Qemu-devel] [RFC 2 PATCH 10/16] hw/i386: Introduce apicid_from_cpu_idx in PCMachineState

2019-09-06 Thread Moger, Babu
Add function pointers in PCMachineState to handle apic id specific functionalities. This will be used to initialize with correct handlers based on mode selected. x86_apicid_from_cpu_idx will be default handler. Signed-off-by: Babu Moger --- hw/i386/pc.c |5 -

[Qemu-devel] [RFC 2 PATCH 09/16] hw/i386: Introduce initialize_topo_info function

2019-09-06 Thread Moger, Babu
Introduce initialize_topo_info to initialize X86CPUTopoInfo data structure to build the topology. No functional change. Signed-off-by: Babu Moger --- hw/i386/pc.c | 29 + 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c

[Qemu-devel] [RFC 2 PATCH 08/16] i386: Cleanup and use the new epyc mode topology functions

2019-09-06 Thread Moger, Babu
Use the new epyc mode functions and delete the unused code. Signed-off-by: Babu Moger --- target/i386/cpu.c | 171 +++-- 1 file changed, 48 insertions(+), 123 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index

[Qemu-devel] [RFC 2 PATCH 06/16] hw/core: Add core complex id in X86CPU topology

2019-09-06 Thread Moger, Babu
Introduce cpu core complex id(ccx_id) in x86CPU topology. Each CCX can have upto 4 cores and share same L3 cache. This information is required to build the topology in new apyc mode. Signed-off-by: Babu Moger --- hw/core/machine-hmp-cmds.c |3 +++ hw/core/machine.c | 13

[Qemu-devel] [RFC 2 PATCH 12/16] hw/i386: Introduce apic_id_from_topo_ids handler in PCMachineState

2019-09-06 Thread Moger, Babu
Add function pointer apic_id_from_topo_ids in PCMachineState. Initialize with correct handler based on the mode selected. Also rename the handler apicid_from_topo_ids to x86_apicid_from_topo_ids for consistency. x86_apicid_from_topo_ids will be the default handler. Signed-off-by: Babu Moger ---

[Qemu-devel] [RFC 2 PATCH 05/16] hw/i386: Simplify topology Offset/width Calculation

2019-09-06 Thread Moger, Babu
Some parameters are unnecessarily passed for offset/width calculation. Remove those parameters from function prototypes. No functional change. Signed-off-by: Babu Moger --- include/hw/i386/topology.h | 45 ++-- target/i386/cpu.c | 12

[Qemu-devel] [RFC 2 PATCH 03/16] hw/i386: Introduce X86CPUTopoInfo to contain topology info

2019-09-06 Thread Moger, Babu
This is an effort to re-arrange few data structure for better readability. Add X86CPUTopoInfo which will have all the topology informations required to build the cpu topology. There is no functional changes. Signed-off-by: Babu Moger --- hw/i386/pc.c | 40

[Qemu-devel] [RFC 2 PATCH 07/16] hw/386: Add new epyc mode topology decoding functions

2019-09-06 Thread Moger, Babu
These functions add support for building new epyc mode topology given smp details like numa nodes, cores, threads and sockets. Subsequent patches will use these functions to build the topology. The topology details are available in Processor Programming Reference (PPR) for AMD Family 17h Model

[Qemu-devel] [RFC 2 PATCH 04/16] machine: Add SMP Sockets in CpuTopology

2019-09-06 Thread Moger, Babu
Store the smp Sockets in CpuTopology. Socket information is required to build the cpu topology in new epyc mode. Signed-off-by: Babu Moger --- hw/core/machine.c |1 + hw/i386/pc.c|1 + include/hw/boards.h |2 ++ vl.c|1 + 4 files changed, 5

[Qemu-devel] [RFC 2 PATCH 02/16] hw/i386: Rename X86CPUTopoInfo structure to X86CPUTopoIDs

2019-09-06 Thread Moger, Babu
Rename few data structures related to X86 topology. X86CPUTopoIDs will have individual arch ids. Next patch introduces X86CPUTopoInfo which will have all topology information(like cores, threads etc..). Adds node_id and ccx_id. This will be required to support new epyc mode mode. There is no

[Qemu-devel] [RFC 2 PATCH 01/16] numa: Split the numa functionality

2019-09-06 Thread Moger, Babu
To support new epyc mode, we need to know the number of numa nodes in advance to generate apic id correctly. So, split the numa initialization into two. The function parse_numa initializes numa_info and updates nb_numa_nodes. And then parse_numa_node does the numa node initialization.

[Qemu-devel] [RFC 2 PATCH 00/16] APIC ID fixes for AMD EPYC CPU models

2019-09-06 Thread Moger, Babu
These series fixes the problems encoding APIC ID for AMD EPYC cpu models. https://bugzilla.redhat.com/show_bug.cgi?id=1728166 This is the second pass to give an idea of the changes required to address the issue. First pass is availabe at https://patchwork.kernel.org/cover/11069785/ Currently,

Re: [Qemu-devel] [RFC PATCH 4/5] hw/i386: Generate apicid based on cpu_type

2019-08-01 Thread Moger, Babu
Hi Eduardo, Thanks for the quick comments. I will look into your comments closely and will let you know if I have questions. > -Original Message- > From: Eduardo Habkost > Sent: Thursday, August 1, 2019 2:29 PM > To: Moger, Babu > Cc: marcel.apfelb...@gmail.com; m...@re

[Qemu-devel] [RFC PATCH 1/5] hw/boards: Add sockets in CpuTopology structure

2019-07-31 Thread Moger, Babu
Add sockets in CpuTopology. This is required when building the CPU topology. Signed-off-by: Babu Moger --- hw/core/machine.c | 1 + hw/i386/pc.c| 1 + include/hw/boards.h | 2 ++ vl.c| 1 + 4 files changed, 5 insertions(+) diff --git a/hw/core/machine.c

[Qemu-devel] [RFC PATCH 5/5] i386: Fix pkg_id offset EPYC

2019-07-31 Thread Moger, Babu
Per Processor Programming Reference (PPR) for AMD Family 17h Models, the pkg_id offset in apicid is 6. Fix the offset based on EPYC models. Signed-off-by: Babu Moger --- target/i386/cpu.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/target/i386/cpu.c

[Qemu-devel] [RFC PATCH 3/5] i386: Use topology functions from topology.h

2019-07-31 Thread Moger, Babu
Use the functions defined in topology.h and remove the old code. Signed-off-by: Babu Moger --- target/i386/cpu.c | 146 +- 1 file changed, 27 insertions(+), 119 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index

[Qemu-devel] [RFC PATCH 2/5] hw/i386: Add AMD EPYC topology encoding

2019-07-31 Thread Moger, Babu
Currently, the apicid is a sequential number in x86 cpu models. This works fine for most of the cases. But, in certain cases this will result into cpu topology inconsistency. This problem was observed in AMD EPYC cpu models. To address that we need to build apicid as per the hardware

[Qemu-devel] [RFC PATCH 0/5] APIC ID fixes for AMD EPYC CPU models

2019-07-31 Thread Moger, Babu
These series fixes the problems encoding APIC ID for AMD EPYC cpu models. https://bugzilla.redhat.com/show_bug.cgi?id=1728166 This is the first pass to give an idea of the changes required to address the issue. Please feel free to comment. Currently, apic id is decoded based on

[Qemu-devel] [RFC PATCH 4/5] hw/i386: Generate apicid based on cpu_type

2019-07-31 Thread Moger, Babu
Check the cpu_type before calling the apicid functions from topology.h. Signed-off-by: Babu Moger --- hw/i386/pc.c | 81 +--- 1 file changed, 70 insertions(+), 11 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index ef39463fd5..dad55c940f

Re: [Qemu-devel] [PATCH] i386: Disable TOPOEXT by default on "-cpu host"

2018-08-13 Thread Moger, Babu
Looks good. Did some basic testing. Reviewed-by: Babu Moger > -Original Message- > From: Richard W.M. Jones > Sent: Friday, August 10, 2018 2:41 AM > To: Eduardo Habkost > Cc: qemu-devel@nongnu.org; Paolo Bonzini ; > Richard Henderson ; Moger, Babu > > S

Re: [Qemu-devel] [PATCH for-3.0] i386: Rename enum CacheType members

2018-07-18 Thread Moger, Babu
> -Original Message- > From: Aleksandar Markovic [mailto:amarko...@wavecomp.com] > Sent: Wednesday, July 18, 2018 8:35 AM > To: Philippe Mathieu-Daudé ; Eduardo Habkost > ; qemu-devel@nongnu.org > Cc: Moger, Babu ; Paolo Bonzini > ; Aurelien Jarno ; Richard >

Re: [Qemu-devel] [PATCH] pc: Fix typo on PC_COMPAT_2_12

2018-07-09 Thread Moger, Babu
Looks good. thanks > -Original Message- > From: Eduardo Habkost [mailto:ehabk...@redhat.com] > Sent: Monday, July 2, 2018 8:10 PM > To: qemu-devel@nongnu.org > Cc: Eduardo Habkost ; Paolo Bonzini > ; Moger, Babu ; Michael > S. Tsirkin ; Igor Mammedov > Subje

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

2018-06-15 Thread Moger, Babu
m > Cc: qemu-devel@nongnu.org; mtosa...@redhat.com; k...@vger.kernel.org; > k...@tripleback.net; ge...@hostfission.com; Moger, Babu > > Subject: [PATCH v15 1/3] i386: Fix up the Node id for CPUID_8000_001E > > This is part of topoext support. To keep the compatibility, we n

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

2018-06-15 Thread Moger, Babu
> -Original Message- > From: Moger, Babu > Sent: Thursday, June 14, 2018 6:09 PM > To: Moger, Babu ; Eduardo Habkost > > Cc: m...@redhat.com; marcel.apfelb...@gmail.com; pbonz...@redhat.com; > r...@twiddle.net; mtosa...@redhat.com; qemu-devel@nongnu.org; >

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

2018-06-14 Thread Moger, Babu
> -Original Message- > From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] > On Behalf Of Moger, Babu > Sent: Thursday, June 14, 2018 3:41 PM > To: Eduardo Habkost > Cc: m...@redhat.com; marcel.apfelb...@gmail.com; pbonz...@redhat.com; > r.

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

2018-06-14 Thread Moger, Babu
> -Original Message- > From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] > On Behalf Of Moger, Babu > Sent: Thursday, June 14, 2018 5:19 PM > To: Eduardo Habkost > Cc: m...@redhat.com; marcel.apfelb...@gmail.com; pbonz...@redhat.com; > r.

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

2018-06-14 Thread Moger, Babu
> -Original Message- > From: Eduardo Habkost [mailto:ehabk...@redhat.com] > Sent: Thursday, June 14, 2018 2:13 PM > To: Moger, Babu > Cc: m...@redhat.com; marcel.apfelb...@gmail.com; pbonz...@redhat.com; > r...@twiddle.net; mtosa...@redhat.com; qemu-dev

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

2018-06-14 Thread Moger, Babu
> -Original Message- > From: Eduardo Habkost [mailto:ehabk...@redhat.com] > Sent: Thursday, June 14, 2018 1:41 PM > To: Moger, Babu > Cc: m...@redhat.com; marcel.apfelb...@gmail.com; pbonz...@redhat.com; > r...@twiddle.net; mtosa...@redhat.com; qemu-dev

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

2018-06-14 Thread Moger, Babu
> -Original Message- > From: Eduardo Habkost [mailto:ehabk...@redhat.com] > Sent: Thursday, June 14, 2018 1:40 PM > To: Moger, Babu > Cc: m...@redhat.com; marcel.apfelb...@gmail.com; pbonz...@redhat.com; > r...@twiddle.net; mtosa...@redhat.com; qemu-dev

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

2018-06-14 Thread Moger, Babu
> -Original Message- > From: Eduardo Habkost [mailto:ehabk...@redhat.com] > Sent: Wednesday, June 13, 2018 9:22 PM > To: Moger, Babu > Cc: m...@redhat.com; marcel.apfelb...@gmail.com; pbonz...@redhat.com; > r...@twiddle.net; mtosa...@redhat.com; qemu-dev

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

2018-06-13 Thread Moger, Babu
> -Original Message- > From: Eduardo Habkost [mailto:ehabk...@redhat.com] > Sent: Wednesday, June 13, 2018 1:49 PM > To: Moger, Babu > Cc: m...@redhat.com; marcel.apfelb...@gmail.com; pbonz...@redhat.com; > r...@twiddle.net; mtosa...@redhat.com; qemu-dev

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

2018-06-13 Thread Moger, Babu
> -Original Message- > From: Eduardo Habkost [mailto:ehabk...@redhat.com] > Sent: Wednesday, June 13, 2018 1:18 PM > To: Moger, Babu > Cc: m...@redhat.com; marcel.apfelb...@gmail.com; pbonz...@redhat.com; > r...@twiddle.net; mtosa...@redhat.com; qemu-dev

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

2018-06-13 Thread Moger, Babu
> -Original Message- > From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] > On Behalf Of Moger, Babu > Sent: Wednesday, June 13, 2018 1:11 PM > To: Eduardo Habkost > Cc: m...@redhat.com; marcel.apfelb...@gmail.com; pbonz...@redhat.com; > r.

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

2018-06-13 Thread Moger, Babu
> -Original Message- > From: Eduardo Habkost [mailto:ehabk...@redhat.com] > Sent: Wednesday, June 13, 2018 12:18 PM > To: Moger, Babu > Cc: m...@redhat.com; marcel.apfelb...@gmail.com; pbonz...@redhat.com; > r...@twiddle.net; mtosa...@redhat.com; qemu-dev

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

2018-06-13 Thread Moger, Babu
..@twiddle.net; mtosa...@redhat.com; qemu-devel@nongnu.org; > k...@vger.kernel.org; k...@tripleback.net; ge...@hostfission.com; Jiri > Denemark > Subject: Re: [PATCH v13 3/5] i386: Enable TOPOEXT feature on AMD EPYC > CPU > > > > On 06/12/2018 02:05 PM, Eduardo Habkost wrote: > &

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

2018-06-12 Thread Moger, Babu
> -Original Message- > From: Eduardo Habkost [mailto:ehabk...@redhat.com] > Sent: Tuesday, June 12, 2018 12:40 PM > To: Moger, Babu > Cc: m...@redhat.com; marcel.apfelb...@gmail.com; pbonz...@redhat.com; > r...@twiddle.net; mtosa...@redhat.com; qemu-dev

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

2018-06-12 Thread Moger, Babu
> -Original Message- > From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] > On Behalf Of Eduardo Habkost > Sent: Monday, June 11, 2018 4:10 PM > To: Moger, Babu > Cc: m...@redhat.com; marcel.apfelb...@gmail.com; pbonz...@redhat.com; > r.

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

2018-06-11 Thread Moger, Babu
> -Original Message- > From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] > On Behalf Of Eduardo Habkost > Sent: Monday, June 11, 2018 4:05 PM > To: Moger, Babu > Cc: m...@redhat.com; marcel.apfelb...@gmail.com; pbonz...@redhat.com; > r.

  1   2   >