Skip to contentSkip to conversation

s390x: sort some devices into categories

PATCH Applied Cornelia Huck 3 participants 5 messages Oct 4, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 s390x: sort some devices into categories

Add missing categorizations for some s390x devices:
- zpci device -> misc
- 3270 -> display
- vfio-ccw -> misc

---
 hw/s390x/3270-ccw.c     | 1 +
 hw/s390x/s390-pci-bus.c | 1 +
 hw/vfio/ccw.c           | 1 +
 3 files changed, 3 insertions(+)
hw/s390x/3270-ccw.c +1 -0
index eaca28e224..081e3ef6f4 100644
@@ -160,6 +160,7 @@ static void emulated_ccw_3270_class_init(ObjectClass *klass, void *data)
     dc->bus_type = TYPE_VIRTUAL_CSS_BUS;
     dc->realize = emulated_ccw_3270_realize;
     dc->hotpluggable = false;
+    set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
 }
 
 static const TypeInfo emulated_ccw_3270_info = {
hw/s390x/s390-pci-bus.c +1 -0
index 3b9965fde0..96116b7d1e 100644
@@ -1032,6 +1032,7 @@ static void s390_pci_device_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
 
     dc->desc = "zpci device";
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
     dc->reset = s390_pci_device_reset;
     dc->bus_type = TYPE_S390_PCI_BUS;
     dc->realize = s390_pci_device_realize;
hw/vfio/ccw.c +1 -0
index a8baadf57a..76323c6bde 100644
@@ -413,6 +413,7 @@ static void vfio_ccw_class_init(ObjectClass *klass, void *data)
     dc->props = vfio_ccw_properties;
     dc->vmsd = &vfio_ccw_vmstate;
     dc->desc = "VFIO-based subchannel assignment";
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
     dc->realize = vfio_ccw_realize;
     dc->unrealize = vfio_ccw_unrealize;
     dc->reset = vfio_ccw_reset;
Signature · 1 line
2.13.6
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Cornelia Huck

Add missing categorizations for some s390x devices:
- zpci device -> misc
- 3270 -> display
- vfio-ccw -> misc

Quoted 43 lines
---
 hw/s390x/3270-ccw.c     | 1 +
 hw/s390x/s390-pci-bus.c | 1 +
 hw/vfio/ccw.c           | 1 +
 3 files changed, 3 insertions(+)
hw/s390x/3270-ccw.c +1 -0
index eaca28e224..081e3ef6f4 100644
@@ -160,6 +160,7 @@ static void emulated_ccw_3270_class_init(ObjectClass *klass, void *data)
     dc->bus_type = TYPE_VIRTUAL_CSS_BUS;
     dc->realize = emulated_ccw_3270_realize;
     dc->hotpluggable = false;
+    set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
 }
 
 static const TypeInfo emulated_ccw_3270_info = {
hw/s390x/s390-pci-bus.c +1 -0
index 3b9965fde0..96116b7d1e 100644
@@ -1032,6 +1032,7 @@ static void s390_pci_device_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
 
     dc->desc = "zpci device";
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
     dc->reset = s390_pci_device_reset;
     dc->bus_type = TYPE_S390_PCI_BUS;
     dc->realize = s390_pci_device_realize;
hw/vfio/ccw.c +1 -0
index a8baadf57a..76323c6bde 100644
@@ -413,6 +413,7 @@ static void vfio_ccw_class_init(ObjectClass *klass, void *data)
     dc->props = vfio_ccw_properties;
     dc->vmsd = &vfio_ccw_vmstate;
     dc->desc = "VFIO-based subchannel assignment";
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
     dc->realize = vfio_ccw_realize;
     dc->unrealize = vfio_ccw_unrealize;
     dc->reset = vfio_ccw_reset;
Reviewed-by on v1 1/1
#2 lore raw
In reply to Cornelia Huck
Quoted 17 lines · Cornelia Huck

Add missing categorizations for some s390x devices:
- zpci device -> misc
- 3270 -> display
- vfio-ccw -> misc

---
 hw/s390x/3270-ccw.c     | 1 +
 hw/s390x/s390-pci-bus.c | 1 +
 hw/vfio/ccw.c           | 1 +
 3 files changed, 3 insertions(+)
hw/s390x/3270-ccw.c +0 -0
index eaca28e224..081e3ef6f4 100644

hw/s390x/3270-ccw.c static void emulated_ccw_3270_class_init(ObjectClass *klass, void *data) · line 163

Quoted 4 lines
hw/s390x/3270-ccw.c +1 -0
@@ -160,6 +160,7 @@ static void emulated_ccw_3270_class_init(ObjectClass *klass, void *data)
     dc->bus_type = TYPE_VIRTUAL_CSS_BUS;
     dc->realize = emulated_ccw_3270_realize;
     dc->hotpluggable = false;
+    set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);

While you're at it, add a proper dc->desc ?

hw/s390x/s390-pci-bus.c static void s390_pci_device_class_init(ObjectClass *klass, void *data) · line 1034

Quoted 11 lines
hw/s390x/3270-ccw.c +0 -0
 }
 
 static const TypeInfo emulated_ccw_3270_info = {
hw/s390x/s390-pci-bus.c +0 -0
index 3b9965fde0..96116b7d1e 100644
@@ -1032,6 +1032,7 @@ static void s390_pci_device_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
 
     dc->desc = "zpci device";

While you're at it, add better desc?

Quoted 10 lines
hw/s390x/s390-pci-bus.c +1 -0
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
     dc->reset = s390_pci_device_reset;
     dc->bus_type = TYPE_S390_PCI_BUS;
     dc->realize = s390_pci_device_realize;
hw/vfio/ccw.c +0 -0
index a8baadf57a..76323c6bde 100644

hw/vfio/ccw.c static void vfio_ccw_class_init(ObjectClass *klass, void *data) · line 419

Quoted 7 lines
hw/vfio/ccw.c +1 -0
@@ -413,6 +413,7 @@ static void vfio_ccw_class_init(ObjectClass *klass, void *data)
     dc->props = vfio_ccw_properties;
     dc->vmsd = &vfio_ccw_vmstate;
     dc->desc = "VFIO-based subchannel assignment";
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
     dc->realize = vfio_ccw_realize;
     dc->unrealize = vfio_ccw_unrealize;
     dc->reset = vfio_ccw_reset;

Anyway, it's also fine without better descs, so:

#3 lore raw
Quoted 35 lines · On Wed, 4 Oct 2017 11:20:00 +0200 Thomas Huth <[email protected]> wrote:
Quoted 17 lines · Cornelia Huck

Add missing categorizations for some s390x devices:
- zpci device -> misc
- 3270 -> display
- vfio-ccw -> misc

---
 hw/s390x/3270-ccw.c     | 1 +
 hw/s390x/s390-pci-bus.c | 1 +
 hw/vfio/ccw.c           | 1 +
 3 files changed, 3 insertions(+)
hw/s390x/3270-ccw.c +0 -0
index eaca28e224..081e3ef6f4 100644

hw/s390x/3270-ccw.c static void emulated_ccw_3270_class_init(ObjectClass *klass, void *data) · line 163

Quoted 4 lines
hw/s390x/3270-ccw.c +1 -0
@@ -160,6 +160,7 @@ static void emulated_ccw_3270_class_init(ObjectClass *klass, void *data)
     dc->bus_type = TYPE_VIRTUAL_CSS_BUS;
     dc->realize = emulated_ccw_3270_realize;
     dc->hotpluggable = false;
+    set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);  

While you're at it, add a proper dc->desc ?

Quoted 10 lines
hw/s390x/3270-ccw.c +0 -0
 }
 
 static const TypeInfo emulated_ccw_3270_info = {
hw/s390x/s390-pci-bus.c +0 -0
index 3b9965fde0..96116b7d1e 100644
@@ -1032,6 +1032,7 @@ static void s390_pci_device_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
 
Quoted 3 lines

hw/s390x/s390-pci-bus.c static void s390_pci_device_class_init(ObjectClass *klass, void *data) · line 1034

Quoted 1 line
hw/s390x/s390-pci-bus.c +0 -0
     dc->desc = "zpci device";  

While you're at it, add better desc?

Hey, it's not wrong :) (and I can't really think of a good one...)

Quoted 22 lines
Quoted 11 lines
hw/s390x/s390-pci-bus.c +1 -0
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
     dc->reset = s390_pci_device_reset;
     dc->bus_type = TYPE_S390_PCI_BUS;
     dc->realize = s390_pci_device_realize;
hw/vfio/ccw.c +0 -0
index a8baadf57a..76323c6bde 100644

hw/vfio/ccw.c static void vfio_ccw_class_init(ObjectClass *klass, void *data) · line 419

Quoted 7 lines
hw/vfio/ccw.c +1 -0
@@ -413,6 +413,7 @@ static void vfio_ccw_class_init(ObjectClass *klass, void *data)
     dc->props = vfio_ccw_properties;
     dc->vmsd = &vfio_ccw_vmstate;
     dc->desc = "VFIO-based subchannel assignment";
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
     dc->realize = vfio_ccw_realize;
     dc->unrealize = vfio_ccw_unrealize;
     dc->reset = vfio_ccw_reset;

Anyway, it's also fine without better descs, so: