@@ -579,6 +579,7 @@ static void xen_disk_class_init(ObjectClass *class, void *data)
DeviceClass *dev_class = DEVICE_CLASS(class);
XenBlockDeviceClass *blockdev_class = XEN_BLOCK_DEVICE_CLASS(class);
+ set_bit(DEVICE_CATEGORY_STORAGE, dev_class->categories);
blockdev_class->realize = xen_disk_realize;
blockdev_class->unrealize = xen_disk_unrealize;
@@ -624,8 +625,9 @@ static void xen_cdrom_realize(XenBlockDevice *blockdev, Error **errp)
static void xen_cdrom_class_init(ObjectClass *class, void *data)
{
DeviceClass *dev_class = DEVICE_CLASS(class);
- XenBlockDeviceClass *blockdev_class = XEN_BLOCK_DEVICE_CLASS(class);
+ XenBlockDeviceClass *blockdev_class = XEN_BLOCK_DEVICE_CLASS(class);
+ set_bit(DEVICE_CATEGORY_STORAGE, dev_class->categories);
blockdev_class->realize = xen_cdrom_realize;
blockdev_class->unrealize = xen_cdrom_unrealize;
@@ -143,7 +143,8 @@ static Property i82374_properties[] = {
static void i82374_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
-
+
+ set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
dc->realize = i82374_realize;
dc->vmsd = &vmstate_i82374;
dc->props = i82374_properties;
@@ -1594,6 +1594,7 @@ static void amdvi_class_init(ObjectClass *klass, void* data)
DeviceClass *dc = DEVICE_CLASS(klass);
X86IOMMUClass *dc_class = X86_IOMMU_CLASS(klass);
+ set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
dc->reset = amdvi_reset;
dc->vmsd = &vmstate_amdvi;
dc->hotpluggable = false;
@@ -1611,8 +1612,16 @@ 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_BRIDGE, dc->categories);
+}
+
static const TypeInfo amdviPCI = {
.name = "AMDVI-PCI",
+ .class_init = amdvi_pci_class_init,
.parent = TYPE_PCI_DEVICE,
.instance_size = sizeof(AMDVIPCIState),
.interfaces = (InterfaceInfo[]) {
@@ -3719,6 +3719,7 @@ static void vtd_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
X86IOMMUClass *x86_class = X86_IOMMU_CLASS(klass);
+ set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
dc->reset = vtd_reset;
dc->vmsd = &vtd_vmstate;
dc->props = vtd_properties;
@@ -910,6 +910,7 @@ static void isa_bridge_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
+ set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
dc->desc = "ISA bridge faked to support IGD PT";
k->vendor_id = PCI_VENDOR_ID_INTEL;
k->class_id = PCI_CLASS_BRIDGE_ISA;
@@ -126,6 +126,7 @@ static void xen_pv_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
+ set_bit(DEVICE_CATEGORY_MISC, dc->categories);
k->realize = xen_pv_realize;
k->class_id = PCI_CLASS_SYSTEM_OTHER;
dc->desc = "Xen PV Device";
@@ -521,6 +521,7 @@ static void ipmi_bmc_extern_class_init(ObjectClass *oc, void *data)
DeviceClass *dc = DEVICE_CLASS(oc);
IPMIBmcClass *bk = IPMI_BMC_CLASS(oc);
+ set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
bk->handle_command = ipmi_bmc_extern_handle_command;
bk->handle_reset = ipmi_bmc_extern_handle_reset;
dc->hotpluggable = false;
@@ -2012,6 +2012,7 @@ static void ipmi_sim_class_init(ObjectClass *oc, void *data)
DeviceClass *dc = DEVICE_CLASS(oc);
IPMIBmcClass *bk = IPMI_BMC_CLASS(oc);
+ set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
dc->hotpluggable = false;
dc->realize = ipmi_sim_realize;
dc->props = ipmi_sim_properties;
@@ -539,6 +539,7 @@ static void isa_ipmi_bt_class_init(ObjectClass *oc, void *data)
DeviceClass *dc = DEVICE_CLASS(oc);
IPMIInterfaceClass *iic = IPMI_INTERFACE_CLASS(oc);
+ set_bit(DEVICE_CATEGORY_MISC, dc->categories);
dc->realize = isa_ipmi_bt_realize;
dc->props = ipmi_isa_properties;
@@ -522,6 +522,7 @@ static void isa_ipmi_kcs_class_init(ObjectClass *oc, void *data)
DeviceClass *dc = DEVICE_CLASS(oc);
IPMIInterfaceClass *iic = IPMI_INTERFACE_CLASS(oc);
+ set_bit(DEVICE_CATEGORY_MISC, dc->categories);
dc->realize = ipmi_isa_realize;
dc->props = ipmi_isa_properties;
@@ -197,6 +197,7 @@ static void nvdimm_class_init(ObjectClass *oc, void *data)
NVDIMMClass *nvc = NVDIMM_CLASS(oc);
DeviceClass *dc = DEVICE_CLASS(oc);
+ set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
ddc->realize = nvdimm_realize;
mdc->get_memory_region = nvdimm_md_get_memory_region;
dc->props = nvdimm_properties;
@@ -255,6 +255,7 @@ static void pc_dimm_class_init(ObjectClass *oc, void *data)
PCDIMMDeviceClass *ddc = PC_DIMM_CLASS(oc);
MemoryDeviceClass *mdc = MEMORY_DEVICE_CLASS(oc);
+ set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
dc->realize = pc_dimm_realize;
dc->unrealize = pc_dimm_unrealize;
dc->props = pc_dimm_properties;
@@ -1016,6 +1016,7 @@ static void tpm_tis_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
TPMIfClass *tc = TPM_IF_CLASS(klass);
+ set_bit(DEVICE_CATEGORY_MISC, dc->categories);
dc->realize = tpm_tis_realizefn;
dc->props = tpm_tis_properties;
dc->reset = tpm_tis_reset;