All of lore.kernel.org
 help / color / mirror / Atom feed
From: Babu Moger <babu.moger@amd.com>
To: Igor Mammedov <imammedo@redhat.com>
Cc: ehabkost@redhat.com, mst@redhat.com, qemu-devel@nongnu.org,
	pbonzini@redhat.com, rth@twiddle.net
Subject: Re: [PATCH v7 07/13] hw/386: Add EPYC mode topology decoding functions
Date: Thu, 12 Mar 2020 08:44:00 -0500	[thread overview]
Message-ID: <aa29454a-e7c0-7b6b-c984-f5fbdc3a2378@amd.com> (raw)
In-Reply-To: <20200312133916.512773bc@redhat.com>



On 3/12/20 7:39 AM, Igor Mammedov wrote:
> On Wed, 11 Mar 2020 17:53:34 -0500
> Babu Moger <babu.moger@amd.com> 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 decoding is mostly similar to current apic id decoding
>> except that it adds a new field node_id when numa configured. Removes all
>> the hardcoded values. Subsequent patches will use these functions to build
>> the topology.
>>
>> Following functions are added.
> [...]
>> x86_topo_ids_from_idx_epyc
> you forgot to remove unused anymore function.
> No need to respin whole series for it though, you can post as reply to
> this patch v8 or do it as a patch on top.

Igor, The function x86_topo_ids_from_idx_epyc(or x86_topo_ids_from_idx) is
still there. We are using it internally now. It is used by
x86_apicid_from_cpu_idx_epyc(or x86_apicid_from_cpu_idx). We removed it as
callback function. So, we are good here. Thanks

> 
> 
> 
> 
> [...]
>>
>> The topology details are available in Processor Programming Reference (PPR)
>> for AMD Family 17h Model 01h, Revision B1 Processors. The revision guides are
>> available from the bugzilla Link below.
>> Link: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.kernel.org%2Fshow_bug.cgi%3Fid%3D206537&amp;data=02%7C01%7Cbabu.moger%40amd.com%7C3d1032fb1cc94a5a197308d7c68268c5%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637196135715465573&amp;sdata=13zSN7AqPGKHFG%2FePmkWTVbwM0qzktrnolEidnNzyhs%3D&amp;reserved=0
>>
>> Signed-off-by: Babu Moger <babu.moger@amd.com>
>> Acked-by: Igor Mammedov <imammedo@redhat.com>
>> Acked-by: Michael S. Tsirkin <mst@redhat.com>
> [...]
>> +static inline void x86_topo_ids_from_idx_epyc(X86CPUTopoInfo *topo_info,
>> +                                              unsigned cpu_index,
>> +                                              X86CPUTopoIDs *topo_ids)
>> +{
>> +    unsigned nr_nodes = MAX(topo_info->nodes_per_pkg, 1);
>> +    unsigned nr_dies = topo_info->dies_per_pkg;
>> +    unsigned nr_cores = topo_info->cores_per_die;
>> +    unsigned nr_threads = topo_info->threads_per_core;
>> +    unsigned cores_per_node = DIV_ROUND_UP((nr_dies * nr_cores * nr_threads),
>> +                                            nr_nodes);
>> +
>> +    topo_ids->pkg_id = cpu_index / (nr_dies * nr_cores * nr_threads);
>> +    topo_ids->node_id = (cpu_index / cores_per_node) % nr_nodes;
>> +    topo_ids->die_id = cpu_index / (nr_cores * nr_threads) % nr_dies;
>> +    topo_ids->core_id = cpu_index / nr_threads % nr_cores;
>> +    topo_ids->smt_id = cpu_index % nr_threads;
>> +}
>> +
>> +/*
> [...]
> 


  reply	other threads:[~2020-03-12 13:44 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-11 22:52 [PATCH v7 00/13] APIC ID fixes for AMD EPYC CPU model Babu Moger
2020-03-11 22:52 ` [PATCH v7 01/13] hw/i386: Introduce X86CPUTopoInfo to contain topology info Babu Moger
2020-03-12 11:11   ` Igor Mammedov
2020-03-11 22:52 ` [PATCH v7 02/13] hw/i386: Consolidate topology functions Babu Moger
2020-03-11 22:53 ` [PATCH v7 03/13] machine: Add SMP Sockets in CpuTopology Babu Moger
2020-03-11 22:53 ` [PATCH v7 04/13] hw/i386: Remove unnecessary initialization in x86_cpu_new Babu Moger
2020-03-11 22:53 ` [PATCH v7 05/13] hw/i386: Update structures to save the number of nodes per package Babu Moger
2020-03-11 22:53 ` [PATCH v7 06/13] hw/i386: Rename apicid_from_topo_ids to x86_apicid_from_topo_ids Babu Moger
2020-03-11 22:53 ` [PATCH v7 07/13] hw/386: Add EPYC mode topology decoding functions Babu Moger
2020-03-12 12:39   ` Igor Mammedov
2020-03-12 13:44     ` Babu Moger [this message]
2020-06-02 17:18   ` Eduardo Habkost
2020-06-02 17:27     ` Babu Moger
2020-06-02 21:59     ` Babu Moger
2020-06-02 23:01       ` Eduardo Habkost
2020-06-03  0:07         ` Babu Moger
2020-06-03 15:22         ` Babu Moger
2020-06-03 15:31           ` Eduardo Habkost
2020-06-03 15:38             ` Babu Moger
2020-06-03 15:45               ` Eduardo Habkost
2020-06-03 15:49                 ` Babu Moger
2020-06-03 21:49                 ` Babu Moger
2020-06-15 11:44                   ` Dr. David Alan Gilbert
2020-03-11 22:53 ` [PATCH v7 08/13] target/i386: Cleanup and use the EPYC mode topology functions Babu Moger
2020-03-11 22:53 ` [PATCH v7 09/13] hw/i386: Introduce apicid functions inside X86MachineState Babu Moger
2020-03-11 22:53 ` [PATCH v7 10/13] i386: Introduce use_epyc_apic_id_encoding in X86CPUDefinition Babu Moger
2020-03-12 12:26   ` Igor Mammedov
2020-03-11 22:54 ` [PATCH v7 11/13] hw/i386: Move arch_id decode inside x86_cpus_init Babu Moger
2020-03-12 12:31   ` Igor Mammedov
2020-03-11 22:54 ` [PATCH v7 12/13] target/i386: Enable new apic id encoding for EPYC based cpus models Babu Moger
2020-03-11 22:54 ` [PATCH v7 13/13] i386: Fix pkg_id offset for EPYC cpu models Babu Moger
2020-03-12 16:28 ` [PATCH v7 00/13] APIC ID fixes for AMD EPYC CPU model Babu Moger
2020-03-17 23:22   ` Eduardo Habkost
2020-03-17 23:31     ` Moger, Babu
2020-03-17 23:46     ` Eduardo Habkost
2020-03-18  2:43       ` Moger, Babu
2020-03-18 10:47         ` Igor Mammedov
2020-03-23 15:35           ` Moger, Babu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aa29454a-e7c0-7b6b-c984-f5fbdc3a2378@amd.com \
    --to=babu.moger@amd.com \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.