[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 2/5] qmp: distinguish PC-DIMM and NVDIMM in M
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v3 2/5] qmp: distinguish PC-DIMM and NVDIMM in MemoryDeviceInfoList |
Date: |
Mon, 5 Mar 2018 13:14:34 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
On 03/05/2018 12:57 AM, Haozhong Zhang wrote:
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.
NVDIMMDeviceInfo, which inherits from PCDIMMDeviceInfo, is added to
union type MemoryDeviceInfo to record information of NVDIMM devices.
The NVDIMM-specific data is currently left empty and will be filled
when necessary in the future.
Signed-off-by: Haozhong Zhang <address@hidden>
---
hmp.c | 14 +++++++++++---
hw/mem/pc-dimm.c | 20 ++++++++++++++++++--
numa.c | 19 +++++++++++++------
qapi-schema.json | 18 +++++++++++++++++-
Will need rebasing now that the contents live in qapi/misc.json.
+++ b/qapi-schema.json
@@ -2920,6 +2920,18 @@
}
}
+##
+# @NVDIMMDeviceInfo:
+#
+# NVDIMMDevice state information
+#
+# Since: 2.12
+##
+{ 'struct': 'NVDIMMDeviceInfo',
+ 'base': 'PCDIMMDeviceInfo',
+ 'data': {}
+}
You added no data, so why did you need the type?
+
##
# @MemoryDeviceInfo:
#
@@ -2927,7 +2939,11 @@
#
# Since: 2.1
##
-{ 'union': 'MemoryDeviceInfo', 'data': {'dimm': 'PCDIMMDeviceInfo'} }
+{ 'union': 'MemoryDeviceInfo',
+ 'data': { 'dimm': 'PCDIMMDeviceInfo',
+ 'nvdimm': 'NVDIMMDeviceInfo'
Names aren't part of the interface; would it be better to rename
PCDIMMDeviceInfo into something that can be generically shared between
both the 'dimm' and 'nvdimm' branches without having to create a
pointless subtype?
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
- [Qemu-devel] [PATCH v3 0/5] hw/acpi-build: build SRAT memory affinity structures for DIMM devices, Haozhong Zhang, 2018/03/05
- [Qemu-devel] [PATCH v3 1/5] pc-dimm: refactor qmp_pc_dimm_device_list, Haozhong Zhang, 2018/03/05
- [Qemu-devel] [PATCH v3 2/5] qmp: distinguish PC-DIMM and NVDIMM in MemoryDeviceInfoList, Haozhong Zhang, 2018/03/05
- [Qemu-devel] [PATCH v3 3/5] hw/acpi-build: build SRAT memory affinity structures for DIMM devices, Haozhong Zhang, 2018/03/05
- [Qemu-devel] [PATCH v3 4/5] tests/bios-tables-test: allow setting extra machine options, Haozhong Zhang, 2018/03/05
- [Qemu-devel] [PATCH v3 5/5] tests/bios-tables-test: add test cases for DIMM proximity, Haozhong Zhang, 2018/03/05