From nobody Sat Nov 23 22:21:27 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1728566315; cv=none; d=zohomail.com; s=zohoarc; b=n+dFchOAa86PvDRcLxAAn9hf/vJERWFdolB1dWtR1OPC1uUlEmV1XLgUAlDnmwdCNFqiR/itwP9G4O5WCpRuKK+9PE1QMOLNZ9/I+K5kBCskSdDImItVc6WmveBkBM9Goe26vXFcijiXrUgIbfSV4C4TQaRo1uP+0wHFWKyTC5o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1728566315; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ylbu5jo0GWWpRbcIXJid3gmoRXQZOn8CJVhgXWT4S28=; b=foG5OJ7CAWOA/70QxCyIV6Bo/8bmi2MbQq89tJraKLvDutUVugsFzqFrMQdwo+3w4kz1IyE4MG4C0hwOIcoI7utTX3p3UU8QEaD9FdJsCWQ+uv2cLBOlo1KOMBwY6TvtYJw56f1U+BaIAonwEbRhaJR0kC4CijZ1aJkL8q3xz5E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1728566315082119.01975993572671; Thu, 10 Oct 2024 06:18:35 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1syt3b-0007qx-AS; Thu, 10 Oct 2024 09:18:19 -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 1syt3O-0007jQ-RN for qemu-devel@nongnu.org; Thu, 10 Oct 2024 09:18:07 -0400 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1syt3M-0008P3-Ej for qemu-devel@nongnu.org; Thu, 10 Oct 2024 09:18:06 -0400 Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-5398fb1a871so992982e87.3 for ; Thu, 10 Oct 2024 06:18:03 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d4b79fa0asm1538544f8f.83.2024.10.10.06.18.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2024 06:18:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1728566282; x=1729171082; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ylbu5jo0GWWpRbcIXJid3gmoRXQZOn8CJVhgXWT4S28=; b=ZL/3XUIGlhGBnQ252Jwu+LaWpBMl8ED2j6CkNwwnBWQtZA0p4zNgfTFdeukOsImI1M AXq1+9U26a88OcsfiIi7yyf0qdZkNry9JkmxvshlM8D32QOhtkCPXMC1dwQEDedYSNhk /h9OxGiAgbYDuURrshl+TavFSutkIXNx4LDG3ojoAKAz0tPhYxU6DiSt0IUnkgjdyJ/6 jTWxVBT6Ech7nApZeL0QJN2YiGv+G8X807tZ0PhYmfemmesUbpOAnisCKO/J119yv1eT OPRkiihLZLMWyJTjnJf6na79up/zboUiiAK9e63lgdKkw5+KKORuQ1La3N4lUJuD15gY 0JhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728566282; x=1729171082; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ylbu5jo0GWWpRbcIXJid3gmoRXQZOn8CJVhgXWT4S28=; b=sqffFpJxhpjwvQNakriKw3usSi5ZaZ5kIiITlPR74C7g0kYnhTt695IU8/nMljqb7U OKm+YZ5BK4ZW1NeHvKj6ZkYHiJzaU0yeSsRPP7nLh3NxiqjcxveHS7vaXj7oTSlkCL2j z1EYdiiuR3ZdSnjNFzptW9/QTNfjaQGK++GMJbHiL0e9C9WNpss9byqcKX4bNKBRB4Dr 4h8k5QkTMxzJiu4nNGk5TcTMwp7X0eeMi86SFMn/wjWFtR+bYxy0pEdngpBBNOanCfN+ lP3Tg4gHe5tay/KmJYHkF5YMqNxNzoG5vuWLv/5c5U5vkSXHy5SI8+g48r79Dc6icjOp svDQ== X-Gm-Message-State: AOJu0YwYJWEDTCFoPG/r3eyzNwTNnsflUF0na5TcDEXtxtlvKK9y91jq f38/5PqDwhDDNmLlxoNrhgz9doKryNlqVG9fCiyDGtzjobLkRzQvtOb9E0uH3zISVVP+58eg2HA W X-Google-Smtp-Source: AGHT+IHQqMFQkLTXEFpJVeZun85V4jl8Hk+qf+l/JLcKgiP7UHQQr+u8IBoOJtHzq0oKDpCSbidukg== X-Received: by 2002:ac2:4c45:0:b0:52c:fd46:bf07 with SMTP id 2adb3069b0e04-539c4970facmr3925972e87.49.1728566282069; Thu, 10 Oct 2024 06:18:02 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Cc: Igor Mammedov Subject: [PATCH v2] docs/system/cpu-hotplug: Update example's socket-id/core-id Date: Thu, 10 Oct 2024 14:18:00 +0100 Message-Id: <20241010131800.3210161-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::12b; envelope-from=peter.maydell@linaro.org; helo=mail-lf1-x12b.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=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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1728566315910116600 Content-Type: text/plain; charset="utf-8" The example of how to do vCPU hotplug and hot-unlpug in the cpu-hotplug documentation no longer works, because the way we allocate socket-id and core-id to CPUs by default has changed at some point. The output also no longer matches what current QEMU produces in some more cosmetic ways. Update the example to match current QEMU. The differences are: * the second CPU is now socket-id=3D0 core-id=3D1, not socket-id=3D1 core-id=3D0 * the order of fields in QMP responses is now in alphabetical order * the "arch" member is no longer present in the query-cpus-fast output (it was removed in QEMU 6.0) Signed-off-by: Peter Maydell Acked-by: Igor Mammedov Message-id: 20240819144303.37852-1-peter.maydell@linaro.org --- v1->v2: * update device_add command line to use right socket-id/core-id * expand commit message to mention that "arch" field has gone --- docs/system/cpu-hotplug.rst | 56 ++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/docs/system/cpu-hotplug.rst b/docs/system/cpu-hotplug.rst index 015ce2b6ec3..cc50937c36c 100644 --- a/docs/system/cpu-hotplug.rst +++ b/docs/system/cpu-hotplug.rst @@ -33,23 +33,23 @@ vCPU hotplug { "return": [ { - "type": "IvyBridge-IBRS-x86_64-cpu", - "vcpus-count": 1, "props": { - "socket-id": 1, - "core-id": 0, + "core-id": 1, + "socket-id": 0, "thread-id": 0 - } + }, + "type": "IvyBridge-IBRS-x86_64-cpu", + "vcpus-count": 1 }, { + "props": { + "core-id": 0, + "socket-id": 0, + "thread-id": 0 + }, "qom-path": "/machine/unattached/device[0]", "type": "IvyBridge-IBRS-x86_64-cpu", - "vcpus-count": 1, - "props": { - "socket-id": 0, - "core-id": 0, - "thread-id": 0 - } + "vcpus-count": 1 } ] } @@ -58,18 +58,18 @@ vCPU hotplug (4) The ``query-hotpluggable-cpus`` command returns an object for CPUs that are present (containing a "qom-path" member) or which may be hot-plugged (no "qom-path" member). From its output in step (3), we - can see that ``IvyBridge-IBRS-x86_64-cpu`` is present in socket 0, - while hot-plugging a CPU into socket 1 requires passing the listed + can see that ``IvyBridge-IBRS-x86_64-cpu`` is present in socket 0 core= 0, + while hot-plugging a CPU into socket 0 core 1 requires passing the lis= ted properties to QMP ``device_add``:: =20 - (QEMU) device_add id=3Dcpu-2 driver=3DIvyBridge-IBRS-x86_64-cpu sock= et-id=3D1 core-id=3D0 thread-id=3D0 + (QEMU) device_add id=3Dcpu-2 driver=3DIvyBridge-IBRS-x86_64-cpu sock= et-id=3D0 core-id=3D1 thread-id=3D0 { "execute": "device_add", "arguments": { - "socket-id": 1, + "core-id": 1, "driver": "IvyBridge-IBRS-x86_64-cpu", "id": "cpu-2", - "core-id": 0, + "socket-id": 0, "thread-id": 0 } } @@ -83,34 +83,32 @@ vCPU hotplug =20 (QEMU) query-cpus-fast { - "execute": "query-cpus-fast", "arguments": {} + "execute": "query-cpus-fast", } { "return": [ { - "qom-path": "/machine/unattached/device[0]", - "target": "x86_64", - "thread-id": 11534, "cpu-index": 0, "props": { - "socket-id": 0, "core-id": 0, + "socket-id": 0, "thread-id": 0 }, - "arch": "x86" + "qom-path": "/machine/unattached/device[0]", + "target": "x86_64", + "thread-id": 28957 }, { - "qom-path": "/machine/peripheral/cpu-2", - "target": "x86_64", - "thread-id": 12106, "cpu-index": 1, "props": { - "socket-id": 1, - "core-id": 0, + "core-id": 1, + "socket-id": 0, "thread-id": 0 }, - "arch": "x86" + "qom-path": "/machine/peripheral/cpu-2", + "target": "x86_64", + "thread-id": 29095 } ] } @@ -123,10 +121,10 @@ From the 'qmp-shell', invoke the QMP ``device_del`` c= ommand:: =20 (QEMU) device_del id=3Dcpu-2 { - "execute": "device_del", "arguments": { "id": "cpu-2" } + "execute": "device_del", } { "return": {} --=20 2.34.1