From patchwork Tue Oct 29 15:10:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 839337 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:4593:b0:37d:45d0:187 with SMTP id gb19csp426303wrb; Tue, 29 Oct 2024 08:12:00 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU+OK/RNROVRgOlp1MTbQRkIXr9TdI0KLs/49rWR7VymvSpzcD9Uw4AwlNxuMeDfYoiH+dtfw==@linaro.org X-Google-Smtp-Source: AGHT+IHgwCm1gllTk/NdX8Fp2VSQz8aqFWh6604k3Bb183i3daCF0FaPm0LWLS1iW/u6t3sMf3Zg X-Received: by 2002:a05:622a:352:b0:461:70cc:3793 with SMTP id d75a77b69052e-46170cc3c43mr2590871cf.43.1730214720250; Tue, 29 Oct 2024 08:12:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1730214720; cv=none; d=google.com; s=arc-20240605; b=el6/rvGHpWiqhojctslsQGGdoteYKnvUuIR4kXcY5+czCnzIirFkdpcxYGdU1LNN2v DZ89NfgJ/zZa2B6NZ07kpglTNeNolee2wIb/HGEq9dI+SuVHrnW6OhqC+a1OuGg0oWT7 XNae7GiSVRURPWaQwbTiv1yab5oadc1TwkbOrlsj//xwufG2KH2Hy9Q7tUi8UROx9xrg VcC3xTdosAm4NBXGhcuO+fJ4Fw805D6z7MPn+VaI00LqzVku9jQu1bT0g01T/kD7eWn4 H5XlhoDubJf2IMWUiWWTtNj0l+0378O0JJa047XClxaV8JaRmSEoL3gBYO7h3CwUx9WG lLBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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:to:from :dkim-signature; bh=QD7klZQEYAvteWerIuPHuaPLuFXzFsaVkFjCQXxT8EE=; fh=WHP2QY30X61zPAPOd/59AWJDTn2ouHKl1tn/Sv4arXE=; b=Ig+eb3+H24aCp8SJ53wIdpcobMXRKiACIQb5XaX2hMjs/1RPN+7vf9q3dbijx+Byqj UYbukoeNpdP4yD8LUY46GSdG30TR6Vs+CjND7X5xBy93qkJn1Oo1pbIQ5PVskGM6ZzpV 4bJr6hA7729f65NvbA9B9zU/UxQySBXO3M8x7p9tR4BJPSi5hFe1buTAkzeLZNKusW8n b/KodXmtpKnZHJQbhtpuGP02u1m+Z+alsTMTZxanSvQDKZ806Afsrs5Q2lS2SyvAKS58 +KjfrlTlPRsItUK2n2Qfb6k8WkKaCWi8KV1gk70BJtA60QPMk+FZeEsWe5nT2VgYw4lw E6QA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gKZ5Pq4a; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-4613235dd4bsi107473821cf.317.2024.10.29.08.12.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 Oct 2024 08:12:00 -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=gKZ5Pq4a; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5nsK-00014x-2T; Tue, 29 Oct 2024 11:11:16 -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 1t5nrz-0000aI-RU for qemu-devel@nongnu.org; Tue, 29 Oct 2024 11:10:56 -0400 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t5nrw-0007fS-O1 for qemu-devel@nongnu.org; Tue, 29 Oct 2024 11:10:55 -0400 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-539f76a6f0dso4863697e87.1 for ; Tue, 29 Oct 2024 08:10:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730214651; x=1730819451; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=QD7klZQEYAvteWerIuPHuaPLuFXzFsaVkFjCQXxT8EE=; b=gKZ5Pq4adhHJdcarha+byvmh1LtU3lepymo7Nr0ty4VlaotXVzq6d9fTndGM+3LkWg hP55BTqUS2sGMJKyxTpR1/fYOUMlFi5tKtcGA+ANGeBNR2o/8GvzfRCRupQfw+WxzmCB E2/IjXDVjOOl/CDBrAAn3tLJ8CvbcLIeml0NIUwHYVV64oShNJMYAKk36RcPW4fsgJWC OOuf7Ia7a+Lz5vkFM/PSBgYo1cZp4WIuPBrkXtHsqNZgpHH6kCzWwV5B+3yvDWyMR8uh WrUQLP9Hymbv9cleMdHF7/r7Omn7MKvqKbWqWpaTTpJP5OuQ1Qh0Oq2F/qL/KP/NaaXA Pu1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730214651; x=1730819451; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QD7klZQEYAvteWerIuPHuaPLuFXzFsaVkFjCQXxT8EE=; b=YCTap3lBZMCV9N/yozQ8RiqyoKJV28S5s4kM/U2ZrapCUKYDaH0KIC8WxqtYU5XIig y/qLplkhGTFkX8r8gd9rpugKuHkkszMWVfpm2hJ3RrPKZ36YF/1K3iYjlisocTFhvWXQ ZJWE4CoSq4xLscitWfP4NBwladu4upglJlgVWEi0EMZkzo06yYxpdOxIlepF4fxOK0LY uWYJ4QStieEOsLJGNcNAuKc7bOIkO9Wdk6FSi4c7qek1pCL2hYp5cBuLFBA+xd8s/mJW +2Uu0d5UQbA2OQASyqI3nDTHYeNov68SkSQk7g5DDKAdtDOg5HumkIqq9rBMCKDyU89t r2ag== X-Forwarded-Encrypted: i=1; AJvYcCWTSi7Mw5vfU2lRtjr1+DIaVlWVrGfs3xJpP9cEmdHpDWU/zZAXZnin1NNyjxmKU/Z81fG++SleEt/1@nongnu.org X-Gm-Message-State: AOJu0YzOk4SNDflh7T3Yot7wv5koLq+1JdJyJZZqPZ045izZRUgwIMka uVxGkriGRXKxDwEdbOlKzkpwSkdM3Rknjlezu7IyH0w2W0Zr0WX5SYvT50V5Pr8+usR/AusAN/n S X-Received: by 2002:a05:6512:2304:b0:53a:aea:a9e1 with SMTP id 2adb3069b0e04-53b34a1afd9mr6639430e87.54.1730214650697; Tue, 29 Oct 2024 08:10:50 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4319360cc2esm146835865e9.44.2024.10.29.08.10.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Oct 2024 08:10:50 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PULL 02/18] docs/system/cpu-hotplug: Update example's socket-id/core-id Date: Tue, 29 Oct 2024 15:10:32 +0000 Message-Id: <20241029151048.1047247-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241029151048.1047247-1-peter.maydell@linaro.org> References: <20241029151048.1047247-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::130; envelope-from=peter.maydell@linaro.org; helo=mail-lf1-x130.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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=0 core-id=1, not socket-id=1 core-id=0 * 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: 20241010131800.3210161-1-peter.maydell@linaro.org Message-id: 20240819144303.37852-1-peter.maydell@linaro.org --- 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 listed properties to QMP ``device_add``:: - (QEMU) device_add id=cpu-2 driver=IvyBridge-IBRS-x86_64-cpu socket-id=1 core-id=0 thread-id=0 + (QEMU) device_add id=cpu-2 driver=IvyBridge-IBRS-x86_64-cpu socket-id=0 core-id=1 thread-id=0 { "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 (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`` command:: (QEMU) device_del id=cpu-2 { - "execute": "device_del", "arguments": { "id": "cpu-2" } + "execute": "device_del", } { "return": {}