Re: [PATCH] i386: Add missing cpu feature bits in EPYC-Rome model

2021-03-03 Thread Babu Moger
On 3/3/21 3:42 AM, David Edmondson wrote: > On Tuesday, 2021-03-02 at 15:20:00 -06, Babu Moger wrote: > >> Found the following cpu feature bits missing from EPYC-Rome model. >> ibrs: Indirect Branch Restricted Speculation >> ssbd: Speculative Store Bypass

[PATCH v2] i386: Add missing cpu feature bits in EPYC-Rome model

2021-03-03 Thread Babu Moger
machine type) x86 EPYC-Rome-v1 AMD EPYC-Rome Processor x86 EPYC-Rome-v2 AMD EPYC-Rome Processor Reported-by: Pankaj Gupta Signed-off-by: Babu Moger Signed-off-by: Pankaj Gupta --- v2: Model-id remains same between EPYC-Rome-v1 and EPYC-Rome-v2. Removed model-id in the patch

Re: constant_tsc support for SVM guest

2021-04-23 Thread Babu Moger
Hi Wei, I dont know the background of this feature. I will let some else to comment on that. The patch exposes the feature TscInvariant to the guest successfully. Tested it on my AMD box. I have few comments on your patch below. On 4/23/21 12:32 AM, Wei Huang wrote: > There was a customer reques

Re: [PATCH v2] i386: Add the support for AMD EPYC 3rd generation processors

2021-02-23 Thread Babu Moger
cept_dr to generic intercepts") >> 03bfeeb988a9 ("KVM: SVM: Change intercept_cr to generic intercepts") >> c45ad7229d13 ("KVM: SVM: Introduce >> vmcb_(set_intercept/clr_intercept/_is_intercept)") >> a90c1ed9f11d ("(pcid) KVM: nSVM: Remove u

RE: [PATCH v2] i386: Add the support for AMD EPYC 3rd generation processors

2021-02-24 Thread Babu Moger
Hi Pankaj, > -Original Message- > From: Pankaj Gupta > Sent: Wednesday, February 24, 2021 2:19 AM > To: Moger, Babu > Cc: Paolo Bonzini ; richard.hender...@linaro.org; > Eduardo Habkost ; Qemu Developers de...@nongnu.org> > Subject: Re: [PATCH v2] i386: Add the support for AMD EPYC 3rd

RE: [PATCH v2] i386: Add the support for AMD EPYC 3rd generation processors

2021-03-01 Thread Babu Moger
Pankaj, > -Original Message- > From: Pankaj Gupta > Sent: Monday, March 1, 2021 10:46 AM > To: Pankaj Gupta > Cc: Moger, Babu ; Paolo Bonzini > ; richard.hender...@linaro.org; Eduardo Habkost > ; Qemu Developers > Subject: Re: [PATCH v2] i386: Add the support for AMD EPYC 3rd generation

RE: [PATCH v2] i386: Add the support for AMD EPYC 3rd generation processors

2021-03-01 Thread Babu Moger
> -Original Message- > From: Pankaj Gupta > Sent: Monday, March 1, 2021 2:22 PM > To: Moger, Babu > Cc: Pankaj Gupta ; Paolo Bonzini > ; richard.hender...@linaro.org; Eduardo Habkost > ; Qemu Developers > Subject: Re: [PATCH v2] i386: Add the support for AMD EPYC 3rd generation > proc

[PATCH] i386: Add the support for AMD EPYC 3rd generation processors

2021-01-22 Thread Babu Moger
Restricted Speculation ssbd: Speculative Store Bypass Disable erms: Enhanced REP MOVSB/STOSB support fsrm: Fast Short REP MOVSB support invpcid : Invalidate processor context ID pku : Protection keys support Signed-off-by: Babu Moger --- target/i386/cpu.c | 105

Re: [PATCH] i386: Add the support for AMD EPYC 3rd generation processors

2021-02-01 Thread Babu Moger
, Eduardo Habkost wrote: > On Fri, Jan 22, 2021 at 10:36:27AM -0600, Babu Moger wrote: >> Adds the support for AMD 3rd generation processors. The model >> display for the new processor will be EPYC-Milan. >> >> Adds the following new feature bits on top of the feature bits f

[PATCH v2] i386: Add the support for AMD EPYC 3rd generation processors

2021-02-09 Thread Babu Moger
t/_is_intercept)") a90c1ed9f11d ("(pcid) KVM: nSVM: Remove unused field") fa44b82eb831 ("KVM: x86: Move MPK feature detection to common code") 38f3e775e9c2 ("x86/Kconfig: Update config and kernel doc for MPK feature on AMD") 37486135d3a7 ("KVM: x86: Fix pk

Re: [Bug 1871842] [NEW] AMD CPUID leaf 0x8000'0008 reported number of cores inconsistent with ACPI.MADT

2020-04-09 Thread Babu Moger
On 4/9/20 9:00 AM, Igor Mammedov wrote: > On Thu, 09 Apr 2020 12:58:11 - > Philipp Eppelt <1871...@bugs.launchpad.net> wrote: > >> Public bug reported: >> >> Setup: >> CPU: AMD EPYC-v2 or host's EPYC cpu >> Linux 64-bit fedora host; Kernel version 5.5.15-200.fc31 >> qemu version: self build

Re: [Bug 1871842] [NEW] AMD CPUID leaf 0x8000'0008 reported number of cores inconsistent with ACPI.MADT

2020-04-09 Thread Babu Moger
Philipp, Can you please check if this patch works for you. diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 90ffc5f..e467fee 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -5831,10 +5831,17 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count, }

Re: [Bug 1871842] [NEW] AMD CPUID leaf 0x8000'0008 reported number of cores inconsistent with ACPI.MADT

2020-04-15 Thread Babu Moger
week. Thanks On 4/9/20 12:48 PM, Babu Moger wrote: > > > On 4/9/20 9:00 AM, Igor Mammedov wrote: >> On Thu, 09 Apr 2020 12:58:11 - >> Philipp Eppelt <1871...@bugs.launchpad.net> wrote: >> >>> Public bug reported: >>> >>> Setup: >

[Bug 1856335] Re: Cache Layout wrong on many Zen Arch CPUs

2020-04-15 Thread Babu Moger
AMD does not use dies. For AMD dies is normally set to 1. You probably have to pass dies in some other ways. Did you try the latest qemu v 5.0? Please try it. Qemu expects the user to configure the topology based on their requirement. Try replacing with You can also use the numa configuratio

[PATCH] target/i386: Fix the CPUID leaf CPUID_Fn80000008

2020-04-17 Thread Babu Moger
?id=206537 Reported-by: Philipp Eppelt <1871...@bugs.launchpad.net> Signed-off-by: Babu Moger --- target/i386/cpu.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 90ffc5f..68210f6 100644 --- a/target/i386/cpu.c

Re: [PATCH] target/i386: Fix the CPUID leaf CPUID_Fn80000008

2020-04-17 Thread Babu Moger
On 4/17/20 2:15 PM, Eduardo Habkost wrote: > Good catch, thanks for the patch. Comments below: > > On Fri, Apr 17, 2020 at 10:14:32AM -0500, Babu Moger wrote: >> CPUID leaf CPUID_Fn8008_ECX provides information about the >> number of threads supported by the process

[v2 PATCH] target/i386: Fix the CPUID leaf CPUID_Fn80000008

2020-04-17 Thread Babu Moger
?id=206537 Reported-by: Philipp Eppelt <1871...@bugs.launchpad.net> Signed-off-by: Babu Moger --- v2: Used env->pkg_offset for bits 15:12 which is already available. target/i386/cpu.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/target/i38

[Bug 1856335] Re: Cache Layout wrong on many Zen Arch CPUs

2020-04-20 Thread Babu Moger
Damir, Example of how to use numa configuration. -smp 16,maxcpus=16,cores=16,threads=1,sockets=1 -numa node,nodeid=0,cpus=0-7 -numa node,nodeid=1,cpus=8-15 This will help to put all the cores in correct L3 boundary. I strongly suggest to use the latest qemu release. -- You received this bug not

[Bug 1856335] Re: Cache Layout wrong on many Zen Arch CPUs

2020-05-05 Thread Babu Moger
Hi Seiger, I am not an expert on libvirt. I mostly use qemu command line for my test. I was able to achieve the 3960X configuration with the following command line. # qemu-system-x86_64 -name rhel7 -m 16384 -smp 24,cores=12,threads=2,sockets=1 -hda vdisk.qcow2 -enable-kvm -net nic -net bridge,b

[Bug 1856335] Re: Cache Layout wrong on many Zen Arch CPUs

2020-05-07 Thread Babu Moger
Yes. Sieger. Please install 5.0 it should work fine. I am not sure about 4.2. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1856335 Title: Cache Layout wrong on many Zen Arch CPUs Status in QEMU:

[Bug 1856335] Re: Cache Layout wrong on many Zen Arch CPUs

2020-05-15 Thread Babu Moger
Latest qemu has removed all the hard coded configurations for AMD. It is leaving everything to customize. One way is to configure is using numa nodes. This will make sure cpus under one numa node share same L3. Then pin the correct host cpus to guest cpus using vcpupin. I would change this -numa n

[Bug 1856335] Re: Cache Layout wrong on many Zen Arch CPUs

2020-05-18 Thread Babu Moger
Sieger, I am not an expert on XML. So, I dont know. Qemu probably cannot handle disabled cores. I am still trying to learn more about this problem. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/185633

RE: [PATCH v7 07/13] hw/386: Add EPYC mode topology decoding functions

2020-06-02 Thread Babu Moger
.org > Subject: Re: [PATCH v7 07/13] hw/386: Add EPYC mode topology decoding > functions > > Hi, > > It looks like this series breaks -device and CPU hotplug: > > On Wed, Mar 11, 2020 at 05:53:34PM -0500, Babu Moger wrote: > > These functions add support for building E

RE: [PATCH v7 07/13] hw/386: Add EPYC mode topology decoding functions

2020-06-02 Thread Babu Moger
/13] hw/386: Add EPYC mode topology decoding > functions > > Hi, > > It looks like this series breaks -device and CPU hotplug: > > On Wed, Mar 11, 2020 at 05:53:34PM -0500, Babu Moger wrote: > > These functions add support for building EPYC mode topology given the smp

RE: [PATCH v7 07/13] hw/386: Add EPYC mode topology decoding functions

2020-06-02 Thread Babu Moger
/13] hw/386: Add EPYC mode topology decoding > functions > > On Tue, Jun 02, 2020 at 04:59:19PM -0500, Babu Moger wrote: > > > > > > > -Original Message- > > > From: Eduardo Habkost > > > Sent: Tuesday, June 2, 2020 12:19 PM > > >

RE: [PATCH v7 07/13] hw/386: Add EPYC mode topology decoding functions

2020-06-03 Thread Babu Moger
/13] hw/386: Add EPYC mode topology decoding > functions > > On Tue, Jun 02, 2020 at 04:59:19PM -0500, Babu Moger wrote: > > > > > > > -Original Message- > > > From: Eduardo Habkost > > > Sent: Tuesday, June 2, 2020 12:19 PM > > >

Re: [PATCH v7 07/13] hw/386: Add EPYC mode topology decoding functions

2020-06-03 Thread Babu Moger
On 6/3/20 10:31 AM, Eduardo Habkost wrote: > On Wed, Jun 03, 2020 at 10:22:10AM -0500, Babu Moger wrote: >> >> >>> -Original Message- >>> From: Eduardo Habkost >>> Sent: Tuesday, June 2, 2020 6:01 PM >>> To: Moger, Babu >>

Re: [PATCH v7 07/13] hw/386: Add EPYC mode topology decoding functions

2020-06-03 Thread Babu Moger
On 6/3/20 10:45 AM, Eduardo Habkost wrote: > On Wed, Jun 03, 2020 at 10:38:46AM -0500, Babu Moger wrote: >> >> >> On 6/3/20 10:31 AM, Eduardo Habkost wrote: >>> On Wed, Jun 03, 2020 at 10:22:10AM -0500, Babu Moger wrote: >>>> >>>> >&g

RE: [PATCH v7 07/13] hw/386: Add EPYC mode topology decoding functions

2020-06-03 Thread Babu Moger
v7 07/13] hw/386: Add EPYC mode topology decoding > functions > > On Wed, Jun 03, 2020 at 10:38:46AM -0500, Babu Moger wrote: > > > > > > On 6/3/20 10:31 AM, Eduardo Habkost wrote: > > > On Wed, Jun 03, 2020 at 10:22:10AM -0500, Babu Moger wrote: > > >

RE: [PATCH v13 1/5] i386: Add support for CPUID_8000_001E for AMD

2020-06-03 Thread Babu Moger
redhat.com; > r...@twiddle.net; mtosa...@redhat.com; qemu-devel@nongnu.org; > k...@vger.kernel.org; k...@tripleback.net; ge...@hostfission.com; Dr. David > Alan Gilbert > Subject: Re: [PATCH v13 1/5] i386: Add support for CPUID_8000_001E for AMD > > On Fri, Jun 08, 2018 at 0

RE: [PATCH v13 1/5] i386: Add support for CPUID_8000_001E for AMD

2020-06-04 Thread Babu Moger
..@tripleback.net; ge...@hostfission.com; Dr. David > Alan Gilbert > Subject: Re: [PATCH v13 1/5] i386: Add support for CPUID_8000_001E for AMD > > On Fri, Jun 08, 2018 at 06:56:17PM -0400, Babu Moger wrote: > > Add support for cpuid leaf CPUID_8000_001E. Build the config that cl

RE: [PATCH v13 1/5] i386: Add support for CPUID_8000_001E for AMD

2020-06-05 Thread Babu Moger
..@tripleback.net; ge...@hostfission.com; Dr. David > Alan Gilbert > Subject: Re: [PATCH v13 1/5] i386: Add support for CPUID_8000_001E for AMD > > On Thu, Jun 04, 2020 at 09:06:27AM -0500, Babu Moger wrote: > > > > > > > -Original Message- > > >

[PATCH 2/2] i386: Simplify CPUID_8000_001E for AMD

2020-06-08 Thread Babu Moger
. Refer the Processor Programming Reference (PPR) documentation available from the bugzilla Link below. Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537 Signed-off-by: Babu Moger --- target/i386/cpu.c | 78 + 1 file changed, 37

[PATCH 1/2] hw/386: Fix uninitialized memory with -device and CPU hotplug

2020-06-08 Thread Babu Moger
uninitialized while calling apicid_from_topo_ids. The problem is discussed in the thread below. https://lore.kernel.org/qemu-devel/20200602171838.gg577...@habkost.net/ Fix the problem by initializing the node_id properly. Signed-off-by: Babu Moger --- hw/i386/pc.c |2 ++ include/hw

[PATCH 0/2] Fix couple of issues with AMD topology

2020-06-08 Thread Babu Moger
-devel/20200602175212.gh577...@habkost.net/ https://lore.kernel.org/qemu-devel/20200602175212.gh577...@habkost.net/ --- Babu Moger (2): hw/386: Fix uninitialized memory with -device and CPU hotplug i386: Simplify CPUID_8000_001E for AMD hw/i386/pc.c |2 + include/hw/i386

Re: [PATCH v3 04/18] hw/i386: Introduce initialize_topo_info to initialize X86CPUTopoInfo

2020-01-28 Thread Babu Moger
Igor, On 1/28/20 9:49 AM, Igor Mammedov wrote: > On Tue, 03 Dec 2019 18:37:21 -0600 > Babu Moger wrote: > >> Initialize all the parameters in one function initialize_topo_info. >> >> Signed-off-by: Babu Moger >> Reviewed-by: Eduardo Habkos

Re: [PATCH v3 06/18] hw/core: Add core complex id in X86CPU topology

2020-01-28 Thread Babu Moger
On 1/28/20 10:27 AM, Igor Mammedov wrote: > On Tue, 03 Dec 2019 18:37:35 -0600 > Babu Moger wrote: > >> Introduce last level cache id(llc_id) in x86CPU topology. This information >> is >> required to build the topology in EPIC mode. > can you add a reference

Re: [PATCH v3 06/18] hw/core: Add core complex id in X86CPU topology

2020-01-28 Thread Babu Moger
On 1/28/20 10:31 AM, Eric Blake wrote: > On 12/3/19 6:37 PM, Babu Moger wrote: >> Introduce last level cache id(llc_id) in x86CPU topology.  This >> information is >> required to build the topology in EPIC mode. >> >> Signed-off-by: Babu Moger >> --- >

Re: [PATCH v3 07/18] machine: Add a new function init_apicid_fn in MachineClass

2020-01-28 Thread Babu Moger
On 1/28/20 10:29 AM, Igor Mammedov wrote: > On Tue, 03 Dec 2019 18:37:42 -0600 > Babu Moger wrote: > >> Add a new function init_apicid_fn in MachineClass to initialize the mode >> specific handlers to decode the apic ids. >> >> Signed-off-by: Babu Moger >

Re: [PATCH v3 16/18] hw/i386: Introduce EPYC mode function handlers

2020-01-28 Thread Babu Moger
On 1/28/20 2:04 PM, Eduardo Habkost wrote: > Hi, > > Sorry for taking so long. I was away from the office for a > month, and now I'm finally back. no worries. > > On Tue, Dec 03, 2019 at 06:38:46PM -0600, Babu Moger wrote: >> Introduce followi

Re: [PATCH v3 07/18] machine: Add a new function init_apicid_fn in MachineClass

2020-01-29 Thread Babu Moger
On 1/29/20 3:14 AM, Igor Mammedov wrote: > On Tue, 28 Jan 2020 13:45:31 -0600 > Babu Moger wrote: > >> On 1/28/20 10:29 AM, Igor Mammedov wrote: >>> On Tue, 03 Dec 2019 18:37:42 -0600 >>> Babu Moger wrote: >>> >>>> Add a new function

Re: [PATCH v3 07/18] machine: Add a new function init_apicid_fn in MachineClass

2020-01-29 Thread Babu Moger
On 1/29/20 3:14 AM, Igor Mammedov wrote: > On Tue, 28 Jan 2020 13:45:31 -0600 > Babu Moger wrote: > >> On 1/28/20 10:29 AM, Igor Mammedov wrote: >>> On Tue, 03 Dec 2019 18:37:42 -0600 >>> Babu Moger wrote: >>> >>>> Add a new function

Re: [PATCH v3 07/18] machine: Add a new function init_apicid_fn in MachineClass

2020-01-29 Thread Babu Moger
On 1/29/20 10:51 AM, Eduardo Habkost wrote: > On Wed, Jan 29, 2020 at 10:32:01AM -0600, Babu Moger wrote: >> >> >> On 1/29/20 3:14 AM, Igor Mammedov wrote: >>> On Tue, 28 Jan 2020 13:45:31 -0600 >>> Babu Moger wrote: >>> >>>> On 1/28

Re: [PATCH v4 04/16] hw/i386: Introduce init_topo_info to initialize X86CPUTopoInfo

2020-02-21 Thread Babu Moger
On 2/21/20 11:05 AM, Igor Mammedov wrote: > On Thu, 13 Feb 2020 12:16:51 -0600 > Babu Moger wrote: > >> Initialize all the parameters in one function init_topo_info. > > is it possible to squash it in 2/16 > Sure. We can do that. > >> >> Mo

Re: [PATCH v4 04/16] hw/i386: Introduce init_topo_info to initialize X86CPUTopoInfo

2020-02-24 Thread Babu Moger
On 2/24/20 2:18 AM, Igor Mammedov wrote: > On Fri, 21 Feb 2020 11:51:15 -0600 > Babu Moger wrote: > >> On 2/21/20 11:05 AM, Igor Mammedov wrote: >>> On Thu, 13 Feb 2020 12:16:51 -0600 >>> Babu Moger wrote: >>> >>>> Initialize all the p

Re: [PATCH v4 06/16] hw/i386: Update structures for nodes_per_pkg

2020-02-24 Thread Babu Moger
On 2/24/20 2:34 AM, Igor Mammedov wrote: > On Thu, 13 Feb 2020 12:17:04 -0600 > Babu Moger wrote: > >> Update structures X86CPUTopoIDs and CPUX86State to hold the nodes_per_pkg. >> This is required to build EPYC mode topology. >> >> Signed-off-by: Ba

Re: [PATCH v4 09/16] target/i386: Cleanup and use the EPYC mode topology functions

2020-02-24 Thread Babu Moger
On 2/24/20 2:52 AM, Igor Mammedov wrote: > On Thu, 13 Feb 2020 12:17:25 -0600 > Babu Moger wrote: > >> Use the new functions from topology.h and delete the unused code. Given the >> sockets, nodes, cores and threads, the new functions generate apic id for >> EP

Re: [PATCH v4 10/16] hw/i386: Introduce apicid functions inside X86MachineState

2020-02-24 Thread Babu Moger
On 2/24/20 11:01 AM, Igor Mammedov wrote: > On Thu, 13 Feb 2020 12:17:32 -0600 > Babu Moger wrote: > >> Introduce model specific apicid functions inside X86MachineState. >> These functions will be loaded from X86CPUDefinition. >> >> Signed-off-by: Babu Moger

Re: [PATCH v4 08/16] hw/386: Add EPYC mode topology decoding functions

2020-02-24 Thread Babu Moger
On 2/24/20 2:50 AM, Igor Mammedov wrote: > On Thu, 13 Feb 2020 12:17:18 -0600 > Babu Moger wrote: > >> These functions add support for building EPYC mode topology given the smp >> details like numa nodes, cores, threads and sockets. >> >> The new apic id deco

Re: [PATCH v4 12/16] hw/i386: Use the apicid handlers from X86MachineState

2020-02-24 Thread Babu Moger
On 2/24/20 11:19 AM, Igor Mammedov wrote: > On Thu, 13 Feb 2020 12:17:46 -0600 > Babu Moger wrote: > >> Check and Load the apicid handlers from X86CPUDefinition if available. >> Update the calling convention for the apicid handlers. > > Previous and this patch l

Re: [PATCH v4 12/16] hw/i386: Use the apicid handlers from X86MachineState

2020-02-24 Thread Babu Moger
On 2/24/20 4:31 PM, Eduardo Habkost wrote: > On Mon, Feb 24, 2020 at 11:58:09AM -0600, Babu Moger wrote: >> >> >> On 2/24/20 11:19 AM, Igor Mammedov wrote: >>> On Thu, 13 Feb 2020 12:17:46 -0600 >>> Babu Moger wrote: >>> >>>>

Re: [PATCH v4 09/16] target/i386: Cleanup and use the EPYC mode topology functions

2020-02-25 Thread Babu Moger
On 2/25/20 1:49 AM, Igor Mammedov wrote: > On Mon, 24 Feb 2020 11:29:37 -0600 > Babu Moger wrote: > >> On 2/24/20 2:52 AM, Igor Mammedov wrote: >>> On Thu, 13 Feb 2020 12:17:25 -0600 >>> Babu Moger wrote: >>> >>>> Use the new functions

Re: [PATCH v4 12/16] hw/i386: Use the apicid handlers from X86MachineState

2020-02-25 Thread Babu Moger
On 2/25/20 9:32 AM, Eduardo Habkost wrote: > On Mon, Feb 24, 2020 at 05:13:18PM -0600, Babu Moger wrote: >> >> >> On 2/24/20 4:31 PM, Eduardo Habkost wrote: >>> On Mon, Feb 24, 2020 at 11:58:09AM -0600, Babu Moger wrote: >>>> >>>> >>&

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

2020-01-08 Thread Babu Moger
884e608e11a82d994e183d%7C0%7C0%7C637140204317280432&sdata=52%2BseLs2VpNsBMblsC4BI7S0Kz5D%2FoOoqUMNd48NHK0%3D&reserved=0 >> >> --- >> v2: Used the versioned CPU models instead of machine-type-based CPU >> compatibility (commented by Eduardo). >> >

[Bug 1856335] Re: Cache Layout wrong on many Zen Arch CPUs

2019-12-23 Thread Babu Moger
Damir, We normally test Linux guests here. Can you please give me exact qemu command line. Even the SMP parameters(sockets,cores,threads,dies) will also work. I will try to recreate it locally first. Give me example what works and what does not work. I have recently sent few more patches to fi

Re: [PATCH] target/i386: Fix cpuid level for AMD

2021-06-29 Thread Babu Moger
On 6/29/21 9:06 AM, Dr. David Alan Gilbert wrote: > * zhenwei pi (pizhen...@bytedance.com) wrote: >> A AMD server typically has cpuid level 0x10(test on Rome/Milan), it >> should not be changed to 0x1f in multi-dies case. >> >> Fixes: a94e1428991 (target/i386: Add CPUID.1F generation support >>

Re: [RFC PATCH 0/7] Support protection keys in an AMD EPYC-Milan VM

2021-07-01 Thread Babu Moger
David, Are you still working on v2 of these series? I was going to test and review. Thanks > -Original Message- > From: David Edmondson > Sent: Tuesday, June 8, 2021 3:25 AM > To: qemu-devel@nongnu.org > Cc: k...@vger.kernel.org; Eduardo Habkost ; Paolo > Bonzini ; Marcelo Tosatti ; > Ric

Re: [PATCH v6 10/10] i386: Simplify CPUID_8000_001E for AMD

2020-09-18 Thread Babu Moger
On 9/18/20 4:38 PM, Eduardo Habkost wrote: > On Mon, Aug 31, 2020 at 01:43:07PM -0500, Babu Moger wrote: >> apic_id contains all the information required to build >> CPUID_8000_001E. core_id and node_id is already part of >> apic_id generated by x86_topo_ids_from_apicid.

[PATCH v2] target/i386: Remove core_id assert check in CPUID 0x8000001E

2020-09-21 Thread Babu Moger
tps://bugzilla.redhat.com/show_bug.cgi?id=1834200 Signed-off-by: Babu Moger --- v2: Resubmitting an old patch which was lost in the mix. Just rebased on the latest tree. v1: https://lore.kernel.org/qemu-devel/159257395689.52908.4409314503988289481.st...@naples-babu.amd.com/ target/i386/cpu.c |

RE: [PATCH v6 15/20] x86: move cpu hotplug from pc to x86

2020-08-31 Thread Babu Moger
> -Original Message- > From: Igor Mammedov > Sent: Monday, August 31, 2020 2:51 AM > To: Gerd Hoffmann > Cc: qemu-devel@nongnu.org; Laurent Vivier ; Peter > Maydell ; Thomas Huth ; > Eduardo Habkost ; Sergio Lopez > ; Michael S. Tsirkin ; Shannon Zhao > ; qemu-...@nongnu.org; Paolo Bon

[PATCH v6 00/10] Remove EPYC mode apicid decode and use generic decode

2020-08-31 Thread Babu Moger
qemu-devel/159164739269.20543.3074052993891532749.st...@naples-babu.amd.com Babu Moger (10): Revert "i386: Fix pkg_id offset for EPYC cpu models" Revert "target/i386: Enable new apic id encoding for EPYC based cpus models" Revert "hw/i386: Move arch_id decode

[PATCH v6 01/10] Revert "i386: Fix pkg_id offset for EPYC cpu models"

2020-08-31 Thread Babu Moger
This reverts commit 7b225762c8c05fd31d4c2be116aedfbc00383f8b. Remove the EPYC specific apicid decoding and use the generic default decoding. Also fix all the references of pkg_offset. Signed-off-by: Babu Moger --- hw/i386/pc.c |1 - target/i386/cpu.c |9 - target/i386

[PATCH v6 07/10] Revert "hw/386: Add EPYC mode topology decoding functions"

2020-08-31 Thread Babu Moger
This reverts commit 7568b20a6405042f62c64af3268f4330aed5. Remove the EPYC specific apicid decoding and use the generic default decoding. Signed-off-by: Babu Moger --- include/hw/i386/topology.h | 100 1 file changed, 100 deletions(-) diff

[PATCH v6 00/10] Remove EPYC mode apicid decode and use generic decode

2020-08-31 Thread Babu Moger
qemu-devel/159164739269.20543.3074052993891532749.st...@naples-babu.amd.com Babu Moger (10): Revert "i386: Fix pkg_id offset for EPYC cpu models" Revert "target/i386: Enable new apic id encoding for EPYC based cpus models" Revert "hw/i386: Move arch_id decode

[PATCH v6 04/10] Revert "i386: Introduce use_epyc_apic_id_encoding in X86CPUDefinition"

2020-08-31 Thread Babu Moger
This reverts commit 0c1538cb1a26287c072645f4759b9872b1596d79. Remove the EPYC specific apicid decoding and use the generic default decoding. Signed-off-by: Babu Moger --- target/i386/cpu.c | 16 target/i386/cpu.h |1 - 2 files changed, 17 deletions(-) diff --git a

[PATCH v6 08/10] Revert "hw/i386: Update structures to save the number of nodes per package"

2020-08-31 Thread Babu Moger
This reverts commit c24a41bb53c0854d22c96b30d57cfcaa543c409d. Remove the EPYC specific apicid decoding and use the generic default decoding. Signed-off-by: Babu Moger --- hw/i386/pc.c |1 - hw/i386/x86.c |1 - include/hw/i386/topology.h |1 - target/i386

[PATCH v6 02/10] Revert "target/i386: Enable new apic id encoding for EPYC based cpus models"

2020-08-31 Thread Babu Moger
This reverts commit 247b18c593ec298446645af8d5d28911daf653b1. Remove the EPYC specific apicid decoding and use the generic default decoding. Signed-off-by: Babu Moger --- target/i386/cpu.c |2 -- 1 file changed, 2 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index

[PATCH v6 06/10] Revert "target/i386: Cleanup and use the EPYC mode topology functions"

2020-08-31 Thread Babu Moger
This reverts commit dd08ef0318e2b61d14bc069590d174913f7f437a. Remove the EPYC specific apicid decoding and use the generic default decoding. Signed-off-by: Babu Moger --- target/i386/cpu.c | 161 ++--- 1 file changed, 127 insertions(+), 34

[PATCH v6 05/10] Revert "hw/i386: Introduce apicid functions inside X86MachineState"

2020-08-31 Thread Babu Moger
This reverts commit 6121c7fbfd98dbc3af1b00b56ff2eef66df87828. Remove the EPYC specific apicid decoding and use the generic default decoding. Signed-off-by: Babu Moger --- hw/i386/x86.c |5 - include/hw/i386/x86.h |9 - 2 files changed, 14 deletions(-) diff --git a

[PATCH v6 03/10] Revert "hw/i386: Move arch_id decode inside x86_cpus_init"

2020-08-31 Thread Babu Moger
This reverts commit 2e26f4ab3bf8390a2677d3afd9b1a04f015d7721. Remove the EPYC specific apicid decoding and use the generic default decoding. Signed-off-by: Babu Moger --- hw/i386/pc.c |6 +++--- hw/i386/x86.c | 37 +++-- 2 files changed, 10 insertions

[PATCH v6 10/10] i386: Simplify CPUID_8000_001E for AMD

2020-08-31 Thread Babu Moger
. Refer the Processor Programming Reference (PPR) documentation available from the bugzilla Link below. Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537 Signed-off-by: Babu Moger --- target/i386/cpu.c | 195 - 1 file changed, 45 insertions

[PATCH v6 09/10] i386: Simplify CPUID_8000_001E for AMD

2020-08-31 Thread Babu Moger
Remove all the hardcoded values and replace with generalized fields. Signed-off-by: Babu Moger --- target/i386/cpu.c | 31 +-- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index ba4667b33c..d434c8545a 100644

Re: [PATCH v6 09/10] i386: Simplify CPUID_8000_001E for AMD

2020-09-01 Thread Babu Moger
On 9/1/20 6:52 AM, Igor Mammedov wrote: > On Mon, 31 Aug 2020 13:43:01 -0500 > Babu Moger wrote: > >> Remove all the hardcoded values and replace with generalized >> fields. >> >> Signed-off-by: Babu Moger >> --- >> target/i386/cpu.c | 31 +

[PATCH v7 0/2] Remove EPYC mode apicid decode and use generic decode

2020-09-01 Thread Babu Moger
49.st...@naples-babu.amd.com Babu Moger (2): i386: Simplify CPUID_8000_001d for AMD i386: Simplify CPUID_8000_001E for AMD target/i386/cpu.c | 226 ++--- 1 file changed, 61 insertions(+), 165 deletions(-) --

[PATCH v7 1/2] i386: Simplify CPUID_8000_001d for AMD

2020-09-01 Thread Babu Moger
Remove all the hardcoded values and replace with generalized fields. Signed-off-by: Babu Moger --- target/i386/cpu.c | 31 --- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index ba4667b33c..b12addf323 100644

[PATCH v7 2/2] i386: Simplify CPUID_8000_001E for AMD

2020-09-01 Thread Babu Moger
. Refer the Processor Programming Reference (PPR) documentation available from the bugzilla Link below. Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537 Signed-off-by: Babu Moger Reviewed-by: Igor Mammedov --- target/i386/cpu.c | 195 - 1

[PATCH v5 1/8] hw/i386: Remove node_id, nr_nodes and nodes_per_pkg from topology

2020-08-21 Thread Babu Moger
://bugzilla.redhat.com/show_bug.cgi?id=1828750 Signed-off-by: Babu Moger --- hw/i386/pc.c |1 - hw/i386/x86.c |1 - include/hw/i386/topology.h | 40 +--- target/i386/cpu.c | 24 ++-- target/i386/cpu.h

[PATCH v5 4/8] Revert "hw/i386: Move arch_id decode inside x86_cpus_init"

2020-08-21 Thread Babu Moger
Remove the EPYC specific apicid decoding and use the generic default decoding. This reverts commit 2e26f4ab3bf8390a2677d3afd9b1a04f015d7721. Signed-off-by: Babu Moger --- hw/i386/pc.c |6 +++--- hw/i386/x86.c | 37 +++-- 2 files changed, 10 insertions

[PATCH v5 6/8] Revert "hw/i386: Introduce apicid functions inside X86MachineState"

2020-08-21 Thread Babu Moger
Remove the EPYC specific apicid decoding and use the generic default decoding. This reverts commit 6121c7fbfd98dbc3af1b00b56ff2eef66df87828. Signed-off-by: Babu Moger --- hw/i386/x86.c |5 - include/hw/i386/x86.h |9 - 2 files changed, 14 deletions(-) diff --git a

[PATCH v5 5/8] Revert "i386: Introduce use_epyc_apic_id_encoding in X86CPUDefinition"

2020-08-21 Thread Babu Moger
Remove the EPYC specific apicid decoding and use the generic default decoding. This reverts commit 0c1538cb1a26287c072645f4759b9872b1596d79. Signed-off-by: Babu Moger --- target/i386/cpu.c | 16 target/i386/cpu.h |1 - 2 files changed, 17 deletions(-) diff --git a

[PATCH v5 2/8] Revert "i386: Fix pkg_id offset for EPYC cpu models"

2020-08-21 Thread Babu Moger
Remove the EPYC specific apicid decoding and use the generic default decoding. This reverts commit 7b225762c8c05fd31d4c2be116aedfbc00383f8b. Signed-off-by: Babu Moger --- hw/i386/pc.c |1 - target/i386/cpu.c |6 +++--- target/i386/cpu.h |1 - 3 files changed, 3 insertions

[PATCH v5 7/8] Revert "hw/386: Add EPYC mode topology decoding functions"

2020-08-21 Thread Babu Moger
Remove the EPYC specific apicid decoding and use the generic default decoding. This reverts commit 7568b20a6405042f62c64af3268f4330aed5. Signed-off-by: Babu Moger --- include/hw/i386/topology.h | 79 target/i386/cpu.c |2 + 2

[PATCH v5 3/8] Revert "target/i386: Enable new apic id encoding for EPYC based cpus models"

2020-08-21 Thread Babu Moger
Remove the EPYC specific apicid decoding and use the generic default decoding. This reverts commit 247b18c593ec298446645af8d5d28911daf653b1. Signed-off-by: Babu Moger --- target/i386/cpu.c |2 -- 1 file changed, 2 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index

[PATCH v5 8/8] i386: Simplify CPUID_8000_001E for AMD

2020-08-21 Thread Babu Moger
. Refer the Processor Programming Reference (PPR) documentation available from the bugzilla Link below. Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537 Signed-off-by: Babu Moger --- target/i386/cpu.c | 81 - 1 file changed, 37

[PATCH v5 0/8] Remove EPYC mode apicid decode and use generic decode

2020-08-21 Thread Babu Moger
t; from v1. Will send it later. v1: https://lore.kernel.org/qemu-devel/159164739269.20543.3074052993891532749.st...@naples-babu.amd.com Babu Moger (8): hw/i386: Remove node_id, nr_nodes and nodes_per_pkg from topology Revert "i386: Fix pkg_id offset for EPYC cpu models"

Re: [PATCH v5 0/8] Remove EPYC mode apicid decode and use generic decode

2020-08-24 Thread Babu Moger
Hi Dave, On 8/24/20 1:41 PM, Dr. David Alan Gilbert wrote: > * Babu Moger (babu.mo...@amd.com) wrote: >> To support some of the complex topology, we introduced EPYC mode apicid >> decode. >> But, EPYC mode decode is running into problems. Also it can become quite a >>

Re: [PATCH v5 1/8] hw/i386: Remove node_id, nr_nodes and nodes_per_pkg from topology

2020-08-26 Thread Babu Moger
On 8/26/20 4:57 AM, Igor Mammedov wrote: > On Fri, 21 Aug 2020 17:12:25 -0500 > Babu Moger wrote: > >> Remove node_id, nr_nodes and nodes_per_pkg from topology. Use >> die_id, nr_dies and dies_per_pkg which is already available. >> Removes the confusion over two va

RE: [PATCH v5 0/8] Remove EPYC mode apicid decode and use generic decode

2020-08-26 Thread Babu Moger
bject: Re: [PATCH v5 0/8] Remove EPYC mode apicid decode and use generic > decode > > On Wed, 26 Aug 2020 13:50:59 +0100 > Daniel P. Berrangé wrote: > > > On Wed, Aug 26, 2020 at 02:38:49PM +0200, Igor Mammedov wrote: > > > On Fri, 21 Aug 2020 17:12:19 -0500 > &g

RE: [PATCH v5 0/8] Remove EPYC mode apicid decode and use generic decode

2020-08-26 Thread Babu Moger
at.com; r...@twiddle.net > Subject: Re: [PATCH v5 0/8] Remove EPYC mode apicid decode and use generic > decode > > * Babu Moger (babu.mo...@amd.com) wrote: > > > > > -Original Message- > > > From: Igor Mammedov > > > Sent: Wednesday, August 26, 2020

RE: [PATCH v5 0/8] Remove EPYC mode apicid decode and use generic decode

2020-08-27 Thread Babu Moger
David Alan Gilbert" wrote: > > > > > > > * Igor Mammedov (imamm...@redhat.com) wrote: > > > > > On Tue, 25 Aug 2020 09:15:04 +0100 "Dr. David Alan Gilbert" > > > > > wrote: > > > > > > > > > > > *

RE: [PATCH v5 0/8] Remove EPYC mode apicid decode and use generic decode

2020-08-28 Thread Babu Moger
at.com; r...@twiddle.net > Subject: Re: [PATCH v5 0/8] Remove EPYC mode apicid decode and use > generic decode > > On Fri, 28 Aug 2020 09:58:03 +0100 > Daniel P. Berrangé wrote: > > > On Thu, Aug 27, 2020 at 10:21:10PM +0200, Igor Mammedov wrote: > > > O

RE: [PATCH v5 0/8] Remove EPYC mode apicid decode and use generic decode

2020-08-28 Thread Babu Moger
v5 0/8] Remove EPYC mode apicid decode and use > generic decode > > On Thu, 27 Aug 2020 17:58:01 -0500 > Babu Moger wrote: > > > > -Original Message- > > > From: Igor Mammedov > > > Sent: Thursday, August 27, 2020 4:19 PM > > > To: Dr. Dav

Re: [PATCH v5 0/8] Remove EPYC mode apicid decode and use generic decode

2020-08-28 Thread Babu Moger
Responding to Eduardo's question. Some emails are not comming to my mailbox for some reason. Responding git send-email --in-reply-to. >> > > > I understood that each die in EPYC chip is a numa node, which encodes >> > > > NUMA node ID (system wide) in CPUID_Fn801E_ECX, that's why I >> > > > w

Re: [PATCH v5 7/8] Revert "hw/386: Add EPYC mode topology decoding functions"

2020-08-28 Thread Babu Moger
On 8/28/20 12:27 PM, Eduardo Habkost wrote: > On Fri, Aug 21, 2020 at 05:13:03PM -0500, Babu Moger wrote: >> Remove the EPYC specific apicid decoding and use the generic >> default decoding. >> >> This reverts commit 7568b20a6405042f62c64af3268f4330aed5. >

RE: [PATCH 1/2] hw/386: Fix uninitialized memory with -device and CPU hotplug

2020-06-16 Thread Babu Moger
ATCH 1/2] hw/386: Fix uninitialized memory with -device and CPU > hotplug > > On Mon, 08 Jun 2020 15:18:50 -0500 > Babu Moger wrote: > > > Noticed the following command failure while testing CPU hotplug. > > > > $ qemu-system-x86_64 -machine q35,accel=kvm -smp 1,maxcpus=2

<    1   2   3   4