diff options
| author | fanhuang <FangSheng.Huang@amd.com> | 2026-06-23 15:50:43 +0800 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2026-07-03 21:21:07 -0400 |
| commit | 839c0a2bd8132cdef2faab952d7c3f49b9fa984c (patch) | |
| tree | f2160342df4d143996a2f2f81cc4b7fe517702b7 /qapi | |
| parent | e83b01083631544bec27cbb3a381420b1ac7dc38 (diff) | |
| download | qemu-839c0a2bd8132cdef2faab952d7c3f49b9fa984c.tar.gz qemu-839c0a2bd8132cdef2faab952d7c3f49b9fa984c.zip | |
qapi, hmp: introspection for the sp-mem device
Add a SpMemDeviceInfo variant to MemoryDeviceInfo so `query-memory-devices`
reports each sp-mem instance (id, addr, size, node, memdev), and print it
from HMP `info memory-devices`.
Signed-off-by: FangSheng Huang <FangSheng.Huang@amd.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: David Hildenbrand (Arm) <david@kernel.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-ID: <20260623075051.3797975-3-FangSheng.Huang@amd.com>
Diffstat (limited to 'qapi')
| -rw-r--r-- | qapi/machine.json | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/qapi/machine.json b/qapi/machine.json index 685e4e29b8..9b2248038f 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -1414,6 +1414,32 @@ } ## +# @SpMemDeviceInfo: +# +# sp-mem device state information +# +# @id: device's ID +# +# @addr: physical address, where device is mapped +# +# @size: size of memory that the device provides, in bytes +# +# @node: NUMA proximity domain to which the device is assigned +# +# @memdev: memory backend linked with device +# +# Since: 11.1 +## +{ 'struct': 'SpMemDeviceInfo', + 'data': { '*id': 'str', + 'addr': 'size', + 'size': 'size', + 'node': 'int', + 'memdev': 'str' + } +} + +## # @MemoryDeviceInfoKind: # # @nvdimm: since 2.12 @@ -1426,11 +1452,13 @@ # # @hv-balloon: since 8.2. # +# @sp-mem: since 11.1. +# # Since: 2.1 ## { 'enum': 'MemoryDeviceInfoKind', 'data': [ 'dimm', 'nvdimm', 'virtio-pmem', 'virtio-mem', 'sgx-epc', - 'hv-balloon' ] } + 'hv-balloon', 'sp-mem' ] } ## # @PCDIMMDeviceInfoWrapper: @@ -1483,6 +1511,16 @@ 'data': { 'data': 'HvBalloonDeviceInfo' } } ## +# @SpMemDeviceInfoWrapper: +# +# @data: sp-mem device state information +# +# Since: 11.1 +## +{ 'struct': 'SpMemDeviceInfoWrapper', + 'data': { 'data': 'SpMemDeviceInfo' } } + +## # @MemoryDeviceInfo: # # Union containing information about a memory device @@ -1499,7 +1537,8 @@ 'virtio-pmem': 'VirtioPMEMDeviceInfoWrapper', 'virtio-mem': 'VirtioMEMDeviceInfoWrapper', 'sgx-epc': 'SgxEPCDeviceInfoWrapper', - 'hv-balloon': 'HvBalloonDeviceInfoWrapper' + 'hv-balloon': 'HvBalloonDeviceInfoWrapper', + 'sp-mem': 'SpMemDeviceInfoWrapper' } } |
