Lines Matching +full:qemu +full:- +full:x86_64
5 A complete example of vCPU hotplug (and hot-unplug) using QMP
9 ------------
11 (1) Launch QEMU as follows (note that the "maxcpus" is mandatory to
14 $ qemu-system-x86_64 -display none -no-user-config -m 2048 \
15 -nodefaults -monitor stdio -machine pc,accel=kvm,usb=off \
16 -smp 1,maxcpus=2 -cpu IvyBridge-IBRS \
17 -qmp unix:/tmp/qmp-sock,server=on,wait=off
19 (2) Run 'qmp-shell' (located in the source tree, under: "scripts/qmp/)
20 to connect to the just-launched QEMU::
22 $> ./qmp-shell -p -v /tmp/qmp-sock
24 (QEMU)
28 (QEMU) query-hotpluggable-cpus
30 "execute": "query-hotpluggable-cpus",
37 "core-id": 1,
38 "socket-id": 0,
39 "thread-id": 0
41 "type": "IvyBridge-IBRS-x86_64-cpu",
42 "vcpus-count": 1
46 "core-id": 0,
47 "socket-id": 0,
48 "thread-id": 0
50 "qom-path": "/machine/unattached/device[0]",
51 "type": "IvyBridge-IBRS-x86_64-cpu",
52 "vcpus-count": 1
56 (QEMU)
58 (4) The ``query-hotpluggable-cpus`` command returns an object for CPUs
59 that are present (containing a "qom-path" member) or which may be
60 hot-plugged (no "qom-path" member). From its output in step (3), we
61 can see that ``IvyBridge-IBRS-x86_64-cpu`` is present in socket 0 core 0,
62 while hot-plugging a CPU into socket 0 core 1 requires passing the listed
65 (QEMU) device_add id=cpu-2 driver=IvyBridge-IBRS-x86_64-cpu socket-id=0 core-id=1 thread-id=0
69 "core-id": 1,
70 "driver": "IvyBridge-IBRS-x86_64-cpu",
71 "id": "cpu-2",
72 "socket-id": 0,
73 "thread-id": 0
79 (QEMU)
81 (5) Optionally, run QMP ``query-cpus-fast`` for some details about the
84 (QEMU) query-cpus-fast
87 "execute": "query-cpus-fast",
92 "cpu-index": 0,
94 "core-id": 0,
95 "socket-id": 0,
96 "thread-id": 0
98 "qom-path": "/machine/unattached/device[0]",
99 "target": "x86_64",
100 "thread-id": 28957
103 "cpu-index": 1,
105 "core-id": 1,
106 "socket-id": 0,
107 "thread-id": 0
109 "qom-path": "/machine/peripheral/cpu-2",
110 "target": "x86_64",
111 "thread-id": 29095
115 (QEMU)
117 vCPU hot-unplug
118 ---------------
120 From the 'qmp-shell', invoke the QMP ``device_del`` command::
122 (QEMU) device_del id=cpu-2
125 "id": "cpu-2"
132 (QEMU)
135 vCPU hot-unplug requires guest cooperation; so the ``device_del``
136 command above does not guarantee vCPU removal -- it's a "request to
140 QEMU to unplug it.