All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Alireza Sanaee <alireza.sanaee@huawei.com>
Cc: anisinha@redhat.com, imammedo@redhat.com,
	jonathan.cameron@huawei.com, linuxarm@huawei.com,
	peter.maydell@linaro.org, prime.zeng@hisilicon.com,
	qemu-devel@nongnu.org, shameerali.kolothum.thodi@huawei.com,
	wangyanan55@huawei.com, yangyicong@hisilicon.com,
	maobibo@loongson.cn, gaosong@loongson.cn,
	jiaxun.yang@flygoat.com
Subject: Re: [PATCH v6 3/4] hw/acpi/aml-build: Build a root node in the PPTT table
Date: Mon, 14 Jul 2025 11:57:19 -0400	[thread overview]
Message-ID: <20250714115603-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20250714151041.0000599d.alireza.sanaee@huawei.com>

On Mon, Jul 14, 2025 at 03:10:41PM +0100, Alireza Sanaee wrote:
> On Mon, 14 Jul 2025 09:09:10 -0400
> "Michael S. Tsirkin" <mst@redhat.com> wrote:
> 
> > On Wed, Jun 04, 2025 at 12:52:32PM +0100, Alireza Sanaee wrote:
> > > From: Yicong Yang <yangyicong@hisilicon.com>
> > > 
> > > Currently we build the PPTT starting from the socket node and each
> > > socket will be a separate tree. For a multi-socket system it'll
> > > be hard for the OS to know the whole system is homogeneous or not
> > > (actually we're in the current implementation) since no parent node
> > > to telling the identical implementation informentation. Add a
> > > root node for indicating this.
> > > 
> > > Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
> > > Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > > Signed-off-by: Alireza Sanaee <alireza.sanaee@huawei.com>
> > > ---
> > >  hw/acpi/aml-build.c | 15 ++++++++++++++-
> > >  1 file changed, 14 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
> > > index 560cee12a2..76a4157a18 100644
> > > --- a/hw/acpi/aml-build.c
> > > +++ b/hw/acpi/aml-build.c
> > > @@ -2153,12 +2153,25 @@ void build_pptt(GArray *table_data,
> > > BIOSLinker *linker, MachineState *ms, int64_t socket_id = -1,
> > > cluster_id = -1, core_id = -1; uint32_t socket_offset = 0,
> > > cluster_offset = 0, core_offset = 0; uint32_t pptt_start =
> > > table_data->len;
> > > +    uint32_t root_offset;
> > >      int n;
> > >      AcpiTable table = { .sig = "PPTT", .rev = 2,
> > >                          .oem_id = oem_id, .oem_table_id =
> > > oem_table_id }; 
> > >      acpi_table_begin(&table, table_data);
> > >  
> > > +    /*
> > > +     * Build a root node for all the processor nodes. Otherwise
> > > when
> > > +     * building a multi-socket system each socket tree is separated
> > > +     * and will be hard for the OS like Linux to know whether the
> > > +     * system is homogeneous.
> > > +     */
> > > +    root_offset = table_data->len - pptt_start;
> > > +    build_processor_hierarchy_node(table_data,
> > > +        (1 << 0) | /* Physical package */
> > > +        (1 << 4), /* Identical Implementation */
> > > +        0, 0, NULL, 0);
> > > +
> > >      /*
> > >       * This works with the assumption that cpus[n].props.*_id has
> > > been
> > >       * sorted from top to down levels in
> > > mc->possible_cpu_arch_ids(). @@ -2175,7 +2188,7 @@ void
> > > build_pptt(GArray *table_data, BIOSLinker *linker, MachineState
> > > *ms, build_processor_hierarchy_node(table_data, (1 << 0) | /*
> > > Physical package */ (1 << 4), /* Identical Implementation */
> > > -                0, socket_id, NULL, 0);
> > > +                root_offset, socket_id, NULL, 0);
> > >          }
> > >  
> > >          if (mc->smp_props.clusters_supported &&
> > > mc->smp_props.has_clusters) {  
> > 
> > 
> > This function is also used by loongarch64, but you do not update the
> > loongarch64 expected files:
> > https://gitlab.com/mstredhat/qemu/-/jobs/10672661860
> 
> Hi Michael,
> 
> There are new tests you have brought in the
> tree after mine. 
> https://gitlab.com/mstredhat/qemu/-/commit/9e4f80654cefd051f8f5c220d5447201b6cf1810
> 
> I can try to fix this and resend with updated PPTT files for
> loongarch64. WDYT?

That commit is in master though, right?
Sounds good, pls do.

> > 
> > > -- 
> > > 2.43.0  
> > 
> > 



  reply	other threads:[~2025-07-14 17:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-04 11:52 [PATCH v6 0/4] Building PPTT with root node and identical implementation flag Alireza Sanaee via
2025-06-04 11:52 ` [PATCH v6 1/4] tests: virt: Allow changes to PPTT test table Alireza Sanaee via
2025-06-04 11:52 ` [PATCH v6 2/4] hw/acpi/aml-build: Set identical implementation flag for PPTT processor nodes Alireza Sanaee via
2025-06-04 11:52 ` [PATCH v6 3/4] hw/acpi/aml-build: Build a root node in the PPTT table Alireza Sanaee via
2025-07-14 13:09   ` Michael S. Tsirkin
2025-07-14 14:10     ` Alireza Sanaee via
2025-07-14 15:57       ` Michael S. Tsirkin [this message]
2025-07-14 16:06         ` Alireza Sanaee via
2025-07-14 16:22           ` Michael S. Tsirkin
2025-07-14 16:09         ` Jonathan Cameron via
2025-07-14 16:23           ` Michael S. Tsirkin
2025-06-04 11:52 ` [PATCH v6 4/4] tests: virt: Update expected ACPI tables for virt test Alireza Sanaee via
2025-07-07  7:39 ` [PATCH v6 0/4] Building PPTT with root node and identical implementation flag Alireza Sanaee via

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=20250714115603-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=alireza.sanaee@huawei.com \
    --cc=anisinha@redhat.com \
    --cc=gaosong@loongson.cn \
    --cc=imammedo@redhat.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=linuxarm@huawei.com \
    --cc=maobibo@loongson.cn \
    --cc=peter.maydell@linaro.org \
    --cc=prime.zeng@hisilicon.com \
    --cc=qemu-devel@nongnu.org \
    --cc=shameerali.kolothum.thodi@huawei.com \
    --cc=wangyanan55@huawei.com \
    --cc=yangyicong@hisilicon.com \
    /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.