devices: Associate devices to their logical category

The category will be used to sort the devices displayed in
the command line help.

Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>
Message-id: 1375107465-25767-4-git-send-email-marcel.a@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Marcel Apfelbaum 2013-07-29 17:17:45 +03:00 committed by Anthony Liguori
parent 3d1237fb2a
commit 125ee0ed9c
108 changed files with 158 additions and 0 deletions

View File

@ -149,6 +149,7 @@ static void virtio_9p_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass); DeviceClass *dc = DEVICE_CLASS(klass);
VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass); VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
dc->props = virtio_9p_properties; dc->props = virtio_9p_properties;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
vdc->init = virtio_9p_device_init; vdc->init = virtio_9p_device_init;
vdc->get_features = virtio_9p_get_features; vdc->get_features = virtio_9p_get_features;
vdc->get_config = virtio_9p_get_config; vdc->get_config = virtio_9p_get_config;

View File

@ -1420,6 +1420,7 @@ static void ac97_class_init (ObjectClass *klass, void *data)
k->device_id = PCI_DEVICE_ID_INTEL_82801AA_5; k->device_id = PCI_DEVICE_ID_INTEL_82801AA_5;
k->revision = 0x01; k->revision = 0x01;
k->class_id = PCI_CLASS_MULTIMEDIA_AUDIO; k->class_id = PCI_CLASS_MULTIMEDIA_AUDIO;
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
dc->desc = "Intel 82801AA AC97 Audio"; dc->desc = "Intel 82801AA AC97 Audio";
dc->vmsd = &vmstate_ac97; dc->vmsd = &vmstate_ac97;
dc->props = ac97_properties; dc->props = ac97_properties;

View File

@ -364,6 +364,7 @@ static void adlib_class_initfn (ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS (klass); DeviceClass *dc = DEVICE_CLASS (klass);
dc->realize = adlib_realizefn; dc->realize = adlib_realizefn;
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
dc->desc = ADLIB_DESC; dc->desc = ADLIB_DESC;
dc->props = adlib_properties; dc->props = adlib_properties;
} }

View File

@ -685,6 +685,7 @@ static void cs4231a_class_initfn (ObjectClass *klass, void *data)
dc->realize = cs4231a_realizefn; dc->realize = cs4231a_realizefn;
dc->reset = cs4231a_reset; dc->reset = cs4231a_reset;
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
dc->desc = "Crystal Semiconductor CS4231A"; dc->desc = "Crystal Semiconductor CS4231A";
dc->vmsd = &vmstate_cs4231a; dc->vmsd = &vmstate_cs4231a;
dc->props = cs4231a_properties; dc->props = cs4231a_properties;

View File

@ -1069,6 +1069,7 @@ static void es1370_class_init (ObjectClass *klass, void *data)
k->class_id = PCI_CLASS_MULTIMEDIA_AUDIO; k->class_id = PCI_CLASS_MULTIMEDIA_AUDIO;
k->subsystem_vendor_id = 0x4942; k->subsystem_vendor_id = 0x4942;
k->subsystem_id = 0x4c4c; k->subsystem_id = 0x4c4c;
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
dc->desc = "ENSONIQ AudioPCI ES1370"; dc->desc = "ENSONIQ AudioPCI ES1370";
dc->vmsd = &vmstate_es1370; dc->vmsd = &vmstate_es1370;
} }

View File

@ -315,6 +315,7 @@ static void gus_class_initfn (ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS (klass); DeviceClass *dc = DEVICE_CLASS (klass);
dc->realize = gus_realizefn; dc->realize = gus_realizefn;
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
dc->desc = "Gravis Ultrasound GF1"; dc->desc = "Gravis Ultrasound GF1";
dc->vmsd = &vmstate_gus; dc->vmsd = &vmstate_gus;
dc->props = gus_properties; dc->props = gus_properties;

View File

@ -1034,6 +1034,7 @@ static void hda_audio_output_class_init(ObjectClass *klass, void *data)
k->exit = hda_audio_exit; k->exit = hda_audio_exit;
k->command = hda_audio_command; k->command = hda_audio_command;
k->stream = hda_audio_stream; k->stream = hda_audio_stream;
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
dc->desc = "HDA Audio Codec, output-only (line-out)"; dc->desc = "HDA Audio Codec, output-only (line-out)";
dc->vmsd = &vmstate_hda_audio; dc->vmsd = &vmstate_hda_audio;
dc->props = hda_audio_properties; dc->props = hda_audio_properties;
@ -1055,6 +1056,7 @@ static void hda_audio_duplex_class_init(ObjectClass *klass, void *data)
k->exit = hda_audio_exit; k->exit = hda_audio_exit;
k->command = hda_audio_command; k->command = hda_audio_command;
k->stream = hda_audio_stream; k->stream = hda_audio_stream;
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
dc->desc = "HDA Audio Codec, duplex (line-out, line-in)"; dc->desc = "HDA Audio Codec, duplex (line-out, line-in)";
dc->vmsd = &vmstate_hda_audio; dc->vmsd = &vmstate_hda_audio;
dc->props = hda_audio_properties; dc->props = hda_audio_properties;
@ -1076,6 +1078,7 @@ static void hda_audio_micro_class_init(ObjectClass *klass, void *data)
k->exit = hda_audio_exit; k->exit = hda_audio_exit;
k->command = hda_audio_command; k->command = hda_audio_command;
k->stream = hda_audio_stream; k->stream = hda_audio_stream;
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
dc->desc = "HDA Audio Codec, duplex (speaker, microphone)"; dc->desc = "HDA Audio Codec, duplex (speaker, microphone)";
dc->vmsd = &vmstate_hda_audio; dc->vmsd = &vmstate_hda_audio;
dc->props = hda_audio_properties; dc->props = hda_audio_properties;

View File

@ -1258,6 +1258,7 @@ static void intel_hda_class_init_ich6(ObjectClass *klass, void *data)
k->device_id = 0x2668; k->device_id = 0x2668;
k->revision = 1; k->revision = 1;
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
dc->desc = "Intel HD Audio Controller (ich6)"; dc->desc = "Intel HD Audio Controller (ich6)";
} }
@ -1268,6 +1269,7 @@ static void intel_hda_class_init_ich9(ObjectClass *klass, void *data)
k->device_id = 0x293e; k->device_id = 0x293e;
k->revision = 3; k->revision = 3;
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
dc->desc = "Intel HD Audio Controller (ich9)"; dc->desc = "Intel HD Audio Controller (ich9)";
} }
@ -1296,6 +1298,7 @@ static void hda_codec_device_class_init(ObjectClass *klass, void *data)
DeviceClass *k = DEVICE_CLASS(klass); DeviceClass *k = DEVICE_CLASS(klass);
k->init = hda_codec_dev_init; k->init = hda_codec_dev_init;
k->exit = hda_codec_dev_exit; k->exit = hda_codec_dev_exit;
set_bit(DEVICE_CATEGORY_SOUND, k->categories);
k->bus_type = TYPE_HDA_BUS; k->bus_type = TYPE_HDA_BUS;
k->props = hda_props; k->props = hda_props;
} }

View File

@ -191,6 +191,7 @@ static void pcspk_class_initfn(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass); DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = pcspk_realizefn; dc->realize = pcspk_realizefn;
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
dc->no_user = 1; dc->no_user = 1;
dc->props = pcspk_properties; dc->props = pcspk_properties;
} }

View File

@ -626,6 +626,7 @@ static void pl041_device_class_init(ObjectClass *klass, void *data)
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass); SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
k->init = pl041_init; k->init = pl041_init;
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
dc->no_user = 1; dc->no_user = 1;
dc->reset = pl041_device_reset; dc->reset = pl041_device_reset;
dc->vmsd = &vmstate_pl041; dc->vmsd = &vmstate_pl041;

View File

@ -1412,6 +1412,7 @@ static void sb16_class_initfn (ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS (klass); DeviceClass *dc = DEVICE_CLASS (klass);
dc->realize = sb16_realizefn; dc->realize = sb16_realizefn;
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
dc->desc = "Creative Sound Blaster 16"; dc->desc = "Creative Sound Blaster 16";
dc->vmsd = &vmstate_sb16; dc->vmsd = &vmstate_sb16;
dc->props = sb16_properties; dc->props = sb16_properties;

View File

@ -2249,6 +2249,7 @@ static void isabus_fdc_class_init(ObjectClass *klass, void *data)
dc->reset = fdctrl_external_reset_isa; dc->reset = fdctrl_external_reset_isa;
dc->vmsd = &vmstate_isa_fdc; dc->vmsd = &vmstate_isa_fdc;
dc->props = isa_fdc_properties; dc->props = isa_fdc_properties;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
} }
static const TypeInfo isa_fdc_info = { static const TypeInfo isa_fdc_info = {
@ -2282,6 +2283,7 @@ static void sysbus_fdc_class_init(ObjectClass *klass, void *data)
dc->reset = fdctrl_external_reset_sysbus; dc->reset = fdctrl_external_reset_sysbus;
dc->vmsd = &vmstate_sysbus_fdc; dc->vmsd = &vmstate_sysbus_fdc;
dc->props = sysbus_fdc_properties; dc->props = sysbus_fdc_properties;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
} }
static const TypeInfo sysbus_fdc_info = { static const TypeInfo sysbus_fdc_info = {
@ -2305,6 +2307,7 @@ static void sun4m_fdc_class_init(ObjectClass *klass, void *data)
dc->reset = fdctrl_external_reset_sysbus; dc->reset = fdctrl_external_reset_sysbus;
dc->vmsd = &vmstate_sysbus_fdc; dc->vmsd = &vmstate_sysbus_fdc;
dc->props = sun4m_fdc_properties; dc->props = sun4m_fdc_properties;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
} }
static const TypeInfo sun4m_fdc_info = { static const TypeInfo sun4m_fdc_info = {

View File

@ -866,6 +866,7 @@ static void nvme_class_init(ObjectClass *oc, void *data)
pc->revision = 1; pc->revision = 1;
pc->is_express = 1; pc->is_express = 1;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
dc->desc = "Non-Volatile Memory Express"; dc->desc = "Non-Volatile Memory Express";
dc->props = nvme_props; dc->props = nvme_props;
dc->vmsd = &nvme_vmstate; dc->vmsd = &nvme_vmstate;

View File

@ -286,6 +286,7 @@ static void pcsysfw_class_init (ObjectClass *klass, void *data)
{ {
DeviceClass *dc = DEVICE_CLASS (klass); DeviceClass *dc = DEVICE_CLASS (klass);
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
dc->desc = "PC System Firmware"; dc->desc = "PC System Firmware";
dc->init = pcsysfw_init; dc->init = pcsysfw_init;
dc->props = pcsysfw_properties; dc->props = pcsysfw_properties;

View File

@ -723,6 +723,7 @@ static void pflash_cfi01_class_init(ObjectClass *klass, void *data)
dc->realize = pflash_cfi01_realize; dc->realize = pflash_cfi01_realize;
dc->props = pflash_cfi01_properties; dc->props = pflash_cfi01_properties;
dc->vmsd = &vmstate_pflash; dc->vmsd = &vmstate_pflash;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
} }

View File

@ -704,6 +704,7 @@ static void virtio_blk_class_init(ObjectClass *klass, void *data)
VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass); VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
dc->exit = virtio_blk_device_exit; dc->exit = virtio_blk_device_exit;
dc->props = virtio_blk_properties; dc->props = virtio_blk_properties;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
vdc->init = virtio_blk_device_init; vdc->init = virtio_blk_device_init;
vdc->get_config = virtio_blk_update_config; vdc->get_config = virtio_blk_update_config;
vdc->set_config = virtio_blk_set_config; vdc->set_config = virtio_blk_set_config;

View File

@ -122,6 +122,7 @@ static void debugcon_isa_class_initfn(ObjectClass *klass, void *data)
dc->realize = debugcon_isa_realizefn; dc->realize = debugcon_isa_realizefn;
dc->props = debugcon_isa_properties; dc->props = debugcon_isa_properties;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
} }
static const TypeInfo debugcon_isa_info = { static const TypeInfo debugcon_isa_info = {

View File

@ -449,6 +449,7 @@ static void imx_serial_class_init(ObjectClass *klass, void *data)
k->init = imx_serial_init; k->init = imx_serial_init;
dc->vmsd = &vmstate_imx_serial; dc->vmsd = &vmstate_imx_serial;
dc->reset = imx_serial_reset_at_boot; dc->reset = imx_serial_reset_at_boot;
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
dc->desc = "i.MX series UART"; dc->desc = "i.MX series UART";
dc->props = imx32_serial_properties; dc->props = imx32_serial_properties;
} }

View File

@ -74,6 +74,7 @@ static Property ipack_device_props[] = {
static void ipack_device_class_init(ObjectClass *klass, void *data) static void ipack_device_class_init(ObjectClass *klass, void *data)
{ {
DeviceClass *k = DEVICE_CLASS(klass); DeviceClass *k = DEVICE_CLASS(klass);
set_bit(DEVICE_CATEGORY_INPUT, k->categories);
k->bus_type = TYPE_IPACK_BUS; k->bus_type = TYPE_IPACK_BUS;
k->init = ipack_device_dev_init; k->init = ipack_device_dev_init;
k->exit = ipack_device_dev_exit; k->exit = ipack_device_dev_exit;

View File

@ -585,6 +585,7 @@ static void ipoctal_class_init(ObjectClass *klass, void *data)
ic->mem_read8 = mem_read8; ic->mem_read8 = mem_read8;
ic->mem_write8 = mem_write8; ic->mem_write8 = mem_write8;
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
dc->desc = "GE IP-Octal 232 8-channel RS-232 IndustryPack"; dc->desc = "GE IP-Octal 232 8-channel RS-232 IndustryPack";
dc->props = ipoctal_properties; dc->props = ipoctal_properties;
dc->vmsd = &vmstate_ipoctal; dc->vmsd = &vmstate_ipoctal;

View File

@ -607,6 +607,7 @@ static void parallel_isa_class_initfn(ObjectClass *klass, void *data)
dc->realize = parallel_isa_realizefn; dc->realize = parallel_isa_realizefn;
dc->props = parallel_isa_properties; dc->props = parallel_isa_properties;
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
} }
static const TypeInfo parallel_isa_info = { static const TypeInfo parallel_isa_info = {

View File

@ -102,6 +102,7 @@ static void serial_isa_class_initfn(ObjectClass *klass, void *data)
dc->realize = serial_isa_realizefn; dc->realize = serial_isa_realizefn;
dc->vmsd = &vmstate_isa_serial; dc->vmsd = &vmstate_isa_serial;
dc->props = serial_isa_properties; dc->props = serial_isa_properties;
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
} }
static const TypeInfo serial_isa_info = { static const TypeInfo serial_isa_info = {

View File

@ -205,6 +205,7 @@ static void serial_pci_class_initfn(ObjectClass *klass, void *data)
pc->class_id = PCI_CLASS_COMMUNICATION_SERIAL; pc->class_id = PCI_CLASS_COMMUNICATION_SERIAL;
dc->vmsd = &vmstate_pci_serial; dc->vmsd = &vmstate_pci_serial;
dc->props = serial_pci_properties; dc->props = serial_pci_properties;
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
} }
static void multi_2x_serial_pci_class_initfn(ObjectClass *klass, void *data) static void multi_2x_serial_pci_class_initfn(ObjectClass *klass, void *data)
@ -219,6 +220,7 @@ static void multi_2x_serial_pci_class_initfn(ObjectClass *klass, void *data)
pc->class_id = PCI_CLASS_COMMUNICATION_SERIAL; pc->class_id = PCI_CLASS_COMMUNICATION_SERIAL;
dc->vmsd = &vmstate_pci_multi_serial; dc->vmsd = &vmstate_pci_multi_serial;
dc->props = multi_2x_serial_pci_properties; dc->props = multi_2x_serial_pci_properties;
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
} }
static void multi_4x_serial_pci_class_initfn(ObjectClass *klass, void *data) static void multi_4x_serial_pci_class_initfn(ObjectClass *klass, void *data)
@ -233,6 +235,7 @@ static void multi_4x_serial_pci_class_initfn(ObjectClass *klass, void *data)
pc->class_id = PCI_CLASS_COMMUNICATION_SERIAL; pc->class_id = PCI_CLASS_COMMUNICATION_SERIAL;
dc->vmsd = &vmstate_pci_multi_serial; dc->vmsd = &vmstate_pci_multi_serial;
dc->props = multi_4x_serial_pci_properties; dc->props = multi_4x_serial_pci_properties;
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
} }
static const TypeInfo serial_pci_info = { static const TypeInfo serial_pci_info = {

View File

@ -652,6 +652,7 @@ static void tpci200_class_init(ObjectClass *klass, void *data)
k->class_id = PCI_CLASS_BRIDGE_OTHER; k->class_id = PCI_CLASS_BRIDGE_OTHER;
k->subsystem_vendor_id = PCI_VENDOR_ID_TEWS; k->subsystem_vendor_id = PCI_VENDOR_ID_TEWS;
k->subsystem_id = 0x300A; k->subsystem_id = 0x300A;
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
dc->desc = "TEWS TPCI200 IndustryPack carrier"; dc->desc = "TEWS TPCI200 IndustryPack carrier";
dc->vmsd = &vmstate_tpci200; dc->vmsd = &vmstate_tpci200;
} }

View File

@ -971,6 +971,7 @@ static void virtio_serial_port_class_init(ObjectClass *klass, void *data)
{ {
DeviceClass *k = DEVICE_CLASS(klass); DeviceClass *k = DEVICE_CLASS(klass);
k->init = virtser_port_qdev_init; k->init = virtser_port_qdev_init;
set_bit(DEVICE_CATEGORY_INPUT, k->categories);
k->bus_type = TYPE_VIRTIO_SERIAL_BUS; k->bus_type = TYPE_VIRTIO_SERIAL_BUS;
k->exit = virtser_port_qdev_exit; k->exit = virtser_port_qdev_exit;
k->unplug = qdev_simple_unplug_cb; k->unplug = qdev_simple_unplug_cb;
@ -1017,6 +1018,7 @@ static void virtio_serial_class_init(ObjectClass *klass, void *data)
VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass); VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
dc->exit = virtio_serial_device_exit; dc->exit = virtio_serial_device_exit;
dc->props = virtio_serial_properties; dc->props = virtio_serial_properties;
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
vdc->init = virtio_serial_device_init; vdc->init = virtio_serial_device_init;
vdc->get_features = get_features; vdc->get_features = get_features;
vdc->get_config = get_config; vdc->get_config = get_config;

View File

@ -101,11 +101,19 @@ static void icc_bridge_init(Object *obj)
s->icc_bus.apic_address_space = &s->apic_container; s->icc_bus.apic_address_space = &s->apic_container;
} }
static void icc_bridge_class_init(ObjectClass *oc, void *data)
{
DeviceClass *dc = DEVICE_CLASS(oc);
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
}
static const TypeInfo icc_bridge_info = { static const TypeInfo icc_bridge_info = {
.name = TYPE_ICC_BRIDGE, .name = TYPE_ICC_BRIDGE,
.parent = TYPE_SYS_BUS_DEVICE, .parent = TYPE_SYS_BUS_DEVICE,
.instance_init = icc_bridge_init, .instance_init = icc_bridge_init,
.instance_size = sizeof(ICCBridgeState), .instance_size = sizeof(ICCBridgeState),
.class_init = icc_bridge_class_init,
}; };

View File

@ -2937,6 +2937,7 @@ static void isa_cirrus_vga_class_init(ObjectClass *klass, void *data)
dc->vmsd = &vmstate_cirrus_vga; dc->vmsd = &vmstate_cirrus_vga;
dc->realize = isa_cirrus_vga_realizefn; dc->realize = isa_cirrus_vga_realizefn;
dc->props = isa_cirrus_vga_properties; dc->props = isa_cirrus_vga_properties;
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
} }
static const TypeInfo isa_cirrus_vga_info = { static const TypeInfo isa_cirrus_vga_info = {
@ -3002,6 +3003,7 @@ static void cirrus_vga_class_init(ObjectClass *klass, void *data)
k->vendor_id = PCI_VENDOR_ID_CIRRUS; k->vendor_id = PCI_VENDOR_ID_CIRRUS;
k->device_id = CIRRUS_ID_CLGD5446; k->device_id = CIRRUS_ID_CLGD5446;
k->class_id = PCI_CLASS_DISPLAY_VGA; k->class_id = PCI_CLASS_DISPLAY_VGA;
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
dc->desc = "Cirrus CLGD 54xx VGA"; dc->desc = "Cirrus CLGD 54xx VGA";
dc->vmsd = &vmstate_pci_cirrus_vga; dc->vmsd = &vmstate_pci_cirrus_vga;
dc->props = pci_vga_cirrus_properties; dc->props = pci_vga_cirrus_properties;

View File

@ -528,6 +528,7 @@ static void g364fb_sysbus_class_init(ObjectClass *klass, void *data)
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass); SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
k->init = g364fb_sysbus_init; k->init = g364fb_sysbus_init;
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
dc->desc = "G364 framebuffer"; dc->desc = "G364 framebuffer";
dc->reset = g364fb_sysbus_reset; dc->reset = g364fb_sysbus_reset;
dc->vmsd = &vmstate_g364fb; dc->vmsd = &vmstate_g364fb;

View File

@ -481,6 +481,7 @@ static void pl110_class_init(ObjectClass *klass, void *data)
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass); SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
k->init = pl110_init; k->init = pl110_init;
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
dc->no_user = 1; dc->no_user = 1;
dc->vmsd = &vmstate_pl110; dc->vmsd = &vmstate_pl110;
} }
@ -498,6 +499,7 @@ static void pl110_versatile_class_init(ObjectClass *klass, void *data)
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass); SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
k->init = pl110_versatile_init; k->init = pl110_versatile_init;
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
dc->no_user = 1; dc->no_user = 1;
dc->vmsd = &vmstate_pl110; dc->vmsd = &vmstate_pl110;
} }
@ -515,6 +517,7 @@ static void pl111_class_init(ObjectClass *klass, void *data)
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass); SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
k->init = pl111_init; k->init = pl111_init;
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
dc->no_user = 1; dc->no_user = 1;
dc->vmsd = &vmstate_pl110; dc->vmsd = &vmstate_pl110;
} }

View File

@ -2323,6 +2323,7 @@ static void qxl_primary_class_init(ObjectClass *klass, void *data)
k->vendor_id = REDHAT_PCI_VENDOR_ID; k->vendor_id = REDHAT_PCI_VENDOR_ID;
k->device_id = QXL_DEVICE_ID_STABLE; k->device_id = QXL_DEVICE_ID_STABLE;
k->class_id = PCI_CLASS_DISPLAY_VGA; k->class_id = PCI_CLASS_DISPLAY_VGA;
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
dc->desc = "Spice QXL GPU (primary, vga compatible)"; dc->desc = "Spice QXL GPU (primary, vga compatible)";
dc->reset = qxl_reset_handler; dc->reset = qxl_reset_handler;
dc->vmsd = &qxl_vmstate; dc->vmsd = &qxl_vmstate;
@ -2345,6 +2346,7 @@ static void qxl_secondary_class_init(ObjectClass *klass, void *data)
k->vendor_id = REDHAT_PCI_VENDOR_ID; k->vendor_id = REDHAT_PCI_VENDOR_ID;
k->device_id = QXL_DEVICE_ID_STABLE; k->device_id = QXL_DEVICE_ID_STABLE;
k->class_id = PCI_CLASS_DISPLAY_OTHER; k->class_id = PCI_CLASS_DISPLAY_OTHER;
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
dc->desc = "Spice QXL GPU (secondary)"; dc->desc = "Spice QXL GPU (secondary)";
dc->reset = qxl_reset_handler; dc->reset = qxl_reset_handler;
dc->vmsd = &qxl_vmstate; dc->vmsd = &qxl_vmstate;

View File

@ -87,6 +87,7 @@ static void vga_isa_class_initfn(ObjectClass *klass, void *data)
dc->reset = vga_isa_reset; dc->reset = vga_isa_reset;
dc->vmsd = &vmstate_vga_common; dc->vmsd = &vmstate_vga_common;
dc->props = vga_isa_properties; dc->props = vga_isa_properties;
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
} }
static const TypeInfo vga_isa_info = { static const TypeInfo vga_isa_info = {

View File

@ -198,6 +198,7 @@ static void vga_class_init(ObjectClass *klass, void *data)
k->class_id = PCI_CLASS_DISPLAY_VGA; k->class_id = PCI_CLASS_DISPLAY_VGA;
dc->vmsd = &vmstate_vga_pci; dc->vmsd = &vmstate_vga_pci;
dc->props = vga_pci_properties; dc->props = vga_pci_properties;
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
} }
static const TypeInfo vga_info = { static const TypeInfo vga_info = {

View File

@ -1306,6 +1306,7 @@ static void vmsvga_class_init(ObjectClass *klass, void *data)
dc->reset = vmsvga_reset; dc->reset = vmsvga_reset;
dc->vmsd = &vmstate_vmware_vga; dc->vmsd = &vmstate_vmware_vga;
dc->props = vga_vmware_properties; dc->props = vga_vmware_properties;
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
} }
static const TypeInfo vmsvga_info = { static const TypeInfo vmsvga_info = {

View File

@ -227,6 +227,7 @@ static void gpio_i2c_class_init(ObjectClass *klass, void *data)
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass); SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
k->init = gpio_i2c_init; k->init = gpio_i2c_init;
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
dc->desc = "Virtual GPIO to I2C bridge"; dc->desc = "Virtual GPIO to I2C bridge";
} }

View File

@ -224,6 +224,7 @@ static void i2c_slave_class_init(ObjectClass *klass, void *data)
{ {
DeviceClass *k = DEVICE_CLASS(klass); DeviceClass *k = DEVICE_CLASS(klass);
k->init = i2c_slave_qdev_init; k->init = i2c_slave_qdev_init;
set_bit(DEVICE_CATEGORY_MISC, k->categories);
k->bus_type = TYPE_I2C_BUS; k->bus_type = TYPE_I2C_BUS;
k->props = i2c_props; k->props = i2c_props;
} }

View File

@ -1856,6 +1856,7 @@ static void assign_class_init(ObjectClass *klass, void *data)
dc->props = assigned_dev_properties; dc->props = assigned_dev_properties;
dc->vmsd = &vmstate_assigned_device; dc->vmsd = &vmstate_assigned_device;
dc->reset = reset_assigned_device; dc->reset = reset_assigned_device;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
dc->desc = "KVM-based PCI passthrough"; dc->desc = "KVM-based PCI passthrough";
} }

View File

@ -1338,6 +1338,7 @@ static void sysbus_ahci_class_init(ObjectClass *klass, void *data)
dc->vmsd = &vmstate_sysbus_ahci; dc->vmsd = &vmstate_sysbus_ahci;
dc->props = sysbus_ahci_properties; dc->props = sysbus_ahci_properties;
dc->reset = sysbus_ahci_reset; dc->reset = sysbus_ahci_reset;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
} }
static const TypeInfo sysbus_ahci_info = { static const TypeInfo sysbus_ahci_info = {

View File

@ -160,6 +160,7 @@ static void ich_ahci_class_init(ObjectClass *klass, void *data)
k->class_id = PCI_CLASS_STORAGE_SATA; k->class_id = PCI_CLASS_STORAGE_SATA;
dc->vmsd = &vmstate_ich9_ahci; dc->vmsd = &vmstate_ich9_ahci;
dc->reset = pci_ich9_reset; dc->reset = pci_ich9_reset;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
} }
static const TypeInfo ich_ahci_info = { static const TypeInfo ich_ahci_info = {

View File

@ -118,6 +118,7 @@ static void isa_ide_class_initfn(ObjectClass *klass, void *data)
dc->fw_name = "ide"; dc->fw_name = "ide";
dc->reset = isa_ide_reset; dc->reset = isa_ide_reset;
dc->props = isa_ide_properties; dc->props = isa_ide_properties;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
} }
static const TypeInfo isa_ide_info = { static const TypeInfo isa_ide_info = {

View File

@ -248,6 +248,7 @@ static void piix3_ide_class_init(ObjectClass *klass, void *data)
k->vendor_id = PCI_VENDOR_ID_INTEL; k->vendor_id = PCI_VENDOR_ID_INTEL;
k->device_id = PCI_DEVICE_ID_INTEL_82371SB_1; k->device_id = PCI_DEVICE_ID_INTEL_82371SB_1;
k->class_id = PCI_CLASS_STORAGE_IDE; k->class_id = PCI_CLASS_STORAGE_IDE;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
dc->no_user = 1; dc->no_user = 1;
} }
@ -267,6 +268,7 @@ static void piix3_ide_xen_class_init(ObjectClass *klass, void *data)
k->vendor_id = PCI_VENDOR_ID_INTEL; k->vendor_id = PCI_VENDOR_ID_INTEL;
k->device_id = PCI_DEVICE_ID_INTEL_82371SB_1; k->device_id = PCI_DEVICE_ID_INTEL_82371SB_1;
k->class_id = PCI_CLASS_STORAGE_IDE; k->class_id = PCI_CLASS_STORAGE_IDE;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
dc->no_user = 1; dc->no_user = 1;
dc->unplug = pci_piix3_xen_ide_unplug; dc->unplug = pci_piix3_xen_ide_unplug;
} }
@ -289,6 +291,7 @@ static void piix4_ide_class_init(ObjectClass *klass, void *data)
k->vendor_id = PCI_VENDOR_ID_INTEL; k->vendor_id = PCI_VENDOR_ID_INTEL;
k->device_id = PCI_DEVICE_ID_INTEL_82371AB; k->device_id = PCI_DEVICE_ID_INTEL_82371AB;
k->class_id = PCI_CLASS_STORAGE_IDE; k->class_id = PCI_CLASS_STORAGE_IDE;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
dc->no_user = 1; dc->no_user = 1;
} }

View File

@ -282,6 +282,7 @@ static void ide_device_class_init(ObjectClass *klass, void *data)
{ {
DeviceClass *k = DEVICE_CLASS(klass); DeviceClass *k = DEVICE_CLASS(klass);
k->init = ide_qdev_init; k->init = ide_qdev_init;
set_bit(DEVICE_CATEGORY_STORAGE, k->categories);
k->bus_type = TYPE_IDE_BUS; k->bus_type = TYPE_IDE_BUS;
k->props = ide_props; k->props = ide_props;
} }

View File

@ -223,6 +223,7 @@ static void via_ide_class_init(ObjectClass *klass, void *data)
k->device_id = PCI_DEVICE_ID_VIA_IDE; k->device_id = PCI_DEVICE_ID_VIA_IDE;
k->revision = 0x06; k->revision = 0x06;
k->class_id = PCI_CLASS_STORAGE_IDE; k->class_id = PCI_CLASS_STORAGE_IDE;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
dc->no_user = 1; dc->no_user = 1;
} }

View File

@ -261,6 +261,7 @@ static void pci_i82378_class_init(ObjectClass *klass, void *data)
k->subsystem_vendor_id = 0x0; k->subsystem_vendor_id = 0x0;
k->subsystem_id = 0x0; k->subsystem_id = 0x0;
dc->vmsd = &vmstate_pci_i82378; dc->vmsd = &vmstate_pci_i82378;
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
dc->props = i82378_properties; dc->props = i82378_properties;
} }

View File

@ -600,6 +600,7 @@ static void ich9_lpc_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass); DeviceClass *dc = DEVICE_CLASS(klass);
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
dc->reset = ich9_lpc_reset; dc->reset = ich9_lpc_reset;
k->init = ich9_lpc_initfn; k->init = ich9_lpc_initfn;
dc->vmsd = &vmstate_ich9_lpc; dc->vmsd = &vmstate_ich9_lpc;

View File

@ -281,6 +281,7 @@ static void via_ac97_class_init(ObjectClass *klass, void *data)
k->device_id = PCI_DEVICE_ID_VIA_AC97; k->device_id = PCI_DEVICE_ID_VIA_AC97;
k->revision = 0x50; k->revision = 0x50;
k->class_id = PCI_CLASS_MULTIMEDIA_AUDIO; k->class_id = PCI_CLASS_MULTIMEDIA_AUDIO;
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
dc->desc = "AC97"; dc->desc = "AC97";
} }
@ -322,6 +323,7 @@ static void via_mc97_class_init(ObjectClass *klass, void *data)
k->device_id = PCI_DEVICE_ID_VIA_MC97; k->device_id = PCI_DEVICE_ID_VIA_MC97;
k->class_id = PCI_CLASS_COMMUNICATION_OTHER; k->class_id = PCI_CLASS_COMMUNICATION_OTHER;
k->revision = 0x30; k->revision = 0x30;
set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
dc->desc = "MC97"; dc->desc = "MC97";
} }
@ -401,6 +403,7 @@ static void via_pm_class_init(ObjectClass *klass, void *data)
k->revision = 0x40; k->revision = 0x40;
dc->desc = "PM"; dc->desc = "PM";
dc->vmsd = &vmstate_acpi; dc->vmsd = &vmstate_acpi;
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
dc->props = via_pm_properties; dc->props = via_pm_properties;
} }

View File

@ -263,6 +263,7 @@ static void qdev_applesmc_class_init(ObjectClass *klass, void *data)
dc->realize = applesmc_isa_realize; dc->realize = applesmc_isa_realize;
dc->reset = qdev_applesmc_isa_reset; dc->reset = qdev_applesmc_isa_reset;
dc->props = applesmc_isa_properties; dc->props = applesmc_isa_properties;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
} }
static const TypeInfo applesmc_isa_info = { static const TypeInfo applesmc_isa_info = {

View File

@ -58,6 +58,7 @@ static void debug_exit_class_initfn(ObjectClass *klass, void *data)
dc->realize = debug_exit_realizefn; dc->realize = debug_exit_realizefn;
dc->props = debug_exit_properties; dc->props = debug_exit_properties;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
} }
static const TypeInfo debug_exit_info = { static const TypeInfo debug_exit_info = {

View File

@ -821,6 +821,7 @@ static void ivshmem_class_init(ObjectClass *klass, void *data)
k->class_id = PCI_CLASS_MEMORY_RAM; k->class_id = PCI_CLASS_MEMORY_RAM;
dc->reset = ivshmem_reset; dc->reset = ivshmem_reset;
dc->props = ivshmem_properties; dc->props = ivshmem_properties;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
} }
static const TypeInfo ivshmem_info = { static const TypeInfo ivshmem_info = {

View File

@ -188,6 +188,7 @@ static void testdev_class_init(ObjectClass *klass, void *data)
{ {
DeviceClass *dc = DEVICE_CLASS(klass); DeviceClass *dc = DEVICE_CLASS(klass);
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
dc->realize = testdev_realizefn; dc->realize = testdev_realizefn;
} }

View File

@ -315,6 +315,7 @@ static void pci_testdev_class_init(ObjectClass *klass, void *data)
k->revision = 0x00; k->revision = 0x00;
k->class_id = PCI_CLASS_OTHERS; k->class_id = PCI_CLASS_OTHERS;
dc->desc = "PCI Test Device"; dc->desc = "PCI Test Device";
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
dc->reset = qdev_pci_testdev_reset; dc->reset = qdev_pci_testdev_reset;
} }

View File

@ -47,6 +47,7 @@ static void sga_class_initfn(ObjectClass *klass, void *data)
{ {
DeviceClass *dc = DEVICE_CLASS(klass); DeviceClass *dc = DEVICE_CLASS(klass);
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
dc->realize = sga_realizefn; dc->realize = sga_realizefn;
dc->desc = "Serial Graphics Adapter"; dc->desc = "Serial Graphics Adapter";
} }

View File

@ -3299,6 +3299,7 @@ static void vfio_pci_dev_class_init(ObjectClass *klass, void *data)
dc->props = vfio_pci_dev_properties; dc->props = vfio_pci_dev_properties;
dc->vmsd = &vfio_pci_vmstate; dc->vmsd = &vfio_pci_vmstate;
dc->desc = "VFIO-based PCI device assignment"; dc->desc = "VFIO-based PCI device assignment";
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
pdc->init = vfio_initfn; pdc->init = vfio_initfn;
pdc->exit = vfio_exitfn; pdc->exit = vfio_exitfn;
pdc->config_read = vfio_pci_read_config; pdc->config_read = vfio_pci_read_config;

View File

@ -1400,6 +1400,7 @@ static void e1000_class_init(ObjectClass *klass, void *data)
k->device_id = E1000_DEVID; k->device_id = E1000_DEVID;
k->revision = 0x03; k->revision = 0x03;
k->class_id = PCI_CLASS_NETWORK_ETHERNET; k->class_id = PCI_CLASS_NETWORK_ETHERNET;
set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
dc->desc = "Intel Gigabit Ethernet"; dc->desc = "Intel Gigabit Ethernet";
dc->reset = qdev_e1000_reset; dc->reset = qdev_e1000_reset;
dc->vmsd = &vmstate_e1000; dc->vmsd = &vmstate_e1000;

View File

@ -2083,6 +2083,7 @@ static void eepro100_class_init(ObjectClass *klass, void *data)
info = eepro100_get_class_by_name(object_class_get_name(klass)); info = eepro100_get_class_by_name(object_class_get_name(klass));
set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
dc->props = e100_properties; dc->props = e100_properties;
dc->desc = info->desc; dc->desc = info->desc;
k->vendor_id = PCI_VENDOR_ID_INTEL; k->vendor_id = PCI_VENDOR_ID_INTEL;

View File

@ -150,6 +150,7 @@ static void lance_class_init(ObjectClass *klass, void *data)
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass); SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
k->init = lance_init; k->init = lance_init;
set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
dc->fw_name = "ethernet"; dc->fw_name = "ethernet";
dc->reset = lance_reset; dc->reset = lance_reset;
dc->vmsd = &vmstate_lance; dc->vmsd = &vmstate_lance;

View File

@ -264,6 +264,7 @@ static void mipsnet_class_init(ObjectClass *klass, void *data)
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass); SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
k->init = mipsnet_sysbus_init; k->init = mipsnet_sysbus_init;
set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
dc->desc = "MIPS Simulator network device"; dc->desc = "MIPS Simulator network device";
dc->reset = mipsnet_sysbus_reset; dc->reset = mipsnet_sysbus_reset;
dc->vmsd = &vmstate_mipsnet; dc->vmsd = &vmstate_mipsnet;

View File

@ -98,6 +98,7 @@ static void isa_ne2000_class_initfn(ObjectClass *klass, void *data)
dc->realize = isa_ne2000_realizefn; dc->realize = isa_ne2000_realizefn;
dc->props = ne2000_isa_properties; dc->props = ne2000_isa_properties;
set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
} }
static const TypeInfo ne2000_isa_info = { static const TypeInfo ne2000_isa_info = {

View File

@ -772,6 +772,7 @@ static void ne2000_class_init(ObjectClass *klass, void *data)
k->class_id = PCI_CLASS_NETWORK_ETHERNET; k->class_id = PCI_CLASS_NETWORK_ETHERNET;
dc->vmsd = &vmstate_pci_ne2000; dc->vmsd = &vmstate_pci_ne2000;
dc->props = ne2000_properties; dc->props = ne2000_properties;
set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
} }
static const TypeInfo ne2000_info = { static const TypeInfo ne2000_info = {

View File

@ -713,6 +713,7 @@ static void open_eth_class_init(ObjectClass *klass, void *data)
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass); SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
k->init = sysbus_open_eth_init; k->init = sysbus_open_eth_init;
set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
dc->desc = "Opencores 10/100 Mbit Ethernet"; dc->desc = "Opencores 10/100 Mbit Ethernet";
dc->reset = qdev_open_eth_reset; dc->reset = qdev_open_eth_reset;
dc->props = open_eth_properties; dc->props = open_eth_properties;

View File

@ -366,6 +366,7 @@ static void pcnet_class_init(ObjectClass *klass, void *data)
dc->reset = pci_reset; dc->reset = pci_reset;
dc->vmsd = &vmstate_pci_pcnet; dc->vmsd = &vmstate_pci_pcnet;
dc->props = pcnet_properties; dc->props = pcnet_properties;
set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
} }
static const TypeInfo pcnet_info = { static const TypeInfo pcnet_info = {

View File

@ -3563,6 +3563,7 @@ static void rtl8139_class_init(ObjectClass *klass, void *data)
dc->reset = rtl8139_reset; dc->reset = rtl8139_reset;
dc->vmsd = &vmstate_rtl8139; dc->vmsd = &vmstate_rtl8139;
dc->props = rtl8139_properties; dc->props = rtl8139_properties;
set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
} }
static const TypeInfo rtl8139_info = { static const TypeInfo rtl8139_info = {

View File

@ -1638,6 +1638,7 @@ static void virtio_net_class_init(ObjectClass *klass, void *data)
VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass); VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
dc->exit = virtio_net_device_exit; dc->exit = virtio_net_device_exit;
dc->props = virtio_net_properties; dc->props = virtio_net_properties;
set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
vdc->init = virtio_net_device_init; vdc->init = virtio_net_device_init;
vdc->get_config = virtio_net_get_config; vdc->get_config = virtio_net_get_config;
vdc->set_config = virtio_net_set_config; vdc->set_config = virtio_net_set_config;

View File

@ -2453,6 +2453,7 @@ static void vmxnet3_class_init(ObjectClass *class, void *data)
dc->reset = vmxnet3_qdev_reset; dc->reset = vmxnet3_qdev_reset;
dc->vmsd = &vmstate_vmxnet3; dc->vmsd = &vmstate_vmxnet3;
dc->props = vmxnet3_properties; dc->props = vmxnet3_properties;
set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
} }
static const TypeInfo vmxnet3_info = { static const TypeInfo vmxnet3_info = {

View File

@ -81,12 +81,14 @@ err_bridge:
static void i82801b11_bridge_class_init(ObjectClass *klass, void *data) static void i82801b11_bridge_class_init(ObjectClass *klass, void *data)
{ {
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
DeviceClass *dc = DEVICE_CLASS(klass);
k->is_bridge = 1; k->is_bridge = 1;
k->vendor_id = PCI_VENDOR_ID_INTEL; k->vendor_id = PCI_VENDOR_ID_INTEL;
k->device_id = PCI_DEVICE_ID_INTEL_82801BA_11; k->device_id = PCI_DEVICE_ID_INTEL_82801BA_11;
k->revision = ICH9_D2P_A2_REVISION; k->revision = ICH9_D2P_A2_REVISION;
k->init = i82801b11_bridge_initfn; k->init = i82801b11_bridge_initfn;
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
} }
static const TypeInfo i82801b11_bridge_info = { static const TypeInfo i82801b11_bridge_info = {

View File

@ -220,6 +220,7 @@ static void ioh3420_class_init(ObjectClass *klass, void *data)
k->vendor_id = PCI_VENDOR_ID_INTEL; k->vendor_id = PCI_VENDOR_ID_INTEL;
k->device_id = PCI_DEVICE_ID_IOH_EPORT; k->device_id = PCI_DEVICE_ID_IOH_EPORT;
k->revision = PCI_DEVICE_ID_IOH_REV; k->revision = PCI_DEVICE_ID_IOH_REV;
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
dc->desc = "Intel IOH device id 3420 PCIE Root Port"; dc->desc = "Intel IOH device id 3420 PCIE Root Port";
dc->reset = ioh3420_reset; dc->reset = ioh3420_reset;
dc->vmsd = &vmstate_ioh3420; dc->vmsd = &vmstate_ioh3420;

View File

@ -141,6 +141,7 @@ static void pci_bridge_dev_class_init(ObjectClass *klass, void *data)
dc->reset = qdev_pci_bridge_dev_reset; dc->reset = qdev_pci_bridge_dev_reset;
dc->props = pci_bridge_dev_properties; dc->props = pci_bridge_dev_properties;
dc->vmsd = &pci_bridge_dev_vmstate; dc->vmsd = &pci_bridge_dev_vmstate;
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
} }
static const TypeInfo pci_bridge_dev_info = { static const TypeInfo pci_bridge_dev_info = {

View File

@ -187,6 +187,7 @@ static void xio3130_downstream_class_init(ObjectClass *klass, void *data)
k->vendor_id = PCI_VENDOR_ID_TI; k->vendor_id = PCI_VENDOR_ID_TI;
k->device_id = PCI_DEVICE_ID_TI_XIO3130D; k->device_id = PCI_DEVICE_ID_TI_XIO3130D;
k->revision = XIO3130_REVISION; k->revision = XIO3130_REVISION;
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
dc->desc = "TI X3130 Downstream Port of PCI Express Switch"; dc->desc = "TI X3130 Downstream Port of PCI Express Switch";
dc->reset = xio3130_downstream_reset; dc->reset = xio3130_downstream_reset;
dc->vmsd = &vmstate_xio3130_downstream; dc->vmsd = &vmstate_xio3130_downstream;

View File

@ -161,6 +161,7 @@ static void xio3130_upstream_class_init(ObjectClass *klass, void *data)
k->vendor_id = PCI_VENDOR_ID_TI; k->vendor_id = PCI_VENDOR_ID_TI;
k->device_id = PCI_DEVICE_ID_TI_XIO3130U; k->device_id = PCI_DEVICE_ID_TI_XIO3130U;
k->revision = XIO3130_REVISION; k->revision = XIO3130_REVISION;
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
dc->desc = "TI X3130 Upstream Port of PCI Express Switch"; dc->desc = "TI X3130 Upstream Port of PCI Express Switch";
dc->reset = xio3130_upstream_reset; dc->reset = xio3130_upstream_reset;
dc->vmsd = &vmstate_xio3130_upstream; dc->vmsd = &vmstate_xio3130_upstream;

View File

@ -536,6 +536,7 @@ static void pbm_host_class_init(ObjectClass *klass, void *data)
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass); SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
k->init = pci_pbm_init_device; k->init = pci_pbm_init_device;
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
dc->reset = pci_pbm_reset; dc->reset = pci_pbm_reset;
} }
@ -558,6 +559,7 @@ static void pbm_pci_bridge_class_init(ObjectClass *klass, void *data)
k->revision = 0x11; k->revision = 0x11;
k->config_write = pci_bridge_write_config; k->config_write = pci_bridge_write_config;
k->is_bridge = 1; k->is_bridge = 1;
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
dc->reset = pci_bridge_reset; dc->reset = pci_bridge_reset;
dc->vmsd = &vmstate_pci_device; dc->vmsd = &vmstate_pci_device;
} }

View File

@ -407,6 +407,7 @@ static void e500_pcihost_class_init(ObjectClass *klass, void *data)
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass); SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
k->init = e500_pcihost_initfn; k->init = e500_pcihost_initfn;
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
dc->props = pcihost_properties; dc->props = pcihost_properties;
dc->vmsd = &vmstate_ppce500_pci; dc->vmsd = &vmstate_ppce500_pci;
} }

View File

@ -210,6 +210,7 @@ static void raven_pcihost_class_init(ObjectClass *klass, void *data)
{ {
DeviceClass *dc = DEVICE_CLASS(klass); DeviceClass *dc = DEVICE_CLASS(klass);
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
dc->realize = raven_pcihost_realizefn; dc->realize = raven_pcihost_realizefn;
dc->fw_name = "pci"; dc->fw_name = "pci";
dc->no_user = 1; dc->no_user = 1;

View File

@ -78,6 +78,7 @@ static void q35_host_class_init(ObjectClass *klass, void *data)
hc->root_bus_path = q35_host_root_bus_path; hc->root_bus_path = q35_host_root_bus_path;
dc->realize = q35_host_realize; dc->realize = q35_host_realize;
dc->props = mch_props; dc->props = mch_props;
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
dc->fw_name = "pci"; dc->fw_name = "pci";
} }
@ -306,6 +307,7 @@ static void mch_class_init(ObjectClass *klass, void *data)
k->init = mch_init; k->init = mch_init;
k->config_write = mch_write_config; k->config_write = mch_write_config;
dc->reset = mch_reset; dc->reset = mch_reset;
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
dc->desc = "Host bridge"; dc->desc = "Host bridge";
dc->vmsd = &vmstate_mch; dc->vmsd = &vmstate_mch;
k->vendor_id = PCI_VENDOR_ID_INTEL; k->vendor_id = PCI_VENDOR_ID_INTEL;

View File

@ -392,6 +392,7 @@ static void esp_pci_class_init(ObjectClass *klass, void *data)
k->device_id = PCI_DEVICE_ID_AMD_SCSI; k->device_id = PCI_DEVICE_ID_AMD_SCSI;
k->revision = 0x10; k->revision = 0x10;
k->class_id = PCI_CLASS_STORAGE_SCSI; k->class_id = PCI_CLASS_STORAGE_SCSI;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
dc->desc = "AMD Am53c974 PCscsi-PCI SCSI adapter"; dc->desc = "AMD Am53c974 PCscsi-PCI SCSI adapter";
dc->reset = esp_pci_hard_reset; dc->reset = esp_pci_hard_reset;
dc->vmsd = &vmstate_esp_pci_scsi; dc->vmsd = &vmstate_esp_pci_scsi;
@ -512,6 +513,7 @@ static void dc390_class_init(ObjectClass *klass, void *data)
k->init = dc390_scsi_init; k->init = dc390_scsi_init;
k->config_read = dc390_read_config; k->config_read = dc390_read_config;
k->config_write = dc390_write_config; k->config_write = dc390_write_config;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
dc->desc = "Tekram DC-390 SCSI adapter"; dc->desc = "Tekram DC-390 SCSI adapter";
} }

View File

@ -720,6 +720,7 @@ static void sysbus_esp_class_init(ObjectClass *klass, void *data)
dc->realize = sysbus_esp_realize; dc->realize = sysbus_esp_realize;
dc->reset = sysbus_esp_hard_reset; dc->reset = sysbus_esp_hard_reset;
dc->vmsd = &vmstate_sysbus_esp_scsi; dc->vmsd = &vmstate_sysbus_esp_scsi;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
} }
static const TypeInfo sysbus_esp_info = { static const TypeInfo sysbus_esp_info = {

View File

@ -2141,6 +2141,7 @@ static void lsi_class_init(ObjectClass *klass, void *data)
k->subsystem_id = 0x1000; k->subsystem_id = 0x1000;
dc->reset = lsi_scsi_reset; dc->reset = lsi_scsi_reset;
dc->vmsd = &vmstate_lsi_scsi; dc->vmsd = &vmstate_lsi_scsi;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
} }
static const TypeInfo lsi_info = { static const TypeInfo lsi_info = {

View File

@ -2213,6 +2213,7 @@ static void megasas_class_init(ObjectClass *oc, void *data)
dc->props = megasas_properties; dc->props = megasas_properties;
dc->reset = megasas_scsi_reset; dc->reset = megasas_scsi_reset;
dc->vmsd = &vmstate_megasas; dc->vmsd = &vmstate_megasas;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
dc->desc = "LSI MegaRAID SAS 1078"; dc->desc = "LSI MegaRAID SAS 1078";
} }

View File

@ -1881,6 +1881,7 @@ const VMStateDescription vmstate_scsi_device = {
static void scsi_device_class_init(ObjectClass *klass, void *data) static void scsi_device_class_init(ObjectClass *klass, void *data)
{ {
DeviceClass *k = DEVICE_CLASS(klass); DeviceClass *k = DEVICE_CLASS(klass);
set_bit(DEVICE_CATEGORY_STORAGE, k->categories);
k->bus_type = TYPE_SCSI_BUS; k->bus_type = TYPE_SCSI_BUS;
k->init = scsi_qdev_init; k->init = scsi_qdev_init;
k->unplug = scsi_qdev_unplug; k->unplug = scsi_qdev_unplug;

View File

@ -267,6 +267,7 @@ static void vhost_scsi_class_init(ObjectClass *klass, void *data)
VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass); VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
dc->exit = vhost_scsi_exit; dc->exit = vhost_scsi_exit;
dc->props = vhost_scsi_properties; dc->props = vhost_scsi_properties;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
vdc->init = vhost_scsi_init; vdc->init = vhost_scsi_init;
vdc->get_features = vhost_scsi_get_features; vdc->get_features = vhost_scsi_get_features;
vdc->set_config = vhost_scsi_set_config; vdc->set_config = vhost_scsi_set_config;

View File

@ -669,8 +669,10 @@ static Property virtio_scsi_properties[] = {
static void virtio_scsi_common_class_init(ObjectClass *klass, void *data) static void virtio_scsi_common_class_init(ObjectClass *klass, void *data)
{ {
VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass); VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
DeviceClass *dc = DEVICE_CLASS(klass);
vdc->get_config = virtio_scsi_get_config; vdc->get_config = virtio_scsi_get_config;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
} }
static void virtio_scsi_class_init(ObjectClass *klass, void *data) static void virtio_scsi_class_init(ObjectClass *klass, void *data)
@ -679,6 +681,7 @@ static void virtio_scsi_class_init(ObjectClass *klass, void *data)
VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass); VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
dc->exit = virtio_scsi_device_exit; dc->exit = virtio_scsi_device_exit;
dc->props = virtio_scsi_properties; dc->props = virtio_scsi_properties;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
vdc->init = virtio_scsi_device_init; vdc->init = virtio_scsi_device_init;
vdc->set_config = virtio_scsi_set_config; vdc->set_config = virtio_scsi_set_config;
vdc->get_features = virtio_scsi_get_features; vdc->get_features = virtio_scsi_get_features;

View File

@ -1197,6 +1197,7 @@ static void pvscsi_class_init(ObjectClass *klass, void *data)
dc->reset = pvscsi_reset; dc->reset = pvscsi_reset;
dc->vmsd = &vmstate_pvscsi; dc->vmsd = &vmstate_pvscsi;
dc->props = pvscsi_properties; dc->props = pvscsi_properties;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
k->config_write = pvscsi_write_config; k->config_write = pvscsi_write_config;
} }

View File

@ -592,6 +592,7 @@ static void emulated_class_initfn(ObjectClass *klass, void *data)
cc->exitfn = emulated_exitfn; cc->exitfn = emulated_exitfn;
cc->get_atr = emulated_get_atr; cc->get_atr = emulated_get_atr;
cc->apdu_from_guest = emulated_apdu_from_guest; cc->apdu_from_guest = emulated_apdu_from_guest;
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
dc->desc = "emulated smartcard"; dc->desc = "emulated smartcard";
dc->props = emulated_card_properties; dc->props = emulated_card_properties;
} }

View File

@ -392,6 +392,7 @@ static void passthru_class_initfn(ObjectClass *klass, void *data)
cc->exitfn = passthru_exitfn; cc->exitfn = passthru_exitfn;
cc->get_atr = passthru_get_atr; cc->get_atr = passthru_get_atr;
cc->apdu_from_guest = passthru_apdu_from_guest; cc->apdu_from_guest = passthru_apdu_from_guest;
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
dc->desc = "passthrough smartcard"; dc->desc = "passthrough smartcard";
dc->vmsd = &passthru_vmstate; dc->vmsd = &passthru_vmstate;
dc->props = passthru_card_properties; dc->props = passthru_card_properties;

View File

@ -673,6 +673,7 @@ static void usb_audio_class_init(ObjectClass *klass, void *data)
dc->vmsd = &vmstate_usb_audio; dc->vmsd = &vmstate_usb_audio;
dc->props = usb_audio_properties; dc->props = usb_audio_properties;
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
k->product_desc = "QEMU USB Audio Interface"; k->product_desc = "QEMU USB Audio Interface";
k->usb_desc = &desc_audio; k->usb_desc = &desc_audio;
k->init = usb_audio_initfn; k->init = usb_audio_initfn;

View File

@ -553,6 +553,7 @@ static void usb_bt_class_initfn(ObjectClass *klass, void *data)
uc->handle_data = usb_bt_handle_data; uc->handle_data = usb_bt_handle_data;
uc->handle_destroy = usb_bt_handle_destroy; uc->handle_destroy = usb_bt_handle_destroy;
dc->vmsd = &vmstate_usb_bt; dc->vmsd = &vmstate_usb_bt;
set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
} }
static const TypeInfo bt_info = { static const TypeInfo bt_info = {

View File

@ -658,6 +658,7 @@ static void usb_tablet_class_initfn(ObjectClass *klass, void *data)
uc->product_desc = "QEMU USB Tablet"; uc->product_desc = "QEMU USB Tablet";
dc->vmsd = &vmstate_usb_ptr; dc->vmsd = &vmstate_usb_ptr;
dc->props = usb_tablet_properties; dc->props = usb_tablet_properties;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
} }
static const TypeInfo usb_tablet_info = { static const TypeInfo usb_tablet_info = {
@ -677,6 +678,7 @@ static void usb_mouse_class_initfn(ObjectClass *klass, void *data)
uc->product_desc = "QEMU USB Mouse"; uc->product_desc = "QEMU USB Mouse";
uc->usb_desc = &desc_mouse; uc->usb_desc = &desc_mouse;
dc->vmsd = &vmstate_usb_ptr; dc->vmsd = &vmstate_usb_ptr;
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
} }
static const TypeInfo usb_mouse_info = { static const TypeInfo usb_mouse_info = {
@ -696,6 +698,7 @@ static void usb_keyboard_class_initfn(ObjectClass *klass, void *data)
uc->product_desc = "QEMU USB Keyboard"; uc->product_desc = "QEMU USB Keyboard";
uc->usb_desc = &desc_keyboard; uc->usb_desc = &desc_keyboard;
dc->vmsd = &vmstate_usb_kbd; dc->vmsd = &vmstate_usb_kbd;
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
} }
static const TypeInfo usb_keyboard_info = { static const TypeInfo usb_keyboard_info = {

View File

@ -574,6 +574,7 @@ static void usb_hub_class_initfn(ObjectClass *klass, void *data)
uc->handle_control = usb_hub_handle_control; uc->handle_control = usb_hub_handle_control;
uc->handle_data = usb_hub_handle_data; uc->handle_data = usb_hub_handle_data;
uc->handle_destroy = usb_hub_handle_destroy; uc->handle_destroy = usb_hub_handle_destroy;
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
dc->fw_name = "hub"; dc->fw_name = "hub";
dc->vmsd = &vmstate_usb_hub; dc->vmsd = &vmstate_usb_hub;
} }

View File

@ -1429,6 +1429,7 @@ static void usb_net_class_initfn(ObjectClass *klass, void *data)
uc->handle_control = usb_net_handle_control; uc->handle_control = usb_net_handle_control;
uc->handle_data = usb_net_handle_data; uc->handle_data = usb_net_handle_data;
uc->handle_destroy = usb_net_handle_destroy; uc->handle_destroy = usb_net_handle_destroy;
set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
dc->fw_name = "network"; dc->fw_name = "network";
dc->vmsd = &vmstate_usb_net; dc->vmsd = &vmstate_usb_net;
dc->props = net_properties; dc->props = net_properties;

View File

@ -590,6 +590,7 @@ static void usb_serial_class_initfn(ObjectClass *klass, void *data)
uc->handle_data = usb_serial_handle_data; uc->handle_data = usb_serial_handle_data;
dc->vmsd = &vmstate_usb_serial; dc->vmsd = &vmstate_usb_serial;
dc->props = serial_properties; dc->props = serial_properties;
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
} }
static const TypeInfo serial_info = { static const TypeInfo serial_info = {
@ -617,6 +618,7 @@ static void usb_braille_class_initfn(ObjectClass *klass, void *data)
uc->handle_data = usb_serial_handle_data; uc->handle_data = usb_serial_handle_data;
dc->vmsd = &vmstate_usb_serial; dc->vmsd = &vmstate_usb_serial;
dc->props = braille_properties; dc->props = braille_properties;
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
} }
static const TypeInfo braille_info = { static const TypeInfo braille_info = {

View File

@ -1449,6 +1449,7 @@ static void ccid_class_initfn(ObjectClass *klass, void *data)
dc->desc = "CCID Rev 1.1 smartcard reader"; dc->desc = "CCID Rev 1.1 smartcard reader";
dc->vmsd = &ccid_vmstate; dc->vmsd = &ccid_vmstate;
dc->props = ccid_properties; dc->props = ccid_properties;
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
} }
static const TypeInfo ccid_info = { static const TypeInfo ccid_info = {

View File

@ -746,6 +746,7 @@ static void usb_msd_class_initfn_common(ObjectClass *klass)
uc->handle_reset = usb_msd_handle_reset; uc->handle_reset = usb_msd_handle_reset;
uc->handle_control = usb_msd_handle_control; uc->handle_control = usb_msd_handle_control;
uc->handle_data = usb_msd_handle_data; uc->handle_data = usb_msd_handle_data;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
dc->fw_name = "storage"; dc->fw_name = "storage";
dc->vmsd = &vmstate_usb_msd; dc->vmsd = &vmstate_usb_msd;
} }

View File

@ -916,6 +916,7 @@ static void usb_uas_class_initfn(ObjectClass *klass, void *data)
uc->handle_control = usb_uas_handle_control; uc->handle_control = usb_uas_handle_control;
uc->handle_data = usb_uas_handle_data; uc->handle_data = usb_uas_handle_data;
uc->handle_destroy = usb_uas_handle_destroy; uc->handle_destroy = usb_uas_handle_destroy;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
dc->fw_name = "storage"; dc->fw_name = "storage";
dc->vmsd = &vmstate_usb_uas; dc->vmsd = &vmstate_usb_uas;
} }

View File

@ -362,6 +362,7 @@ static void usb_wacom_class_init(ObjectClass *klass, void *data)
uc->handle_control = usb_wacom_handle_control; uc->handle_control = usb_wacom_handle_control;
uc->handle_data = usb_wacom_handle_data; uc->handle_data = usb_wacom_handle_data;
uc->handle_destroy = usb_wacom_handle_destroy; uc->handle_destroy = usb_wacom_handle_destroy;
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
dc->desc = "QEMU PenPartner Tablet"; dc->desc = "QEMU PenPartner Tablet";
dc->vmsd = &vmstate_usb_wacom; dc->vmsd = &vmstate_usb_wacom;
} }

View File

@ -140,11 +140,13 @@ static const TypeInfo ehci_pci_type_info = {
static void ehci_data_class_init(ObjectClass *klass, void *data) static void ehci_data_class_init(ObjectClass *klass, void *data)
{ {
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
DeviceClass *dc = DEVICE_CLASS(klass);
EHCIPCIInfo *i = data; EHCIPCIInfo *i = data;
k->vendor_id = i->vendor_id; k->vendor_id = i->vendor_id;
k->device_id = i->device_id; k->device_id = i->device_id;
k->revision = i->revision; k->revision = i->revision;
set_bit(DEVICE_CATEGORY_USB, dc->categories);
} }
static struct EHCIPCIInfo ehci_pci_info[] = { static struct EHCIPCIInfo ehci_pci_info[] = {

View File

@ -70,6 +70,7 @@ static void ehci_sysbus_class_init(ObjectClass *klass, void *data)
dc->realize = usb_ehci_sysbus_realize; dc->realize = usb_ehci_sysbus_realize;
dc->vmsd = &vmstate_ehci_sysbus; dc->vmsd = &vmstate_ehci_sysbus;
dc->props = ehci_sysbus_properties; dc->props = ehci_sysbus_properties;
set_bit(DEVICE_CATEGORY_USB, dc->categories);
} }
static const TypeInfo ehci_type_info = { static const TypeInfo ehci_type_info = {
@ -85,7 +86,9 @@ static const TypeInfo ehci_type_info = {
static void ehci_xlnx_class_init(ObjectClass *oc, void *data) static void ehci_xlnx_class_init(ObjectClass *oc, void *data)
{ {
SysBusEHCIClass *sec = SYS_BUS_EHCI_CLASS(oc); SysBusEHCIClass *sec = SYS_BUS_EHCI_CLASS(oc);
DeviceClass *dc = DEVICE_CLASS(oc);
set_bit(DEVICE_CATEGORY_USB, dc->categories);
sec->capsbase = 0x100; sec->capsbase = 0x100;
sec->opregbase = 0x140; sec->opregbase = 0x140;
} }
@ -99,9 +102,11 @@ static const TypeInfo ehci_xlnx_type_info = {
static void ehci_exynos4210_class_init(ObjectClass *oc, void *data) static void ehci_exynos4210_class_init(ObjectClass *oc, void *data)
{ {
SysBusEHCIClass *sec = SYS_BUS_EHCI_CLASS(oc); SysBusEHCIClass *sec = SYS_BUS_EHCI_CLASS(oc);
DeviceClass *dc = DEVICE_CLASS(oc);
sec->capsbase = 0x0; sec->capsbase = 0x0;
sec->opregbase = 0x10; sec->opregbase = 0x10;
set_bit(DEVICE_CATEGORY_USB, dc->categories);
} }
static const TypeInfo ehci_exynos4210_type_info = { static const TypeInfo ehci_exynos4210_type_info = {
@ -113,9 +118,11 @@ static const TypeInfo ehci_exynos4210_type_info = {
static void ehci_tegra2_class_init(ObjectClass *oc, void *data) static void ehci_tegra2_class_init(ObjectClass *oc, void *data)
{ {
SysBusEHCIClass *sec = SYS_BUS_EHCI_CLASS(oc); SysBusEHCIClass *sec = SYS_BUS_EHCI_CLASS(oc);
DeviceClass *dc = DEVICE_CLASS(oc);
sec->capsbase = 0x100; sec->capsbase = 0x100;
sec->opregbase = 0x140; sec->opregbase = 0x140;
set_bit(DEVICE_CATEGORY_USB, dc->categories);
} }
static const TypeInfo ehci_tegra2_type_info = { static const TypeInfo ehci_tegra2_type_info = {
@ -183,11 +190,13 @@ static void fusbh200_ehci_init(Object *obj)
static void fusbh200_ehci_class_init(ObjectClass *oc, void *data) static void fusbh200_ehci_class_init(ObjectClass *oc, void *data)
{ {
SysBusEHCIClass *sec = SYS_BUS_EHCI_CLASS(oc); SysBusEHCIClass *sec = SYS_BUS_EHCI_CLASS(oc);
DeviceClass *dc = DEVICE_CLASS(oc);
sec->capsbase = 0x0; sec->capsbase = 0x0;
sec->opregbase = 0x10; sec->opregbase = 0x10;
sec->portscbase = 0x20; sec->portscbase = 0x20;
sec->portnr = 1; sec->portnr = 1;
set_bit(DEVICE_CATEGORY_USB, dc->categories);
} }
static const TypeInfo ehci_fusbh200_type_info = { static const TypeInfo ehci_fusbh200_type_info = {

View File

@ -1917,6 +1917,7 @@ static void ohci_pci_class_init(ObjectClass *klass, void *data)
k->device_id = PCI_DEVICE_ID_APPLE_IPID_USB; k->device_id = PCI_DEVICE_ID_APPLE_IPID_USB;
k->class_id = PCI_CLASS_SERIAL_USB; k->class_id = PCI_CLASS_SERIAL_USB;
k->no_hotplug = 1; k->no_hotplug = 1;
set_bit(DEVICE_CATEGORY_USB, dc->categories);
dc->desc = "Apple USB Controller"; dc->desc = "Apple USB Controller";
dc->props = ohci_pci_properties; dc->props = ohci_pci_properties;
} }
@ -1939,6 +1940,7 @@ static void ohci_sysbus_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass); DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = ohci_realize_pxa; dc->realize = ohci_realize_pxa;
set_bit(DEVICE_CATEGORY_USB, dc->categories);
dc->desc = "OHCI USB Controller"; dc->desc = "OHCI USB Controller";
dc->props = ohci_sysbus_properties; dc->props = ohci_sysbus_properties;
} }

View File

@ -1315,6 +1315,7 @@ static void uhci_class_init(ObjectClass *klass, void *data)
k->no_hotplug = 1; k->no_hotplug = 1;
dc->vmsd = &vmstate_uhci; dc->vmsd = &vmstate_uhci;
dc->props = uhci_properties; dc->props = uhci_properties;
set_bit(DEVICE_CATEGORY_USB, dc->categories);
u->info = *info; u->info = *info;
} }

View File

@ -3591,6 +3591,7 @@ static void xhci_class_init(ObjectClass *klass, void *data)
dc->vmsd = &vmstate_xhci; dc->vmsd = &vmstate_xhci;
dc->props = xhci_properties; dc->props = xhci_properties;
dc->reset = xhci_reset; dc->reset = xhci_reset;
set_bit(DEVICE_CATEGORY_USB, dc->categories);
k->init = usb_xhci_initfn; k->init = usb_xhci_initfn;
k->vendor_id = PCI_VENDOR_ID_NEC; k->vendor_id = PCI_VENDOR_ID_NEC;
k->device_id = PCI_DEVICE_ID_NEC_UPD720200; k->device_id = PCI_DEVICE_ID_NEC_UPD720200;

View File

@ -1351,6 +1351,7 @@ static void usb_host_class_initfn(ObjectClass *klass, void *data)
uc->flush_ep_queue = usb_host_flush_ep_queue; uc->flush_ep_queue = usb_host_flush_ep_queue;
dc->vmsd = &vmstate_usb_host; dc->vmsd = &vmstate_usb_host;
dc->props = usb_host_dev_properties; dc->props = usb_host_dev_properties;
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
} }
static TypeInfo usb_host_dev_info = { static TypeInfo usb_host_dev_info = {

View File

@ -1530,6 +1530,7 @@ static void usb_host_class_initfn(ObjectClass *klass, void *data)
uc->handle_destroy = usb_host_handle_destroy; uc->handle_destroy = usb_host_handle_destroy;
dc->vmsd = &vmstate_usb_host; dc->vmsd = &vmstate_usb_host;
dc->props = usb_host_dev_properties; dc->props = usb_host_dev_properties;
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
} }
static const TypeInfo usb_host_dev_info = { static const TypeInfo usb_host_dev_info = {

View File

@ -2362,6 +2362,7 @@ static void usbredir_class_initfn(ObjectClass *klass, void *data)
uc->ep_stopped = usbredir_ep_stopped; uc->ep_stopped = usbredir_ep_stopped;
dc->vmsd = &usbredir_vmstate; dc->vmsd = &usbredir_vmstate;
dc->props = usbredir_properties; dc->props = usbredir_properties;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
} }
static const TypeInfo usbredir_dev_info = { static const TypeInfo usbredir_dev_info = {

Some files were not shown because too many files have changed in this diff Show More