diff options
author | Haozhong Zhang <haozhong.zhang@intel.com> | 2018-03-11 11:02:12 +0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2018-03-20 03:34:52 +0200 |
commit | 6388e18de9c6842de9a1307b61d42c8e4549009c (patch) | |
tree | be1792214afae93fe5d31671afdf0d6898cbc4d6 /qapi | |
parent | 52c95cae4e1299e0a2a9709093581a3a96473aa5 (diff) |
qmp: distinguish PC-DIMM and NVDIMM in MemoryDeviceInfoList
It may need to treat PC-DIMM and NVDIMM differently, e.g., when
deciding the necessity of non-volatile flag bit in SRAT memory
affinity structures.
A new field 'nvdimm' is added to the union type MemoryDeviceInfo for
such purpose. Its type is currently PCDIMMDeviceInfo and will be
updated when necessary in the future.
It also fixes "info memory-devices"/query-memory-devices which
currently show nvdimm devices as dimm devices since
object_dynamic_cast(obj, TYPE_PC_DIMM) happily cast nvdimm to
TYPE_PC_DIMM which it's been inherited from.
Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r-- | qapi/misc.json | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/qapi/misc.json b/qapi/misc.json index bcd5d10778..6bf082f612 100644 --- a/qapi/misc.json +++ b/qapi/misc.json @@ -2852,7 +2852,11 @@ # # Since: 2.1 ## -{ 'union': 'MemoryDeviceInfo', 'data': {'dimm': 'PCDIMMDeviceInfo'} } +{ 'union': 'MemoryDeviceInfo', + 'data': { 'dimm': 'PCDIMMDeviceInfo', + 'nvdimm': 'PCDIMMDeviceInfo' + } +} ## # @query-memory-devices: |