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 v3 2/5] qmp: distinguish PC-DIMM and NVDIMM in MemoryDeviceInfoList
Date: Mon, 5 Mar 2018 13:14:34 -0600	[thread overview]
Message-ID: <d22bd716-c48f-89a6-d264-cea75ab7b3c4@redhat.com> (raw)
In-Reply-To: <20180305065710.25876-3-haozhong.zhang@intel.com>

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 <haozhong.zhang@intel.com>
> ---
>   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

  reply	other threads:[~2018-03-05 19:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-05  6:57 [Qemu-devel] [PATCH v3 0/5] hw/acpi-build: build SRAT memory affinity structures for DIMM devices Haozhong Zhang
2018-03-05  6:57 ` [Qemu-devel] [PATCH v3 1/5] pc-dimm: refactor qmp_pc_dimm_device_list Haozhong Zhang
2018-03-07 10:10   ` Igor Mammedov
2018-03-05  6:57 ` [Qemu-devel] [PATCH v3 2/5] qmp: distinguish PC-DIMM and NVDIMM in MemoryDeviceInfoList Haozhong Zhang
2018-03-05 19:14   ` Eric Blake [this message]
2018-03-06  0:24     ` Haozhong Zhang
2018-03-06 12:34     ` Igor Mammedov
2018-03-07 10:21   ` Igor Mammedov
2018-03-05  6:57 ` [Qemu-devel] [PATCH v3 3/5] hw/acpi-build: build SRAT memory affinity structures for DIMM devices Haozhong Zhang
2018-03-07 10:30   ` Igor Mammedov
2018-03-05  6:57 ` [Qemu-devel] [PATCH v3 4/5] tests/bios-tables-test: allow setting extra machine options Haozhong Zhang
2018-03-07 10:40   ` Igor Mammedov
2018-03-05  6:57 ` [Qemu-devel] [PATCH v3 5/5] tests/bios-tables-test: add test cases for DIMM proximity Haozhong Zhang
2018-03-07 12:02   ` Igor Mammedov

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=d22bd716-c48f-89a6-d264-cea75ab7b3c4@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).