]> Git Repo - qemu.git/commitdiff
q35: allow dynamic sysbus
authorMarcel Apfelbaum <[email protected]>
Mon, 27 Jun 2016 15:38:33 +0000 (18:38 +0300)
committerMichael S. Tsirkin <[email protected]>
Mon, 4 Jul 2016 11:50:01 +0000 (14:50 +0300)
Allow adding sysbus devices with -device on Q35.

At first Q35 will support only intel-iommu to be added this way,
however the command line will support all sysbus devices.

Mark with 'cannot_instantiate_with_device_add_yet' the ones
causing immediate problems (e.g. crashes).

Signed-off-by: Marcel Apfelbaum <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
hw/i386/pc_q35.c
hw/pci-bridge/pci_expander_bridge.c
hw/pci-host/piix.c
hw/pci-host/q35.c

index cd57bced1ae282b323572882fc2d375653f790ea..fbaf2e6ca2b131985fa6e0e554dc8cf8e9fab4db 100644 (file)
@@ -290,6 +290,7 @@ static void pc_q35_machine_options(MachineClass *m)
     m->default_machine_opts = "firmware=bios-256k.bin";
     m->default_display = "std";
     m->no_floppy = 1;
+    m->has_dynamic_sysbus = true;
 }
 
 static void pc_q35_2_7_machine_options(MachineClass *m)
index ba320bd857fb9920e7f152b07d155b8de21dba3f..ab8612158dd07c60a4036b1e46b566eef728b114 100644 (file)
@@ -149,6 +149,8 @@ static void pxb_host_class_init(ObjectClass *class, void *data)
     PCIHostBridgeClass *hc = PCI_HOST_BRIDGE_CLASS(class);
 
     dc->fw_name = "pci";
+    /* Reason: Internal part of the pxb/pxb-pcie device, not usable by itself */
+    dc->cannot_instantiate_with_device_add_yet = true;
     sbc->explicit_ofw_unit_address = pxb_host_ofw_unit_address;
     hc->root_bus_path = pxb_host_root_bus_path;
 }
index df2b0e26f5581462a0638b65934e8784cd6c62e3..7167e58a12dbf71234dfe2b0c1661935780bb2af 100644 (file)
@@ -865,6 +865,8 @@ static void i440fx_pcihost_class_init(ObjectClass *klass, void *data)
     dc->realize = i440fx_pcihost_realize;
     dc->fw_name = "pci";
     dc->props = i440fx_props;
+    /* Reason: needs to be wired up by pc_init1 */
+    dc->cannot_instantiate_with_device_add_yet = true;
 }
 
 static const TypeInfo i440fx_pcihost_info = {
index 03be05dc0ddbb56fd90a5bbf8aa25dcf65f70598..015003906a3b508f7a19b78c3af801d711eed3c2 100644 (file)
@@ -142,6 +142,8 @@ static void q35_host_class_init(ObjectClass *klass, void *data)
     hc->root_bus_path = q35_host_root_bus_path;
     dc->realize = q35_host_realize;
     dc->props = mch_props;
+    /* Reason: needs to be wired up by pc_q35_init */
+    dc->cannot_instantiate_with_device_add_yet = true;
     set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
     dc->fw_name = "pci";
 }
This page took 0.026192 seconds and 4 git commands to generate.