qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: Ernest Esene <eroken1@gmail.com>
Cc: qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
	Xiao Guangrong <xiaoguangrong.eric@gmail.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v3 1/3] Categorize devices: DIMM
Date: Tue, 2 Apr 2019 11:50:57 +0200	[thread overview]
Message-ID: <20190402115057.7412fa40@redhat.com> (raw)
In-Reply-To: <20190401181150.GA31786@erokenlabserver>

On Mon, 1 Apr 2019 19:11:50 +0100
Ernest Esene <eroken1@gmail.com> wrote:

> Set category and describe DIMM devices
> 
> Signed-off-by: Ernest Esene <eroken1@gmail.com>

Reviewed-by: Igor Mammedov <imammedo@redhat.com>

> 
> ---
> v3:
>   * add MEMORY device category
>   * set category to MEMORY
> v2:
>   * split into separate patches
> ---
>  hw/mem/nvdimm.c        | 1 +
>  hw/mem/pc-dimm.c       | 1 +
>  include/hw/qdev-core.h | 1 +
>  qdev-monitor.c         | 1 +
>  4 files changed, 4 insertions(+)
> 
> diff --git a/hw/mem/nvdimm.c b/hw/mem/nvdimm.c
> index bf2adf5e16..a334dbe1f5 100644
> --- a/hw/mem/nvdimm.c
> +++ b/hw/mem/nvdimm.c
> @@ -200,6 +200,7 @@ static void nvdimm_class_init(ObjectClass *oc, void *data)
>      ddc->realize = nvdimm_realize;
>      mdc->get_memory_region = nvdimm_md_get_memory_region;
>      dc->props = nvdimm_properties;
> +    dc->desc = "NVDIMM memory module";
>  
>      nvc->read_label_data = nvdimm_read_label_data;
>      nvc->write_label_data = nvdimm_write_label_data;
> diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c
> index 152400b1fc..3ace8077b5 100644
> --- a/hw/mem/pc-dimm.c
> +++ b/hw/mem/pc-dimm.c
> @@ -259,6 +259,7 @@ static void pc_dimm_class_init(ObjectClass *oc, void *data)
>      dc->unrealize = pc_dimm_unrealize;
>      dc->props = pc_dimm_properties;
>      dc->desc = "DIMM memory module";
> +    set_bit(DEVICE_CATEGORY_MEMORY, dc->categories);
>  
>      ddc->get_vmstate_memory_region = pc_dimm_get_memory_region;
>  
> diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
> index 33ed3b8dde..a7d9ea1fbe 100644
> --- a/include/hw/qdev-core.h
> +++ b/include/hw/qdev-core.h
> @@ -26,6 +26,7 @@ typedef enum DeviceCategory {
>      DEVICE_CATEGORY_SOUND,
>      DEVICE_CATEGORY_MISC,
>      DEVICE_CATEGORY_CPU,
> +    DEVICE_CATEGORY_MEMORY,
>      DEVICE_CATEGORY_MAX
>  } DeviceCategory;
>  
> diff --git a/qdev-monitor.c b/qdev-monitor.c
> index d4320986a2..5318df205b 100644
> --- a/qdev-monitor.c
> +++ b/qdev-monitor.c
> @@ -143,6 +143,7 @@ static void qdev_print_devinfos(bool show_no_user)
>          [DEVICE_CATEGORY_SOUND]   = "Sound",
>          [DEVICE_CATEGORY_MISC]    = "Misc",
>          [DEVICE_CATEGORY_CPU]     = "CPU",
> +        [DEVICE_CATEGORY_MEMORY]  = "Memory",
>          [DEVICE_CATEGORY_MAX]     = "Uncategorized",
>      };
>      GSList *list, *elt;

      reply	other threads:[~2019-04-02 10:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-01 18:11 [Qemu-devel] [PATCH v3 1/3] Categorize devices: DIMM Ernest Esene
2019-04-02  9:50 ` Igor Mammedov [this message]

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=20190402115057.7412fa40@redhat.com \
    --to=imammedo@redhat.com \
    --cc=eroken1@gmail.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --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).