Board-created devices no longer land in /machine/unattached and the
next commit removes the container entirely. Update the in-tree
consumers of the old paths:
scripts/arm_processor_error.py, scripts/qmp_helper.py
Search for CPUs directly under /machine.
docs/devel/s390-cpu-topology.rst, docs/system/cpu-hotplug.rst
qapi/{block-core,block,machine,qom}.json
Refresh example qom-path strings.
tests/qemu-iotests/common.filter
_filter_qom_path() now normalizes any /machine/... device path
so the reference outputs are stable across board naming changes.
tests/qemu-iotests/{172,186}.out
Regenerated against the new filter.
Assisted-by: Kiro
Signed-off-by: Alexander Graf <[email protected]>
---
docs/devel/s390-cpu-topology.rst | 2 +-
docs/system/cpu-hotplug.rst | 4 +-
qapi/block-core.json | 12 +++---
qapi/block.json | 2 +-
qapi/machine.json | 12 +++---
qapi/qom.json | 4 +-
scripts/arm_processor_error.py | 3 +-
scripts/qmp_helper.py | 2 +-
tests/qemu-iotests/172.out | 72 ++++++++++++++++----------------
tests/qemu-iotests/186.out | 10 ++---
tests/qemu-iotests/common.filter | 2 +-
11 files changed, 62 insertions(+), 63 deletions(-)
diff --git a/docs/devel/s390-cpu-topology.rst b/docs/devel/s390-cpu-topology.rst
index 48313b92d4..26be230969 100644
--- a/docs/devel/s390-cpu-topology.rst
+++ b/docs/devel/s390-cpu-topology.rst
@@ -40,7 +40,7 @@ modifiers for all configured vCPUs.
},
"cpu-state": "operating",
"entitlement": "medium",
- "qom-path": "/machine/unattached/device[0]",
+ "qom-path": "/machine/cpu[0]",
"cpu-index": 0,
"target": "s390x"
},
diff --git a/docs/system/cpu-hotplug.rst b/docs/system/cpu-hotplug.rst
index cc50937c36..f838faba6f 100644
--- a/docs/system/cpu-hotplug.rst
+++ b/docs/system/cpu-hotplug.rst
@@ -47,7 +47,7 @@ vCPU hotplug
"socket-id": 0,
"thread-id": 0
},
- "qom-path": "/machine/unattached/device[0]",
+ "qom-path": "/machine/cpu[0]",
"type": "IvyBridge-IBRS-x86_64-cpu",
"vcpus-count": 1
}
@@ -95,7 +95,7 @@ vCPU hotplug
"socket-id": 0,
"thread-id": 0
},
- "qom-path": "/machine/unattached/device[0]",
+ "qom-path": "/machine/cpu[0]",
"target": "x86_64",
"thread-id": 28957
},
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 1f87b07850..28487f7cae 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -928,7 +928,7 @@
# "device":"ide1-cd0",
# "locked":false,
# "removable":true,
-# "qdev": "/machine/unattached/device[23]",
+# "qdev": "/machine/ide[1]/ide.1/cd0",
# "tray_open": false,
# "type":"unknown"
# },
@@ -936,7 +936,7 @@
# "device":"floppy0",
# "locked":false,
# "removable":true,
-# "qdev": "/machine/unattached/device[20]",
+# "qdev": "/machine/fdc/floppy[0]",
# "type":"unknown"
# },
# {
@@ -1310,7 +1310,7 @@
# "account_invalid":true,
# "account_failed":false
# },
-# "qdev": "/machine/unattached/device[23]"
+# "qdev": "/machine/ide[0]/ide.0/hd0"
# },
# {
# "device":"ide1-cd0",
@@ -1329,7 +1329,7 @@
# "account_invalid":false,
# "account_failed":false
# },
-# "qdev": "/machine/unattached/device[24]"
+# "qdev": "/machine/ide[1]/ide.1/cd0"
# },
# {
# "device":"floppy0",
@@ -1348,7 +1348,7 @@
# "account_invalid":false,
# "account_failed":false
# },
-# "qdev": "/machine/unattached/device[16]"
+# "qdev": "/machine/fdc/floppy[0]"
# },
# {
# "device":"sd0",
@@ -5750,7 +5750,7 @@
# .. qmp-example::
#
# <- { "event": "BLOCK_IO_ERROR",
-# "data": { "qom-path": "/machine/unattached/device[0]",
+# "data": { "qom-path": "/machine/ide[0]/ide.0/hd1",
# "device": "ide0-hd1",
# "node-name": "#block212",
# "operation": "write",
diff --git a/qapi/block.json b/qapi/block.json
index 46955bbb3e..cb177180e7 100644
--- a/qapi/block.json
+++ b/qapi/block.json
@@ -404,7 +404,7 @@
#
# <- { "event": "DEVICE_TRAY_MOVED",
# "data": { "device": "ide1-cd0",
-# "id": "/machine/unattached/device[22]",
+# "id": "/machine/ide[1]/ide.1/cd0",
# "tray-open": true
# },
# "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
diff --git a/qapi/machine.json b/qapi/machine.json
index 9b2248038f..2d39d650ce 100644
--- a/qapi/machine.json
+++ b/qapi/machine.json
@@ -121,7 +121,7 @@
# "thread-id": 0,
# "socket-id": 0
# },
-# "qom-path": "/machine/unattached/device[0]",
+# "qom-path": "/machine/cpu[0]",
# "target":"x86_64",
# "cpu-index": 0
# },
@@ -132,7 +132,7 @@
# "thread-id": 0,
# "socket-id": 1
# },
-# "qom-path": "/machine/unattached/device[2]",
+# "qom-path": "/machine/cpu[1]",
# "target":"x86_64",
# "cpu-index": 1
# }
@@ -1028,7 +1028,7 @@
# { "props": { "core-id": 8 }, "type": "POWER8-spapr-cpu-core",
# "vcpus-count": 1 },
# { "props": { "core-id": 0 }, "type": "POWER8-spapr-cpu-core",
-# "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"}
+# "vcpus-count": 1, "qom-path": "/machine/cpu[0]"}
# ]}
#
# .. qmp-example::
@@ -1043,7 +1043,7 @@
# "props": {"core-id": 0, "socket-id": 1, "thread-id": 0}
# },
# {
-# "qom-path": "/machine/unattached/device[0]",
+# "qom-path": "/machine/cpu[0]",
# "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
# "props": {"core-id": 0, "socket-id": 0, "thread-id": 0}
# }
@@ -1062,7 +1062,7 @@
# "props": { "core-id": 1 }
# },
# {
-# "qom-path": "/machine/unattached/device[0]",
+# "qom-path": "/machine/cpu[0]",
# "type": "qemu-s390x-cpu", "vcpus-count": 1,
# "props": { "core-id": 0 }
# }
@@ -1617,7 +1617,7 @@
#
# <- { "event": "MEMORY_DEVICE_SIZE_CHANGE",
# "data": { "id": "vm0", "size": 1073741824,
-# "qom-path": "/machine/unattached/device[2]" },
+# "qom-path": "/machine/peripheral/vm0" },
# "timestamp": { "seconds": 1588168529, "microseconds": 201316 } }
##
{ 'event': 'MEMORY_DEVICE_SIZE_CHANGE',
diff --git a/qapi/qom.json b/qapi/qom.json
index d96cc5aa21..62f9fd5492 100644
--- a/qapi/qom.json
+++ b/qapi/qom.json
@@ -135,7 +135,7 @@
# :title: Use absolute path
#
# -> { "execute": "qom-get",
-# "arguments": { "path": "/machine/unattached/device[0]",
+# "arguments": { "path": "/machine/cpu[0]",
# "property": "hotplugged" } }
# <- { "return": false }
#
@@ -143,7 +143,7 @@
# :title: Use partial path
#
# -> { "execute": "qom-get",
-# "arguments": { "path": "unattached/sysbus",
+# "arguments": { "path": "machine/sysbus",
# "property": "type" } }
# <- { "return": "System" }
##
diff --git a/scripts/arm_processor_error.py b/scripts/arm_processor_error.py
index 73d069f070..2636837ce3 100644
--- a/scripts/arm_processor_error.py
+++ b/scripts/arm_processor_error.py
@@ -244,8 +244,7 @@ def send_cper(self, args):
qmp_cmd.set_args(args)
is_cpu_type = re.compile(r"^([\w+]+\-)?arm\-cpu$")
- cpus = qmp_cmd.search_qom("/machine/unattached/device",
- "type", is_cpu_type)
+ cpus = qmp_cmd.search_qom("/machine/cpu", "type", is_cpu_type)
cper = {}
pei = {}
diff --git a/scripts/qmp_helper.py b/scripts/qmp_helper.py
index 521612fb94..b7e9ad86b9 100755
--- a/scripts/qmp_helper.py
+++ b/scripts/qmp_helper.py
@@ -601,7 +601,7 @@ def search_qom(self, path, prop, regex):
"""
Return a list of devices that match path array like:
- /machine/unattached/device
+ /machine/cpu
/machine/peripheral-anon/device
...
"""
diff --git a/tests/qemu-iotests/172.out b/tests/qemu-iotests/172.out
index a023cd407d..b2adec97c8 100644
--- a/tests/qemu-iotests/172.out
+++ b/tests/qemu-iotests/172.out
@@ -63,12 +63,12 @@ Testing: -fda TEST_DIR/t.qcow2
stats-intervals = <null>
drive-type = "144"
floppy0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
Cache mode: writeback
ide1-cd0: [not inserted]
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
(qemu) quit
@@ -115,16 +115,16 @@ Testing: -fdb TEST_DIR/t.qcow2
stats-intervals = <null>
drive-type = "288"
floppy1 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
Cache mode: writeback
ide1-cd0: [not inserted]
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
floppy0: [not inserted]
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
(qemu) quit
@@ -171,17 +171,17 @@ Testing: -fda TEST_DIR/t.qcow2 -fdb TEST_DIR/t.qcow2.2
stats-intervals = <null>
drive-type = "144"
floppy0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
Cache mode: writeback
floppy1 (NODE_NAME): TEST_DIR/t.qcow2.2 (qcow2)
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
Cache mode: writeback
ide1-cd0: [not inserted]
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
(qemu) quit
@@ -258,12 +258,12 @@ Testing: -drive if=floppy,file=TEST_DIR/t.qcow2
stats-intervals = <null>
drive-type = "144"
floppy0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
Cache mode: writeback
ide1-cd0: [not inserted]
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
(qemu) quit
@@ -310,16 +310,16 @@ Testing: -drive if=floppy,file=TEST_DIR/t.qcow2,index=1
stats-intervals = <null>
drive-type = "288"
floppy1 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
Cache mode: writeback
ide1-cd0: [not inserted]
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
floppy0: [not inserted]
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
(qemu) quit
@@ -366,17 +366,17 @@ Testing: -drive if=floppy,file=TEST_DIR/t.qcow2 -drive
if=floppy,file=TEST_DIR/t
stats-intervals = <null>
drive-type = "144"
floppy0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
Cache mode: writeback
floppy1 (NODE_NAME): TEST_DIR/t.qcow2.2 (qcow2)
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
Cache mode: writeback
ide1-cd0: [not inserted]
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
(qemu) quit
@@ -416,7 +416,7 @@ none0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
Cache mode: writeback
ide1-cd0: [not inserted]
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
(qemu) quit
@@ -453,7 +453,7 @@ none0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
Cache mode: writeback
ide1-cd0: [not inserted]
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
(qemu) quit
@@ -510,7 +510,7 @@ none1 (NODE_NAME): TEST_DIR/t.qcow2.2 (qcow2)
Cache mode: writeback
ide1-cd0: [not inserted]
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
(qemu) quit
@@ -566,7 +566,7 @@ Testing: -fda TEST_DIR/t.qcow2 -drive
if=none,file=TEST_DIR/t.qcow2.2 -device fl
stats-intervals = <null>
drive-type = "144"
floppy0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
Cache mode: writeback
@@ -576,7 +576,7 @@ none0 (NODE_NAME): TEST_DIR/t.qcow2.2 (qcow2)
Cache mode: writeback
ide1-cd0: [not inserted]
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
(qemu) quit
@@ -623,7 +623,7 @@ Testing: -fda TEST_DIR/t.qcow2 -drive
if=none,file=TEST_DIR/t.qcow2.2 -device fl
stats-intervals = <null>
drive-type = "144"
floppy0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
Cache mode: writeback
@@ -633,7 +633,7 @@ none0 (NODE_NAME): TEST_DIR/t.qcow2.2 (qcow2)
Cache mode: writeback
ide1-cd0: [not inserted]
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
(qemu) quit
@@ -680,7 +680,7 @@ Testing: -fdb TEST_DIR/t.qcow2 -drive
if=none,file=TEST_DIR/t.qcow2.2 -device fl
stats-intervals = <null>
drive-type = "144"
floppy1 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
Cache mode: writeback
@@ -690,7 +690,7 @@ none0 (NODE_NAME): TEST_DIR/t.qcow2.2 (qcow2)
Cache mode: writeback
ide1-cd0: [not inserted]
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
(qemu) quit
@@ -737,7 +737,7 @@ Testing: -fdb TEST_DIR/t.qcow2 -drive
if=none,file=TEST_DIR/t.qcow2.2 -device fl
stats-intervals = <null>
drive-type = "144"
floppy1 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
Cache mode: writeback
@@ -747,7 +747,7 @@ none0 (NODE_NAME): TEST_DIR/t.qcow2.2 (qcow2)
Cache mode: writeback
ide1-cd0: [not inserted]
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
(qemu) quit
@@ -803,7 +803,7 @@ Testing: -drive if=floppy,file=TEST_DIR/t.qcow2 -drive
if=none,file=TEST_DIR/t.q
stats-intervals = <null>
drive-type = "144"
floppy0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
Cache mode: writeback
@@ -813,7 +813,7 @@ none0 (NODE_NAME): TEST_DIR/t.qcow2.2 (qcow2)
Cache mode: writeback
ide1-cd0: [not inserted]
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
(qemu) quit
@@ -860,7 +860,7 @@ Testing: -drive if=floppy,file=TEST_DIR/t.qcow2 -drive
if=none,file=TEST_DIR/t.q
stats-intervals = <null>
drive-type = "144"
floppy0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
Cache mode: writeback
@@ -870,7 +870,7 @@ none0 (NODE_NAME): TEST_DIR/t.qcow2.2 (qcow2)
Cache mode: writeback
ide1-cd0: [not inserted]
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
(qemu) quit
@@ -913,7 +913,7 @@ none0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
Cache mode: writeback
ide1-cd0: [not inserted]
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
(qemu) quit
@@ -1091,7 +1091,7 @@ none0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
Cache mode: writeback
ide1-cd0: [not inserted]
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
(qemu) quit
@@ -1128,7 +1128,7 @@ none0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
Cache mode: writeback
ide1-cd0: [not inserted]
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
(qemu) quit
@@ -1168,7 +1168,7 @@ none0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
Cache mode: writeback
ide1-cd0: [not inserted]
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
(qemu) quit
@@ -1205,7 +1205,7 @@ none0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
Cache mode: writeback
ide1-cd0: [not inserted]
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
(qemu) quit
diff --git a/tests/qemu-iotests/186.out b/tests/qemu-iotests/186.out
index 01530040e5..a2fdb0a915 100644
--- a/tests/qemu-iotests/186.out
+++ b/tests/qemu-iotests/186.out
@@ -404,7 +404,7 @@ Testing: -drive if=floppy
QEMU X.Y.Z monitor - type 'help' for more information
(qemu) info block
floppy0: [not inserted]
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
(qemu) quit
@@ -412,7 +412,7 @@ Testing: -drive if=floppy,driver=null-co,read-zeroes=on
QEMU X.Y.Z monitor - type 'help' for more information
(qemu) info block
floppy0 (NODE_NAME): json:{"read-zeroes": "on", "driver": "null-co"} (null-co)
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
Cache mode: writeback
(qemu) quit
@@ -421,7 +421,7 @@ Testing: -drive if=ide,driver=null-co,read-zeroes=on
QEMU X.Y.Z monitor - type 'help' for more information
(qemu) info block
ide0-hd0 (NODE_NAME): json:{"read-zeroes": "on", "driver": "null-co"} (null-co)
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Cache mode: writeback
(qemu) quit
@@ -429,7 +429,7 @@ Testing: -drive if=ide,media=cdrom
QEMU X.Y.Z monitor - type 'help' for more information
(qemu) info block
ide0-cd0: [not inserted]
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
(qemu) quit
@@ -437,7 +437,7 @@ Testing: -drive
if=ide,driver=null-co,read-zeroes=on,media=cdrom
QEMU X.Y.Z monitor - type 'help' for more information
(qemu) info block
ide0-cd0 (NODE_NAME): json:{"read-zeroes": "on", "driver": "null-co"}
(null-co, read-only)
- Attached to: /machine/unattached/device[N]
+ Attached to: PATH
Removable device: not locked, tray closed
Cache mode: writeback
(qemu) quit
diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter
index ce4213cb97..9a5994a3a5 100644
--- a/tests/qemu-iotests/common.filter
+++ b/tests/qemu-iotests/common.filter
@@ -37,7 +37,7 @@ _filter_generated_node_ids()
_filter_qom_path()
{
- gsed -e '/Attached to:/s/\device[[0-9]\+\]/device[N]/g'
+ gsed -e '/Attached to:/s#/machine/.*#PATH#'
}
# replace occurrences of the actual TEST_DIR value with TEST_DIR
--
2.47.1