diff mbox series

[v2,01/12] pc-dimm: put it into the 'storage' category

Message ID 20201130083630.2520597-2-ganqixin@huawei.com
State New
Headers show
Series Categorize some uncategorized devices | expand

Commit Message

Gan Qixin Nov. 30, 2020, 8:36 a.m. UTC
The category of the pc-dimm device is not set, put it into the 'storage'
category.

Signed-off-by: Gan Qixin <ganqixin@huawei.com>
---
Cc: Michael S. Tsirkin <mst@redhat.com>
---
 hw/mem/pc-dimm.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Pankaj Gupta Nov. 30, 2020, 10:18 a.m. UTC | #1
> The category of the pc-dimm device is not set, put it into the 'storage'
> category.
>
> Signed-off-by: Gan Qixin <ganqixin@huawei.com>
> ---
> Cc: Michael S. Tsirkin <mst@redhat.com>
> ---
>  hw/mem/pc-dimm.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c
> index 2ffc986734..017146e3d1 100644
> --- a/hw/mem/pc-dimm.c
> +++ b/hw/mem/pc-dimm.c
> @@ -282,6 +282,7 @@ static void pc_dimm_class_init(ObjectClass *oc, void *data)
>      mdc->get_plugged_size = memory_device_get_region_size;
>      mdc->get_memory_region = pc_dimm_md_get_memory_region;
>      mdc->fill_device_info = pc_dimm_md_fill_device_info;
> +    set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);

Any reason why pc-dimm would be in the storage category?

>  }
>
>  static TypeInfo pc_dimm_info = {
> --
> 2.23.0
>
>
Gan Qixin Dec. 3, 2020, 6:53 a.m. UTC | #2
> -----Original Message-----
> From: Pankaj Gupta [mailto:pankaj.gupta.linux@gmail.com]
> Sent: Monday, November 30, 2020 6:19 PM
> To: ganqixin <ganqixin@huawei.com>
> Cc: Qemu Developers <qemu-devel@nongnu.org>; qemu-trivial@nongnu.org;
> Chenqun (kuhn) <kuhn.chenqun@huawei.com>; thuth@redhat.com;
> Zhanghailiang <zhang.zhanghailiang@huawei.com>; Michael S . Tsirkin
> <mst@redhat.com>
> Subject: Re: [PATCH v2 01/12] pc-dimm: put it into the 'storage' category
> 
> > The category of the pc-dimm device is not set, put it into the 'storage'
> > category.
> >
> > Signed-off-by: Gan Qixin <ganqixin@huawei.com>
> > ---
> > Cc: Michael S. Tsirkin <mst@redhat.com>
> > ---
> >  hw/mem/pc-dimm.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c index
> > 2ffc986734..017146e3d1 100644
> > --- a/hw/mem/pc-dimm.c
> > +++ b/hw/mem/pc-dimm.c
> > @@ -282,6 +282,7 @@ static void pc_dimm_class_init(ObjectClass *oc,
> void *data)
> >      mdc->get_plugged_size = memory_device_get_region_size;
> >      mdc->get_memory_region = pc_dimm_md_get_memory_region;
> >      mdc->fill_device_info = pc_dimm_md_fill_device_info;
> > +    set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
> 
> Any reason why pc-dimm would be in the storage category?

Hi Pankaj,
Thanks for you reply. As far as I know, pc-dimm is a dimm device for memory hotplug, described as a "DIMM memory module" in "-device help". 
This device looks related to storage, so I put it into the "storage" category to make it easy to find. I'm not sure if this is appropriate, do you have any better ideas?

Gan Qixin

> 
> >  }
> >
> >  static TypeInfo pc_dimm_info = {
> > --
> > 2.23.0
> >
> >
Pankaj Gupta Dec. 4, 2020, 7:13 a.m. UTC | #3
>      mdc->get_memory_region = pc_dimm_md_get_memory_region;
> > >      mdc->fill_device_info = pc_dimm_md_fill_device_info;
> > > +    set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
> >
> > Any reason why pc-dimm would be in the storage category?
...
> Thanks for you reply. As far as I know, pc-dimm is a dimm device for memory hotplug, described as a "DIMM memory module" in "-device help".
> This device looks related to storage, so I put it into the "storage" category to make it easy to find. I'm not sure if this is appropriate, do you have any better ideas?

O.k. I see storage & memory as different devices. Since we don't have
any memory device type defined, maybe its okay to put it in MISC
device.

Thanks,
Pankaj
Gan Qixin Dec. 7, 2020, 9:09 a.m. UTC | #4
> -----Original Message-----
> From: Pankaj Gupta [mailto:pankaj.gupta.linux@gmail.com]
> Sent: Friday, December 4, 2020 3:13 PM
> To: ganqixin <ganqixin@huawei.com>
> Cc: Qemu Developers <qemu-devel@nongnu.org>;
> qemu-trivial@nongnu.org; Chenqun (kuhn)
> <kuhn.chenqun@huawei.com>; thuth@redhat.com; Zhanghailiang
> <zhang.zhanghailiang@huawei.com>; Michael S . Tsirkin <mst@redhat.com>
> Subject: Re: [PATCH v2 01/12] pc-dimm: put it into the 'storage' category
> 
>  >      mdc->get_memory_region =
> pc_dimm_md_get_memory_region;
> > > >      mdc->fill_device_info = pc_dimm_md_fill_device_info;
> > > > +    set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
> > >
> > > Any reason why pc-dimm would be in the storage category?
> ...
> > Thanks for you reply. As far as I know, pc-dimm is a dimm device for
> memory hotplug, described as a "DIMM memory module" in "-device
> help".
> > This device looks related to storage, so I put it into the "storage"
> category to make it easy to find. I'm not sure if this is appropriate, do you
> have any better ideas?
> 
> O.k. I see storage & memory as different devices. Since we don't have any
> memory device type defined, maybe its okay to put it in MISC device.

You're right. Maybe I should send a separate patch to add the "memory" category and move the memory device from "uncategorized" and "misc" to "memory".

Thanks,
Gan Qixin

> 
> Thanks,
> Pankaj
diff mbox series

Patch

diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c
index 2ffc986734..017146e3d1 100644
--- a/hw/mem/pc-dimm.c
+++ b/hw/mem/pc-dimm.c
@@ -282,6 +282,7 @@  static void pc_dimm_class_init(ObjectClass *oc, void *data)
     mdc->get_plugged_size = memory_device_get_region_size;
     mdc->get_memory_region = pc_dimm_md_get_memory_region;
     mdc->fill_device_info = pc_dimm_md_fill_device_info;
+    set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
 }
 
 static TypeInfo pc_dimm_info = {