[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 02/18] docs/system/cpu-hotplug: Update example's socket-id/core-id
From: |
Peter Maydell |
Subject: |
[PULL 02/18] docs/system/cpu-hotplug: Update example's socket-id/core-id |
Date: |
Tue, 29 Oct 2024 15:10:32 +0000 |
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 <peter.maydell@linaro.org>
Acked-by: Igor Mammedov <imammedo@redhat.com>
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": {}
--
2.34.1
- [PULL 00/18] target-arm queue, Peter Maydell, 2024/10/29
- [PULL 01/18] arm/kvm: add support for MTE, Peter Maydell, 2024/10/29
- [PULL 12/18] docs/system/arm: Add placeholder doc for exynos4 boards, Peter Maydell, 2024/10/29
- [PULL 03/18] target/arm: Store FPSR cumulative exception bits in env->vfp.fpsr, Peter Maydell, 2024/10/29
- [PULL 02/18] docs/system/cpu-hotplug: Update example's socket-id/core-id,
Peter Maydell <=
- [PULL 06/18] tests/functional: Add a functional test for the collie board, Peter Maydell, 2024/10/29
- [PULL 10/18] docs/system/arm: Don't use wildcard '*-bmc' in doc titles, Peter Maydell, 2024/10/29
- [PULL 05/18] hw/sd/omap_mmc: Don't use sd_cmd_type_t, Peter Maydell, 2024/10/29
- [PULL 04/18] target/arm: Don't assert in regime_is_user() for E10 mmuidx values, Peter Maydell, 2024/10/29
- [PULL 08/18] scripts/symlink-install-tree.py: Fix MESONINTROSPECT parsing, Peter Maydell, 2024/10/29
- [PULL 09/18] docs/system/arm/stm32: List olimex-stm32-h405 in document title, Peter Maydell, 2024/10/29
- [PULL 07/18] tests/functional: Add a functional test for the sx1 board, Peter Maydell, 2024/10/29
- [PULL 15/18] docs/system/target-arm.rst: Remove "many boards are undocumented" note, Peter Maydell, 2024/10/29
- [PULL 11/18] docs/system/arm: Split fby35 out from aspeed.rst, Peter Maydell, 2024/10/29
- [PULL 14/18] docs/system/arm: Add placeholder docs for mcimx6ul-evk and mcimx7d-sabre, Peter Maydell, 2024/10/29