Skip to contentSkip to conversation

Categorize some uncategorized devices

PATCH Applied Gan Qixin 7 participants 31 messages Nov 30, 2020 – Apr 30, 2021

v2 of 3 Applied Latest is v3 →

lore
Share & tools
lore

Gan Qixin

author
#0 lore raw

v2 cover Categorize some uncategorized devices

v1->v2:

-Patch2: Add Pankaj Gupta reviewed tag.
-Patch3: Add Philippe Mathieu-Daudé reviewed tag.
-Patch9:
Changes suggested by Gerd Hoffmann:
Put u2f-passthru into 'misc' category.
-Patch12:
Add Alistair Francis and Philippe Mathieu-Daudé reviewed tag.
-Patch13:
bcm2835_cprman is not an usable device, so delete the patch that categorize
it.

Gan Qixin (12):
pc-dimm: put it into the 'storage' category
virtio-pmem: put it into the 'storage' category
vmmouse: put it into the 'input' category
nvdimm: put it into the 'storage' category
mc146818rtc: put it into the 'misc' category
ipmi: put some ipmi devices into the correct category
tpm: put some tpm devices into the correct category
AMDVI-PCI: put it into the 'misc' category
u2f-passthru: put it into the 'misc' category
tosa-ssp: put it into the 'misc' category
spitz: put some Spitz-family devices into the correct category SPI flash devices: put them into the 'storage' category

 hw/arm/spitz.c            | 2 ++
 hw/arm/tosa.c             | 2 ++
 hw/block/m25p80.c         | 1 +
 hw/i386/amd_iommu.c       | 8 ++++++++
 hw/i386/vmmouse.c         | 1 +
 hw/ipmi/ipmi_bmc_extern.c | 1 +
 hw/ipmi/ipmi_bmc_sim.c    | 1 +
 hw/ipmi/isa_ipmi_bt.c     | 1 +
 hw/ipmi/isa_ipmi_kcs.c    | 1 +
 hw/ipmi/pci_ipmi_bt.c     | 1 +
 hw/ipmi/pci_ipmi_kcs.c    | 1 +
 hw/mem/nvdimm.c           | 1 +
 hw/mem/pc-dimm.c          | 1 +
 hw/rtc/mc146818rtc.c      | 1 +
 hw/tpm/tpm_tis_isa.c      | 1 +
 hw/tpm/tpm_tis_sysbus.c   | 1 +
 hw/usb/u2f-passthru.c     | 1 +
 hw/virtio/virtio-pmem.c   | 1 +
 18 files changed, 27 insertions(+)
Signature · 1 line
2.23.0
author
#1 lore raw

PATCH v2 1/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.

---
Cc: Michael S. Tsirkin <[email protected]>

---
 hw/mem/pc-dimm.c | 1 +
 1 file changed, 1 insertion(+)
hw/mem/pc-dimm.c +1 -0
index 2ffc986734..017146e3d1 100644
@@ -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 = {
Signature · 1 line
2.23.0
#2 lore raw

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

Quoted 15 lines

The category of the pc-dimm device is not set, put it into the 'storage' category.

---
Cc: Michael S. Tsirkin <[email protected]>

---
 hw/mem/pc-dimm.c | 1 +
 1 file changed, 1 insertion(+)
hw/mem/pc-dimm.c +0 -0
index 2ffc986734..017146e3d1 100644

hw/mem/pc-dimm.c static void pc_dimm_class_init(ObjectClass *oc, void *data) · line 285

Quoted 4 lines
hw/mem/pc-dimm.c +1 -0
@@ -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?

Quoted 7 lines
hw/mem/pc-dimm.c +0 -1
 }
 
 static TypeInfo pc_dimm_info = {
--

2.23.0

author
#3 lore raw

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

Quoted 26 lines

-----Original Message-----
From: Pankaj Gupta [mailto:[email protected]]
Sent: Monday, November 30, 2020 6:19 PM
To: ganqixin <[email protected]>
Cc: Qemu Developers <[email protected]>; [email protected]; Chenqun (kuhn) <[email protected]>; [email protected]; Zhanghailiang <[email protected]>; Michael S . Tsirkin <[email protected]>
Subject: Re: [PATCH v2 01/12] pc-dimm: put it into the 'storage' category

hw/mem/pc-dimm.c static void pc_dimm_class_init(ObjectClass *oc,

Quoted 15 lines

The category of the pc-dimm device is not set, put it into the 'storage' category.

---
Cc: Michael S. Tsirkin <[email protected]>

---
 hw/mem/pc-dimm.c | 1 +
 1 file changed, 1 insertion(+)
hw/mem/pc-dimm.c index renamed from hw/mem/pc-dimm.c +0 -0

2ffc986734..017146e3d1 100644

hw/mem/pc-dimm.c +0 -0
@@ -282,6 +282,7 @@ static void pc_dimm_class_init(ObjectClass *oc,

void *data)

Quoted 6 lines

hw/mem/pc-dimm.c static void pc_dimm_class_init(ObjectClass *oc, void *data) · line 285

Quoted 4 lines
hw/mem/pc-dimm.c +1 -0
     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

Quoted 8 lines
Quoted 8 lines
hw/mem/pc-dimm.c +0 -1
 }
 
 static TypeInfo pc_dimm_info = {
--

2.23.0

#4 lore raw

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

Quoted 5 lines
     mdc->get_memory_region = pc_dimm_md_get_memory_region;
Quoted 4 lines
Quoted 2 lines
     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?

...

Quoted 2 lines

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

author
#5 lore raw

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

Quoted 18 lines

-----Original Message-----
From: Pankaj Gupta [mailto:[email protected]]
Sent: Friday, December 4, 2020 3:13 PM
To: ganqixin <[email protected]>
Cc: Qemu Developers <[email protected]>; [email protected]; Chenqun (kuhn) <[email protected]>; [email protected]; Zhanghailiang <[email protected]>; Michael S . Tsirkin <[email protected]>
Subject: Re: [PATCH v2 01/12] pc-dimm: put it into the 'storage' category

Quoted 1 line
     mdc->get_memory_region =

pc_dimm_md_get_memory_region;

Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
     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?

...

Quoted 1 line

Thanks for you reply. As far as I know, pc-dimm is a dimm device for

Quoted 8 lines

memory hotplug, described as a "DIMM memory module" in "-device help".

Quoted 1 line

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

Quoted 3 lines

Thanks,
Pankaj

author
#6 lore raw

PATCH v2 2/12 virtio-pmem: put it into the 'storage' category

In reply to Gan Qixin

The category of the virtio-pmem device is not set, put it into the 'storage' category.

---
Cc: Michael S. Tsirkin <[email protected]>

---
 hw/virtio/virtio-pmem.c | 1 +
 1 file changed, 1 insertion(+)
hw/virtio/virtio-pmem.c +1 -0
index ddb0125901..98b3139cd0 100644
@@ -175,6 +175,7 @@ static void virtio_pmem_class_init(ObjectClass *klass, void *data)
 
     vpc->fill_device_info = virtio_pmem_fill_device_info;
     vpc->get_memory_region = virtio_pmem_get_memory_region;
+    set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
 }
 
 static TypeInfo virtio_pmem_info = {
Signature · 1 line
2.23.0
#7 lore raw

Re: [PATCH v2 02/12] virtio-pmem: put it into the 'storage' category

Le 30/11/2020 à 09:36, Gan Qixin a écrit :

Quoted 17 lines

The category of the virtio-pmem device is not set, put it into the 'storage' category.

---
Cc: Michael S. Tsirkin <[email protected]>

---
 hw/virtio/virtio-pmem.c | 1 +
 1 file changed, 1 insertion(+)
hw/virtio/virtio-pmem.c +0 -0
index ddb0125901..98b3139cd0 100644

hw/virtio/virtio-pmem.c static void virtio_pmem_class_init(ObjectClass *klass, void *data) · line 181

Quoted 7 lines
hw/virtio/virtio-pmem.c +1 -0
@@ -175,6 +175,7 @@ static void virtio_pmem_class_init(ObjectClass *klass, void *data)
 
     vpc->fill_device_info = virtio_pmem_fill_device_info;
     vpc->get_memory_region = virtio_pmem_get_memory_region;
+    set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
 }
 
 static TypeInfo virtio_pmem_info = {

Applied to my trivial-patches branch.

Thanks,
Laurent

author
#8 lore raw

PATCH v2 3/12 vmmouse: put it into the 'input' category

In reply to Gan Qixin

The category of the vmmouse device is not set, put it into the 'input' category.

---
Cc: Michael S. Tsirkin <[email protected]>

---
 hw/i386/vmmouse.c | 1 +
 1 file changed, 1 insertion(+)
hw/i386/vmmouse.c +1 -0
index a3556438f0..df4798f502 100644
@@ -308,6 +308,7 @@ static void vmmouse_class_initfn(ObjectClass *klass, void *data)
     dc->reset = vmmouse_reset;
     dc->vmsd = &vmstate_vmmouse;
     device_class_set_props(dc, vmmouse_properties);
+    set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
 
 static const TypeInfo vmmouse_info = {
Signature · 1 line
2.23.0
Reviewed-by on v2 3/12
#9 lore raw

Re: [PATCH v2 03/12] vmmouse: put it into the 'input' category

Quoted 17 lines · Gan Qixin

The category of the vmmouse device is not set, put it into the 'input' category.

---
Cc: Michael S. Tsirkin <[email protected]>

---
 hw/i386/vmmouse.c | 1 +
 1 file changed, 1 insertion(+)
hw/i386/vmmouse.c +0 -0
index a3556438f0..df4798f502 100644

hw/i386/vmmouse.c static void vmmouse_class_initfn(ObjectClass *klass, void *data) · line 314

Quoted 7 lines
hw/i386/vmmouse.c +1 -0
@@ -308,6 +308,7 @@ static void vmmouse_class_initfn(ObjectClass *klass, void *data)
     dc->reset = vmmouse_reset;
     dc->vmsd = &vmstate_vmmouse;
     device_class_set_props(dc, vmmouse_properties);
+    set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
 
 static const TypeInfo vmmouse_info = {
#10 lore raw

Re: [PATCH v2 03/12] vmmouse: put it into the 'input' category

In reply to Gan Qixin

Le 30/11/2020 à 09:36, Gan Qixin a écrit :

Quoted 17 lines

The category of the vmmouse device is not set, put it into the 'input' category.

---
Cc: Michael S. Tsirkin <[email protected]>

---
 hw/i386/vmmouse.c | 1 +
 1 file changed, 1 insertion(+)
hw/i386/vmmouse.c +0 -0
index a3556438f0..df4798f502 100644

hw/i386/vmmouse.c static void vmmouse_class_initfn(ObjectClass *klass, void *data) · line 314

Quoted 7 lines
hw/i386/vmmouse.c +1 -0
@@ -308,6 +308,7 @@ static void vmmouse_class_initfn(ObjectClass *klass, void *data)
     dc->reset = vmmouse_reset;
     dc->vmsd = &vmstate_vmmouse;
     device_class_set_props(dc, vmmouse_properties);
+    set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
 
 static const TypeInfo vmmouse_info = {

Applied to my trivial-patches branch.

Thanks,
Laurent

author
#11 lore raw

PATCH v2 4/12 nvdimm: put it into the 'storage' category

In reply to Gan Qixin

The category of the nvdimm device is not set, put it into the 'storage' category.

---
Cc: Xiao Guangrong <[email protected]>

---
 hw/mem/nvdimm.c | 1 +
 1 file changed, 1 insertion(+)
hw/mem/nvdimm.c +1 -0
index e1574bc07c..e30695b2ce 100644
@@ -236,6 +236,7 @@ static void nvdimm_class_init(ObjectClass *oc, void *data)
 
     nvc->read_label_data = nvdimm_read_label_data;
     nvc->write_label_data = nvdimm_write_label_data;
+    set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
 }
 
 static TypeInfo nvdimm_info = {
Signature · 1 line
2.23.0
Reviewed-by on v2 4/12
#12 lore raw

Re: [PATCH v2 04/12] nvdimm: put it into the 'storage' category

Quoted 15 lines

The category of the nvdimm device is not set, put it into the 'storage' category.

---
Cc: Xiao Guangrong <[email protected]>

---
 hw/mem/nvdimm.c | 1 +
 1 file changed, 1 insertion(+)
hw/mem/nvdimm.c +0 -0
index e1574bc07c..e30695b2ce 100644

hw/mem/nvdimm.c static void nvdimm_class_init(ObjectClass *oc, void *data) · line 242

Quoted 7 lines
hw/mem/nvdimm.c +1 -0
@@ -236,6 +236,7 @@ static void nvdimm_class_init(ObjectClass *oc, void *data)
 
     nvc->read_label_data = nvdimm_read_label_data;
     nvc->write_label_data = nvdimm_write_label_data;
+    set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
 }
 
 static TypeInfo nvdimm_info = {
Reviewed-by on v2 4/12
#13 lore raw

Re: [PATCH v2 04/12] nvdimm: put it into the 'storage' category

In reply to Gan Qixin
Quoted 16 lines · Gan Qixin

The category of the nvdimm device is not set, put it into the 'storage' category.

---
Cc: Xiao Guangrong <[email protected]>

---
 hw/mem/nvdimm.c | 1 +
 1 file changed, 1 insertion(+)
hw/mem/nvdimm.c +0 -0
index e1574bc07c..e30695b2ce 100644

hw/mem/nvdimm.c static void nvdimm_class_init(ObjectClass *oc, void *data) · line 242

Quoted 7 lines
hw/mem/nvdimm.c +1 -0
@@ -236,6 +236,7 @@ static void nvdimm_class_init(ObjectClass *oc, void *data)
 
     nvc->read_label_data = nvdimm_read_label_data;
     nvc->write_label_data = nvdimm_write_label_data;
+    set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
 }
 
 static TypeInfo nvdimm_info = {
#14 lore raw

Re: [PATCH v2 04/12] nvdimm: put it into the 'storage' category

In reply to Gan Qixin

Le 30/11/2020 à 09:36, Gan Qixin a écrit :

Quoted 16 lines

The category of the nvdimm device is not set, put it into the 'storage' category.

---
Cc: Xiao Guangrong <[email protected]>

---
 hw/mem/nvdimm.c | 1 +
 1 file changed, 1 insertion(+)
hw/mem/nvdimm.c +0 -0
index e1574bc07c..e30695b2ce 100644

hw/mem/nvdimm.c static void nvdimm_class_init(ObjectClass *oc, void *data) · line 242

Quoted 7 lines
hw/mem/nvdimm.c +1 -0
@@ -236,6 +236,7 @@ static void nvdimm_class_init(ObjectClass *oc, void *data)
 
     nvc->read_label_data = nvdimm_read_label_data;
     nvc->write_label_data = nvdimm_write_label_data;
+    set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
 }
 
 static TypeInfo nvdimm_info = {

Applied to my trivial-patches branch.

Thanks,
Laurent

author
#15 lore raw

PATCH v2 5/12 mc146818rtc: put it into the 'misc' category

In reply to Gan Qixin

The category of the mc146818rtc device is not set, put it into the 'misc' category.

---
Cc: Michael S. Tsirkin <[email protected]>

---
 hw/rtc/mc146818rtc.c | 1 +
 1 file changed, 1 insertion(+)
hw/rtc/mc146818rtc.c +1 -0
index 7a38540cb9..39edca0996 100644
@@ -1039,6 +1039,7 @@ static void rtc_class_initfn(ObjectClass *klass, void *data)
     dc->vmsd = &vmstate_rtc;
     isa->build_aml = rtc_build_aml;
     device_class_set_props(dc, mc146818rtc_properties);
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
 }
 
 static const TypeInfo mc146818rtc_info = {
Signature · 1 line
2.23.0
Reviewed-by on v2 5/12
#16 lore raw

Re: [PATCH v2 05/12] mc146818rtc: put it into the 'misc' category

Quoted 15 lines · Gan Qixin

The category of the mc146818rtc device is not set, put it into the 'misc' category.

---
Cc: Michael S. Tsirkin <[email protected]>

---
 hw/rtc/mc146818rtc.c | 1 +
 1 file changed, 1 insertion(+)
hw/rtc/mc146818rtc.c +0 -0
index 7a38540cb9..39edca0996 100644

hw/rtc/mc146818rtc.c static void rtc_class_initfn(ObjectClass *klass, void *data) · line 1043

Quoted 5 lines
hw/rtc/mc146818rtc.c +1 -0
@@ -1039,6 +1039,7 @@ static void rtc_class_initfn(ObjectClass *klass, void *data)
     dc->vmsd = &vmstate_rtc;
     isa->build_aml = rtc_build_aml;
     device_class_set_props(dc, mc146818rtc_properties);
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
 }

I wonder whether this device should be user_creatable at all (e.g. it uses a hard-coded IO port)... Anyway setting the category certainly does not hurt, thus:

#17 lore raw

Re: [PATCH v2 05/12] mc146818rtc: put it into the 'misc' category

Quoted 26 lines · Thomas Huth
Quoted 15 lines · Gan Qixin

The category of the mc146818rtc device is not set, put it into the 'misc' category.

---
Cc: Michael S. Tsirkin <[email protected]>

---
 hw/rtc/mc146818rtc.c | 1 +
 1 file changed, 1 insertion(+)
hw/rtc/mc146818rtc.c +0 -0
index 7a38540cb9..39edca0996 100644

hw/rtc/mc146818rtc.c static void rtc_class_initfn(ObjectClass *klass, void *data) · line 1043

Quoted 5 lines
hw/rtc/mc146818rtc.c +1 -0
@@ -1039,6 +1039,7 @@ static void rtc_class_initfn(ObjectClass *klass, void *data)
     dc->vmsd = &vmstate_rtc;
     isa->build_aml = rtc_build_aml;
     device_class_set_props(dc, mc146818rtc_properties);
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
 }

I wonder whether this device should be user_creatable at all (e.g. it uses a hard-coded IO port)... Anyway setting the category certainly does not hurt, thus:

Quoted 1 line

Can this go via qemu-trivial?

#18 lore raw

Re: [PATCH v2 05/12] mc146818rtc: put it into the 'misc' category

Le 24/03/2021 à 18:23, Philippe Mathieu-Daudé a écrit :

Quoted 27 lines · Thomas Huth
Quoted 26 lines · Gan Qixin
Quoted 15 lines

The category of the mc146818rtc device is not set, put it into the 'misc' category.

---
Cc: Michael S. Tsirkin <[email protected]>

---
 hw/rtc/mc146818rtc.c | 1 +
 1 file changed, 1 insertion(+)
hw/rtc/mc146818rtc.c +0 -0
index 7a38540cb9..39edca0996 100644

hw/rtc/mc146818rtc.c static void rtc_class_initfn(ObjectClass *klass, void *data) · line 1043

Quoted 5 lines
hw/rtc/mc146818rtc.c +1 -0
@@ -1039,6 +1039,7 @@ static void rtc_class_initfn(ObjectClass *klass, void *data)
     dc->vmsd = &vmstate_rtc;
     isa->build_aml = rtc_build_aml;
     device_class_set_props(dc, mc146818rtc_properties);
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
 }

I wonder whether this device should be user_creatable at all (e.g. it uses a hard-coded IO port)... Anyway setting the category certainly does not hurt, thus:

Quoted 4 lines
Quoted 1 line

Can this go via qemu-trivial?

Applied to my trivial-patches branch.

Thanks,
Laurent

author
#19 lore raw

PATCH v2 6/12 ipmi: put some ipmi devices into the correct category

In reply to Gan Qixin

Some ipmi devices have no category, put them into the correct category.

---
Cc: Corey Minyard <[email protected]>

---
 hw/ipmi/ipmi_bmc_extern.c | 1 +
 hw/ipmi/ipmi_bmc_sim.c    | 1 +
 hw/ipmi/isa_ipmi_bt.c     | 1 +
 hw/ipmi/isa_ipmi_kcs.c    | 1 +
 hw/ipmi/pci_ipmi_bt.c     | 1 +
 hw/ipmi/pci_ipmi_kcs.c    | 1 +
 6 files changed, 6 insertions(+)
hw/ipmi/ipmi_bmc_extern.c +1 -0
index c3f3306e66..aa8faf9a9b 100644
@@ -529,6 +529,7 @@ static void ipmi_bmc_extern_class_init(ObjectClass *oc, void *data)
     dc->hotpluggable = false;
     dc->realize = ipmi_bmc_extern_realize;
     device_class_set_props(dc, ipmi_bmc_extern_properties);
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
 }
 
 static const TypeInfo ipmi_bmc_extern_type = {
hw/ipmi/ipmi_bmc_sim.c +1 -0
index f78e92d3d5..611650f79e 100644
@@ -2214,6 +2214,7 @@ static void ipmi_sim_class_init(ObjectClass *oc, void *data)
     dc->realize = ipmi_sim_realize;
     device_class_set_props(dc, ipmi_sim_properties);
     bk->handle_command = ipmi_sim_handle_command;
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
 }
 
 static const TypeInfo ipmi_sim_type = {
hw/ipmi/isa_ipmi_bt.c +1 -0
index b7c2ad557b..7fc6022f13 100644
@@ -152,6 +152,7 @@ static void isa_ipmi_bt_class_init(ObjectClass *oc, void *data)
     iic->get_backend_data = isa_ipmi_bt_get_backend_data;
     ipmi_bt_class_init(iic);
     iic->get_fwinfo = isa_ipmi_bt_get_fwinfo;
+    set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
 }
 
 static const TypeInfo isa_ipmi_bt_info = {
hw/ipmi/isa_ipmi_kcs.c +1 -0
index 7dd6bf0040..b50901fc3b 100644
@@ -159,6 +159,7 @@ static void isa_ipmi_kcs_class_init(ObjectClass *oc, void *data)
     iic->get_backend_data = isa_ipmi_kcs_get_backend_data;
     ipmi_kcs_class_init(iic);
     iic->get_fwinfo = isa_ipmi_kcs_get_fwinfo;
+    set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
 }
 
 static const TypeInfo isa_ipmi_kcs_info = {
hw/ipmi/pci_ipmi_bt.c +1 -0
index b6e52730d3..7d7435719a 100644
@@ -125,6 +125,7 @@ static void pci_ipmi_bt_class_init(ObjectClass *oc, void *data)
 
     iic->get_backend_data = pci_ipmi_bt_get_backend_data;
     ipmi_bt_class_init(iic);
+    set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
 }
 
 static const TypeInfo pci_ipmi_bt_info = {
hw/ipmi/pci_ipmi_kcs.c +1 -0
index de13418862..0f1a1e4098 100644
@@ -125,6 +125,7 @@ static void pci_ipmi_kcs_class_init(ObjectClass *oc, void *data)
 
     iic->get_backend_data = pci_ipmi_kcs_get_backend_data;
     ipmi_kcs_class_init(iic);
+    set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
 }
 
 static const TypeInfo pci_ipmi_kcs_info = {
Signature · 1 line
2.23.0
author
#20 lore raw

PATCH v2 7/12 tpm: put some tpm devices into the correct category

In reply to Gan Qixin

Some tpm devices have no category, put them into the correct category.

---
Cc: Stefan Berger <[email protected]>

---
 hw/tpm/tpm_tis_isa.c    | 1 +
 hw/tpm/tpm_tis_sysbus.c | 1 +
 2 files changed, 2 insertions(+)
hw/tpm/tpm_tis_isa.c +1 -0
index 6fd876eebf..10d8a14f19 100644
@@ -150,6 +150,7 @@ static void tpm_tis_isa_class_init(ObjectClass *klass, void *data)
     dc->reset = tpm_tis_isa_reset;
     tc->request_completed = tpm_tis_isa_request_completed;
     tc->get_version = tpm_tis_isa_get_tpm_version;
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
 }
 
 static const TypeInfo tpm_tis_isa_info = {
hw/tpm/tpm_tis_sysbus.c +1 -0
index 2c32aa7099..45e63efd63 100644
@@ -139,6 +139,7 @@ static void tpm_tis_sysbus_class_init(ObjectClass *klass, void *data)
     dc->reset = tpm_tis_sysbus_reset;
     tc->request_completed = tpm_tis_sysbus_request_completed;
     tc->get_version = tpm_tis_sysbus_get_tpm_version;
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
 }
 
 static const TypeInfo tpm_tis_sysbus_info = {
Signature · 1 line
2.23.0
Reviewed-by on v2 7/12
#21 lore raw

Re: [PATCH v2 07/12] tpm: put some tpm devices into the correct category

Quoted 27 lines · Gan Qixin

Some tpm devices have no category, put them into the correct category.

---
Cc: Stefan Berger <[email protected]>

---
  hw/tpm/tpm_tis_isa.c    | 1 +
  hw/tpm/tpm_tis_sysbus.c | 1 +
  2 files changed, 2 insertions(+)
hw/tpm/tpm_tis_isa.c +1 -0
index 6fd876eebf..10d8a14f19 100644
@@ -150,6 +150,7 @@ static void tpm_tis_isa_class_init(ObjectClass *klass, void *data)
      dc->reset = tpm_tis_isa_reset;
      tc->request_completed = tpm_tis_isa_request_completed;
      tc->get_version = tpm_tis_isa_get_tpm_version;
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
  }
 
  static const TypeInfo tpm_tis_isa_info = {
hw/tpm/tpm_tis_sysbus.c +0 -0
index 2c32aa7099..45e63efd63 100644

hw/tpm/tpm_tis_sysbus.c static void tpm_tis_sysbus_class_init(ObjectClass *klass, void *data) · line 145

Quoted 7 lines
hw/tpm/tpm_tis_sysbus.c +1 -0
@@ -139,6 +139,7 @@ static void tpm_tis_sysbus_class_init(ObjectClass *klass, void *data)
      dc->reset = tpm_tis_sysbus_reset;
      tc->request_completed = tpm_tis_sysbus_request_completed;
      tc->get_version = tpm_tis_sysbus_get_tpm_version;
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
  }
 
  static const TypeInfo tpm_tis_sysbus_info = {
#22 lore raw

Re: [PATCH v2 07/12] tpm: put some tpm devices into the correct category

In reply to Gan Qixin

Le 30/11/2020 à 09:36, Gan Qixin a écrit :

Quoted 28 lines

Some tpm devices have no category, put them into the correct category.

---
Cc: Stefan Berger <[email protected]>

---
 hw/tpm/tpm_tis_isa.c    | 1 +
 hw/tpm/tpm_tis_sysbus.c | 1 +
 2 files changed, 2 insertions(+)
hw/tpm/tpm_tis_isa.c +1 -0
index 6fd876eebf..10d8a14f19 100644
@@ -150,6 +150,7 @@ static void tpm_tis_isa_class_init(ObjectClass *klass, void *data)
     dc->reset = tpm_tis_isa_reset;
     tc->request_completed = tpm_tis_isa_request_completed;
     tc->get_version = tpm_tis_isa_get_tpm_version;
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
 }
 
 static const TypeInfo tpm_tis_isa_info = {
hw/tpm/tpm_tis_sysbus.c +0 -0
index 2c32aa7099..45e63efd63 100644

hw/tpm/tpm_tis_sysbus.c static void tpm_tis_sysbus_class_init(ObjectClass *klass, void *data) · line 145

Quoted 7 lines
hw/tpm/tpm_tis_sysbus.c +1 -0
@@ -139,6 +139,7 @@ static void tpm_tis_sysbus_class_init(ObjectClass *klass, void *data)
     dc->reset = tpm_tis_sysbus_reset;
     tc->request_completed = tpm_tis_sysbus_request_completed;
     tc->get_version = tpm_tis_sysbus_get_tpm_version;
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
 }
 
 static const TypeInfo tpm_tis_sysbus_info = {

Applied to my trivial-patches branch.

Thanks,
Laurent

author
#23 lore raw

PATCH v2 8/12 AMDVI-PCI: put it into the 'misc' category

In reply to Gan Qixin

The category of the AMDVI-PCI device is not set, put it into the 'misc' category.

---
Cc: Paolo Bonzini <[email protected]>

---
 hw/i386/amd_iommu.c | 8 ++++++++
 1 file changed, 8 insertions(+)
hw/i386/amd_iommu.c +8 -0
index 74a93a5d93..1d4e488f7f 100644
@@ -1621,6 +1621,13 @@ static const TypeInfo amdvi = {
     .class_init = amdvi_class_init
 };
 
+static void amdvi_pci_class_init(ObjectClass *klass, void *data)
+{
+    DeviceClass *dc = DEVICE_CLASS(klass);
+
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
+}
+
 static const TypeInfo amdviPCI = {
     .name = TYPE_AMD_IOMMU_PCI,
     .parent = TYPE_PCI_DEVICE,
@@ -1629,6 +1636,7 @@ static const TypeInfo amdviPCI = {
         { INTERFACE_CONVENTIONAL_PCI_DEVICE },
         { },
     },
+    .class_init = amdvi_pci_class_init
 };
 
 static void amdvi_iommu_memory_region_class_init(ObjectClass *klass, void *data)
Signature · 1 line
2.23.0
author
#24 lore raw

PATCH v2 9/12 u2f-passthru: put it into the 'misc' category

In reply to Gan Qixin

The category of the u2f-passthru device is not set, put it into the 'misc' category.

---
Cc: Gerd Hoffmann <[email protected]>
Cc: Philippe Mathieu-Daudé <[email protected]>

---
 hw/usb/u2f-passthru.c | 1 +
 1 file changed, 1 insertion(+)
hw/usb/u2f-passthru.c +1 -0
index ae00e93f35..fc93429c9c 100644
@@ -534,6 +534,7 @@ static void u2f_passthru_class_init(ObjectClass *klass, void *data)
     dc->desc = "QEMU U2F passthrough key";
     dc->vmsd = &u2f_passthru_vmstate;
     device_class_set_props(dc, u2f_passthru_properties);
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
 }
 
 static const TypeInfo u2f_key_passthru_info = {
Signature · 1 line
2.23.0
Acked-by on v2 9/12
#25 lore raw

Re: [PATCH v2 09/12] u2f-passthru: put it into the 'misc' category

Quoted 2 lines · Gan Qixin

The category of the u2f-passthru device is not set, put it into the 'misc' category.

#26 lore raw

Re: [PATCH v2 09/12] u2f-passthru: put it into the 'misc' category

In reply to Gan Qixin

Le 30/11/2020 à 09:36, Gan Qixin a écrit :

Quoted 17 lines

The category of the u2f-passthru device is not set, put it into the 'misc' category.

---
Cc: Gerd Hoffmann <[email protected]>
Cc: Philippe Mathieu-Daudé <[email protected]>

---
 hw/usb/u2f-passthru.c | 1 +
 1 file changed, 1 insertion(+)
hw/usb/u2f-passthru.c +0 -0
index ae00e93f35..fc93429c9c 100644

hw/usb/u2f-passthru.c static void u2f_passthru_class_init(ObjectClass *klass, void *data) · line 540

Quoted 7 lines
hw/usb/u2f-passthru.c +1 -0
@@ -534,6 +534,7 @@ static void u2f_passthru_class_init(ObjectClass *klass, void *data)
     dc->desc = "QEMU U2F passthrough key";
     dc->vmsd = &u2f_passthru_vmstate;
     device_class_set_props(dc, u2f_passthru_properties);
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
 }
 
 static const TypeInfo u2f_key_passthru_info = {

Applied to my trivial-patches branch.

Thanks,
Laurent

author
#27 lore raw

PATCH v2 10/12 tosa-ssp: put it into the 'misc' category

In reply to Gan Qixin

The category of the tosa-ssp device is not set, put it into the 'misc' category.

---
Cc: Peter Maydell <[email protected]>

---
 hw/arm/tosa.c | 2 ++
 1 file changed, 2 insertions(+)
hw/arm/tosa.c +2 -0
index fe88ed89fe..0e3461c8ed 100644
@@ -292,10 +292,12 @@ static const TypeInfo tosa_dac_info = {
 
 static void tosa_ssp_class_init(ObjectClass *klass, void *data)
 {
+    DeviceClass *dc = DEVICE_CLASS(klass);
     SSISlaveClass *k = SSI_SLAVE_CLASS(klass);
 
     k->realize = tosa_ssp_realize;
     k->transfer = tosa_ssp_tansfer;
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
 }
 
 static const TypeInfo tosa_ssp_info = {
Signature · 1 line
2.23.0
author
#28 lore raw

PATCH v2 11/12 spitz: put some Spitz-family devices into the correct category

In reply to Gan Qixin

Some Spitz-family devices have no category, put them into the correct category.

---
Cc: Peter Maydell <[email protected]>

---
 hw/arm/spitz.c | 2 ++
 1 file changed, 2 insertions(+)
hw/arm/spitz.c +2 -0
index 32bdeacfd3..0e5e8a4634 100644
@@ -1218,6 +1218,7 @@ static void corgi_ssp_class_init(ObjectClass *klass, void *data)
     k->realize = corgi_ssp_realize;
     k->transfer = corgi_ssp_transfer;
     dc->vmsd = &vmstate_corgi_ssp_regs;
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
 }
 
 static const TypeInfo corgi_ssp_info = {
@@ -1247,6 +1248,7 @@ static void spitz_lcdtg_class_init(ObjectClass *klass, void *data)
     k->realize = spitz_lcdtg_realize;
     k->transfer = spitz_lcdtg_transfer;
     dc->vmsd = &vmstate_spitz_lcdtg_regs;
+    set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
 }
 
 static const TypeInfo spitz_lcdtg_info = {
Signature · 1 line
2.23.0
#29 lore raw

Re: [PATCH v2 11/12] spitz: put some Spitz-family devices into the correct category

Hi,

Quoted 14 lines · Gan Qixin

Some Spitz-family devices have no category, put them into the correct category.

---
Cc: Peter Maydell <[email protected]>

---
 hw/arm/spitz.c | 2 ++
 1 file changed, 2 insertions(+)
hw/arm/spitz.c +0 -0
index 32bdeacfd3..0e5e8a4634 100644

hw/arm/spitz.c static void corgi_ssp_class_init(ObjectClass *klass, void *data) · line 1221

Quoted 4 lines
hw/arm/spitz.c +1 -0
@@ -1218,6 +1218,7 @@ static void corgi_ssp_class_init(ObjectClass *klass, void *data)
     k->realize = corgi_ssp_realize;
     k->transfer = corgi_ssp_transfer;
     dc->vmsd = &vmstate_corgi_ssp_regs;
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);

OK.

hw/arm/spitz.c static void spitz_lcdtg_class_init(ObjectClass *klass, void *data) · line 1251

Quoted 8 lines
hw/arm/spitz.c +1 -0
 }
 
 static const TypeInfo corgi_ssp_info = {
@@ -1247,6 +1248,7 @@ static void spitz_lcdtg_class_init(ObjectClass *klass, void *data)
     k->realize = spitz_lcdtg_realize;
     k->transfer = spitz_lcdtg_transfer;
     dc->vmsd = &vmstate_spitz_lcdtg_regs;
+    set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);

This is not a display device, but a regulator to control the display backlight. DEVICE_CATEGORY_MISC seems more appropriate.

hw/arm/spitz.c static void spitz_lcdtg_class_init(ObjectClass *klass, void *data) · line 1254

Quoted 4 lines
hw/arm/spitz.c +0 -0
 }
 
 static const TypeInfo spitz_lcdtg_info = {

Regards,

Phil.

author
#30 lore raw

PATCH v2 12/12 SPI flash devices: put them into the 'storage' category

In reply to Gan Qixin

SPI flash devices have no category, put them into the 'storage' category.

---
 hw/block/m25p80.c | 1 +
 1 file changed, 1 insertion(+)
hw/block/m25p80.c +1 -0
index 483925f57a..8dd3ef8559 100644
@@ -1397,6 +1397,7 @@ static void m25p80_class_init(ObjectClass *klass, void *data)
     device_class_set_props(dc, m25p80_properties);
     dc->reset = m25p80_reset;
     mc->pi = data;
+    set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
 }
 
 static const TypeInfo m25p80_info = {
Signature · 1 line
2.23.0