[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 2/5] qmp: distinguish PC-DIMM and NVDIMM in M
From: |
Haozhong Zhang |
Subject: |
Re: [Qemu-devel] [PATCH v5 2/5] qmp: distinguish PC-DIMM and NVDIMM in MemoryDeviceInfoList |
Date: |
Sun, 11 Mar 2018 11:00:30 +0800 |
User-agent: |
NeoMutt/20171027 |
On 03/10/18 20:31 -0600, Eric Blake wrote:
> On 03/10/2018 07:34 PM, 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.
>
> Stale comment.
Oops, my stupid miss. I'll send another version soon.
Thanks,
Haozhong
>
> >
> > 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 <address@hidden>
> > ---
> > hmp.c | 14 +++++++++++---
> > hw/mem/pc-dimm.c | 10 +++++++++-
> > numa.c | 19 +++++++++++++------
> > qapi/misc.json | 6 +++++-
> > 4 files changed, 38 insertions(+), 11 deletions(-)
> >
>
> > +++ b/qapi/misc.json
> > @@ -2852,7 +2852,11 @@
> > #
> > # Since: 2.1
>
> Perhaps this could somehow use a '(since 2.12)' tag; but as this is a
> "simple union" (which is anything but simple in the QAPI generator), and
> we're trying to avoid introducing new ones where possible, I'm fine
> overlooking it for now.
>
> > ##
> > -{ 'union': 'MemoryDeviceInfo', 'data': {'dimm': 'PCDIMMDeviceInfo'} }
> > +{ 'union': 'MemoryDeviceInfo',
> > + 'data': { 'dimm': 'PCDIMMDeviceInfo',
> > + 'nvdimm': 'PCDIMMDeviceInfo'
> > + }
> > +}
>
> Reviewed-by: Eric Blake <address@hidden>
>
> --
> Eric Blake, Principal Software Engineer
> Red Hat, Inc. +1-919-301-3266
> Virtualization: qemu.org | libvirt.org
- [Qemu-devel] [PATCH v5 0/5] hw/acpi-build: build SRAT memory affinity structures for DIMM devices, Haozhong Zhang, 2018/03/10
- [Qemu-devel] [PATCH v5 1/5] pc-dimm: make qmp_pc_dimm_device_list() sort devices by address, Haozhong Zhang, 2018/03/10
- [Qemu-devel] [PATCH v5 2/5] qmp: distinguish PC-DIMM and NVDIMM in MemoryDeviceInfoList, Haozhong Zhang, 2018/03/10
- [Qemu-devel] [PATCH v5 3/5] hw/acpi-build: build SRAT memory affinity structures for DIMM devices, Haozhong Zhang, 2018/03/10
- [Qemu-devel] [PATCH v5 4/5] tests/bios-tables-test: add test cases for DIMM proximity, Haozhong Zhang, 2018/03/10
- [Qemu-devel] [PATCH v5 5/5][DO NOT APPLY] test/acpi-test-data: add ACPI tables for dimmpxm test, Haozhong Zhang, 2018/03/10