qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Haozhong Zhang <haozhong.zhang@intel.com>, qemu-devel@nongnu.org
Cc: mst@redhat.com, Igor Mammedov <imammedo@redhat.com>,
	Xiao Guangrong <xiaoguangrong.eric@gmail.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Richard Henderson <rth@twiddle.net>,
	Eduardo Habkost <ehabkost@redhat.com>,
	Marcel Apfelbaum <marcel@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Dan Williams <dan.j.williams@intel.com>,
	Markus Armbruster <armbru@redhat.com>,
	dgilbert@redhat.com
Subject: Re: [Qemu-devel] [PATCH v5 2/5] qmp: distinguish PC-DIMM and NVDIMM in MemoryDeviceInfoList
Date: Sat, 10 Mar 2018 20:31:30 -0600	[thread overview]
Message-ID: <c8e811b5-251a-6621-6ada-e894d7eaee43@redhat.com> (raw)
In-Reply-To: <20180311013426.32610-3-haozhong.zhang@intel.com>

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.

> 
> 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>
> ---
>   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 <eblake@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

  reply	other threads:[~2018-03-11  2:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-11  1:34 [Qemu-devel] [PATCH v5 0/5] hw/acpi-build: build SRAT memory affinity structures for DIMM devices Haozhong Zhang
2018-03-11  1:34 ` [Qemu-devel] [PATCH v5 1/5] pc-dimm: make qmp_pc_dimm_device_list() sort devices by address Haozhong Zhang
2018-03-11  1:34 ` [Qemu-devel] [PATCH v5 2/5] qmp: distinguish PC-DIMM and NVDIMM in MemoryDeviceInfoList Haozhong Zhang
2018-03-11  2:31   ` Eric Blake [this message]
2018-03-11  3:00     ` Haozhong Zhang
2018-03-11  1:34 ` [Qemu-devel] [PATCH v5 3/5] hw/acpi-build: build SRAT memory affinity structures for DIMM devices Haozhong Zhang
2018-03-11  1:34 ` [Qemu-devel] [PATCH v5 4/5] tests/bios-tables-test: add test cases for DIMM proximity Haozhong Zhang
2018-03-11  1:34 ` [Qemu-devel] [PATCH v5 5/5][DO NOT APPLY] test/acpi-test-data: add ACPI tables for dimmpxm test Haozhong Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c8e811b5-251a-6621-6ada-e894d7eaee43@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=dan.j.williams@intel.com \
    --cc=dgilbert@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=haozhong.zhang@intel.com \
    --cc=imammedo@redhat.com \
    --cc=marcel@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=stefanha@redhat.com \
    --cc=xiaoguangrong.eric@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).