From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AF208C83F17 for ; Mon, 14 Jul 2025 17:27:43 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ubMwv-0003TU-Om; Mon, 14 Jul 2025 13:26:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ubLka-0003sK-Mn for qemu-devel@nongnu.org; Mon, 14 Jul 2025 12:09:58 -0400 Received: from [185.176.79.56] (helo=frasgout.his.huawei.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ubLkX-0000vl-6F for qemu-devel@nongnu.org; Mon, 14 Jul 2025 12:09:55 -0400 Received: from mail.maildlp.com (unknown [172.18.186.31]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4bgnHf6dNxz6L5N4; Tue, 15 Jul 2025 00:06:22 +0800 (CST) Received: from frapeml500008.china.huawei.com (unknown [7.182.85.71]) by mail.maildlp.com (Postfix) with ESMTPS id 3F32D140142; Tue, 15 Jul 2025 00:09:50 +0800 (CST) Received: from localhost (10.195.247.138) by frapeml500008.china.huawei.com (7.182.85.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Mon, 14 Jul 2025 18:09:48 +0200 Date: Mon, 14 Jul 2025 17:09:45 +0100 To: "Michael S. Tsirkin" CC: Alireza Sanaee , , , , , , , , , , , , Subject: Re: [PATCH v6 3/4] hw/acpi/aml-build: Build a root node in the PPTT table Message-ID: <20250714170945.0000714f@huawei.com> In-Reply-To: <20250714115603-mutt-send-email-mst@kernel.org> References: <20250604115233.1234-1-alireza.sanaee@huawei.com> <20250604115233.1234-4-alireza.sanaee@huawei.com> <20250714090807-mutt-send-email-mst@kernel.org> <20250714151041.0000599d.alireza.sanaee@huawei.com> <20250714115603-mutt-send-email-mst@kernel.org> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.42; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.195.247.138] X-ClientProxiedBy: lhrpeml100010.china.huawei.com (7.191.174.197) To frapeml500008.china.huawei.com (7.182.85.71) X-Host-Lookup-Failed: Reverse DNS lookup failed for 185.176.79.56 (deferred) Received-SPF: pass client-ip=185.176.79.56; envelope-from=jonathan.cameron@huawei.com; helo=frasgout.his.huawei.com X-Spam_score_int: -33 X-Spam_score: -3.4 X-Spam_bar: --- X-Spam_report: (-3.4 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Jonathan Cameron From: Jonathan Cameron via Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org On Mon, 14 Jul 2025 11:57:19 -0400 "Michael S. Tsirkin" wrote: > 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" wrote: > > > > > On Wed, Jun 04, 2025 at 12:52:32PM +0100, Alireza Sanaee wrote: > > > > From: Yicong Yang > > > > > > > > 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 > > > > Reviewed-by: Jonathan Cameron > > > > Signed-off-by: Alireza Sanaee > > > > --- > > > > 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? Hi Michael, Which master do you mean? As far as I can tell the above commit isn't anywhere other than your gitlab and, in for failures that were triggering there earlier today, it was later in the tree than this series (so the problem didn't manifest in this series at all) That had Ali and I confused for a while as we couldn't replicate. Anyhow, someone had to do a rebase either way so not a problem. Jonathan > Sounds good, pls do. > > > > > > > > -- > > > > 2.43.0 > > > > > > > >