From patchwork Thu Apr 25 11:01:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 792041 Delivered-To: patch@linaro.org Received: by 2002:a5d:4884:0:b0:346:15ad:a2a with SMTP id g4csp1321532wrq; Thu, 25 Apr 2024 04:07:16 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXdDxElALqJ90lFr7nNj0nwm5PjL1rGP74vwMg7IOGJyYYQtz3jXOBuD50NIbvEN8V36t7P00x8yB/MLpb05VaI X-Google-Smtp-Source: AGHT+IHOGdm+c6tyu2HI0VOSpNwKmhvoEH4SY9Vrg45o+cfWeeEcTDqkNOZccbxW0Q7kzeeuzPwv X-Received: by 2002:a05:620a:2495:b0:790:8e96:783f with SMTP id i21-20020a05620a249500b007908e96783fmr5110498qkn.38.1714043235897; Thu, 25 Apr 2024 04:07:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1714043235; cv=none; d=google.com; s=arc-20160816; b=XS7XTwefGX3g6dRvTwn4zBkyBtHFOu9dbOjKOJQBA95kulvTdm6BKc/ngFidFWX8zV umv9yD7x2YKR9Qeydm145QHrK5H8JJB69bAskyAFVI9BVndaHeGAAnh55N5PZwaSNu28 jldbqx2WHX1Mq52mJgbyQc+HD0IUW5Xyc87e80ZwzJ88Y6NR1M7PPhq2Jcbyi8GkwxfC OkrrWHJodo7oYKp9YZN/eEM1exmmR3FnP9UGWeRnea18l01MBYUVaHPnJqM6CDMBVnVj GdB9UAm5nkMcyBg52Iflbg8L/beEOSxJ2eLPjoGFMuR+9spxFPwWQYr/v+6uvy8Aa9R+ 3KBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=vykN0pIt49J3GEMpH2YakbfFLS9d+NOdnblTzedh0DY=; fh=G1w1Z/AdEW8uKPFwD/CK+dtKWGZqsbdf+axt/DkbHfo=; b=dPLmDuEIu/UJw7r3psFDmg6Yxfn2hNNaguMCNFvzdxSgaTwAKbgmiC4ZEKQjWbG5zX DiniCLyQaJ5kZWP4NmGNqPhecf0e+qcVMqSQDr+Bcd26JA2fX4JwXVfDC7vuU01UXXYV CmBUZH2Cy8xWjZfgw480L81wYKKpH7/vrt433DsHif0Ux2uZB9zARzX1h6Y3tAIIOsoc wWAXnhR1H02wLBEITnkQRUpCkhAqCHLug8ry4yvwAreeV2OW7iakdOn04zjQ4CslMPx7 PUG0a/UtzJhhJZwfNMzuljmseqzvqHqNz7zBvwNfB1QQ2v9h3QqU0Qi9toDOyyo3jN3h nXHg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ge/5W1Z5"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s28-20020a05620a081c00b0079086db14cdsi5381368qks.16.2024.04.25.04.07.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 25 Apr 2024 04:07:15 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ge/5W1Z5"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rzwvZ-0004Ty-VN; Thu, 25 Apr 2024 07:06:10 -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 1rzwtd-0000LG-P3 for qemu-devel@nongnu.org; Thu, 25 Apr 2024 07:04:11 -0400 Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rzwtZ-0000Mw-9g for qemu-devel@nongnu.org; Thu, 25 Apr 2024 07:04:08 -0400 Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2dd6c14d000so9581821fa.0 for ; Thu, 25 Apr 2024 04:04:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714043039; x=1714647839; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vykN0pIt49J3GEMpH2YakbfFLS9d+NOdnblTzedh0DY=; b=ge/5W1Z5UVX3PPgyKn4UHFd9nbESU5wtOTP5095Bm6afywSeBiHPR5htX1M130Qno2 XaV2Y+Sal3luYptmwrG+oNOxp/JMTvsZL9PjQhgsiqozUKtxQ3qymfYVfIsL1hnp+w7U 3WP+c3tsTB9UmQ7oAh1nI1HXpLX52wAkmUmoB4mMKULchs7HLoE/PJRl9ZhUBrgEJVcb kRxsZ/RV/ShdXmv4b+vXS42eZFWq8RBOhH54OrSuD+FCQsDlv8IoJ9ryvWzD1rvYp4Tt dRt6r0yr5VmCD+4kCgfU08vUV06QEsJcJ7vFG+xj0q+Yk/9nNNtLsa/pMHUbNssLhWd/ 7hyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714043039; x=1714647839; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vykN0pIt49J3GEMpH2YakbfFLS9d+NOdnblTzedh0DY=; b=wFh0wdH2E4MzO+j7VZA9fpWLC1G0QKfIUvbEmqolVrhHbMlVIXce1dE9JJc6MpLCfq MGjLILMiwyq+2BfnDm4ljUdyYfVHZ/g5pee8tkgGAvlHmwSqGtjj2QPwcTBPiCQM+hfB bBvGlhW+ngWiIA7RNwt818arg6uWukEyEhZBLLrGENIxD9OM/wXaozIkHCMSWR7dEOl8 +nUouZXVZaSjQEqKUoJO70NJeL0ImiMgIe59s7v94HjcvntRN6TTskAlIocpka8PN1an TnSCKIdYiKDj6os9jBV/K5Tv+6IbyDaJLn+WQLdXMJ2GZW69GILdNtfnyBCg7awep6dZ Vkxg== X-Gm-Message-State: AOJu0YwAZbTP9Hng+h6JhUnmIFfkLaLF09MNCI6ASxElsf7P6gw8HST2 Mn7v2BzxqZHDN38YYVcZbNnTh/biVdqesRusAfQqksAwj3DL+dS0CNgxb2cL/BL4J0xdb2XLx3z M X-Received: by 2002:a2e:bb83:0:b0:2d8:901f:7f45 with SMTP id y3-20020a2ebb83000000b002d8901f7f45mr3356811lje.13.1714043039569; Thu, 25 Apr 2024 04:03:59 -0700 (PDT) Received: from localhost.localdomain ([92.88.170.77]) by smtp.gmail.com with ESMTPSA id e4-20020a05600c4e4400b0041b0f10fc7asm5000576wmq.31.2024.04.25.04.03.58 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 25 Apr 2024 04:03:59 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, qemu-arm@nongnu.org, Zhao Liu , Xiaoyao Li , Yongwei Ma , Babu Moger , Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Eduardo Habkost , Marcel Apfelbaum , Yanan Wang , Eric Blake Subject: [PULL 21/22] hw/core: Introduce module-id as the topology subindex Date: Thu, 25 Apr 2024 13:01:54 +0200 Message-ID: <20240425110157.20328-22-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240425110157.20328-1-philmd@linaro.org> References: <20240425110157.20328-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::22b; envelope-from=philmd@linaro.org; helo=mail-lj1-x22b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Zhao Liu Add module-id in CpuInstanceProperties, to locate the CPU with module level. Suggested-by: Xiaoyao Li Tested-by: Yongwei Ma Signed-off-by: Zhao Liu Tested-by: Babu Moger Acked-by: Markus Armbruster Message-ID: <20240424154929.1487382-4-zhao1.liu@intel.com> Signed-off-by: Philippe Mathieu-Daudé --- qapi/machine.json | 4 ++++ hw/core/machine-hmp-cmds.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/qapi/machine.json b/qapi/machine.json index 48f98e7d9f..bce6e1bbc4 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -988,6 +988,9 @@ # @cluster-id: cluster number within the parent container the CPU # belongs to (since 7.1) # +# @module-id: module number within the parent container the CPU belongs +# to (since 9.1) +# # @core-id: core number within the parent container the CPU belongs to # # @thread-id: thread number within the core the CPU belongs to @@ -1005,6 +1008,7 @@ '*socket-id': 'int', '*die-id': 'int', '*cluster-id': 'int', + '*module-id': 'int', '*core-id': 'int', '*thread-id': 'int' } diff --git a/hw/core/machine-hmp-cmds.c b/hw/core/machine-hmp-cmds.c index a6ff6a4875..8701f00cc7 100644 --- a/hw/core/machine-hmp-cmds.c +++ b/hw/core/machine-hmp-cmds.c @@ -87,6 +87,10 @@ void hmp_hotpluggable_cpus(Monitor *mon, const QDict *qdict) monitor_printf(mon, " cluster-id: \"%" PRIu64 "\"\n", c->cluster_id); } + if (c->has_module_id) { + monitor_printf(mon, " module-id: \"%" PRIu64 "\"\n", + c->module_id); + } if (c->has_core_id) { monitor_printf(mon, " core-id: \"%" PRIu64 "\"\n", c->core_id); }