diff options
author | SeokYeon Hwang <syeon.hwang@samsung.com> | 2014-07-01 10:13:58 +0900 |
---|---|---|
committer | SeokYeon Hwang <syeon.hwang@samsung.com> | 2014-07-01 16:29:00 +0900 |
commit | 8bc618c0ea0370b7b2978f09aa2c79ffd0b0a1bf (patch) | |
tree | e323789c8b8982a5050e65bcb40f805a5e5913a6 /hw | |
parent | f77529557e852d45c97bdf8a3b7a61c689aa199d (diff) | |
download | qemu-8bc618c0ea0370b7b2978f09aa2c79ffd0b0a1bf.tar.gz qemu-8bc618c0ea0370b7b2978f09aa2c79ffd0b0a1bf.tar.bz2 qemu-8bc618c0ea0370b7b2978f09aa2c79ffd0b0a1bf.zip |
hotplug: new device hotplug system is introduced
Do not use old hotplug logic anymore.
"Hotplug logic" becomes independent of legacy mloop.
"mloop" will be removed.
Change-Id: Ib1c40cb9bb65e6f2d8a2310ad5a0c761184b6321
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/pci/pci-hotplug-old.c | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/hw/pci/pci-hotplug-old.c b/hw/pci/pci-hotplug-old.c index 555cf72b49..cf2caebfb1 100644 --- a/hw/pci/pci-hotplug-old.c +++ b/hw/pci/pci-hotplug-old.c @@ -261,52 +261,7 @@ static PCIDevice *qemu_pci_hot_add_storage(Monitor *mon, return dev; } -#ifdef CONFIG_MARU -static PCIDevice *qemu_pci_hot_add_keyboard(Monitor *mon, - const char *devaddr, - const char *opts) -{ - PCIDevice *dev; - PCIBus *root = pci_find_primary_bus(); - PCIBus *bus; - int devfn; - - if (!root) { - monitor_printf(mon, "no primary PCI bus (if there are multiple" - " PCI roots, you must use device_add instead)"); - return NULL; - } - - bus = pci_get_bus_devfn(&devfn, root, devaddr); - if (!bus) { - monitor_printf(mon, "Invalid PCI device address %s\n", devaddr); - return NULL; - } - - if (!((BusState*)bus)->allow_hotplug) { - monitor_printf(mon, "PCI bus doesn't support hotplug\n"); - return NULL; - } - - dev = pci_create(bus, devfn, "virtio-keyboard-pci"); - if (qdev_init(&dev->qdev) < 0) { - dev = NULL; - } - - return dev; -} -#endif /* CONFIG_MARU */ - -#ifdef CONFIG_MARU -void pci_device_hot_add(Monitor *mon, const QDict *qdict) -{ - do_pci_device_hot_add(mon, qdict); -} - -PCIDevice *do_pci_device_hot_add(Monitor *mon, const QDict *qdict) -#else void pci_device_hot_add(Monitor *mon, const QDict *qdict) -#endif { PCIDevice *dev = NULL; const char *pci_addr = qdict_get_str(qdict, "pci_addr"); @@ -329,10 +284,6 @@ void pci_device_hot_add(Monitor *mon, const QDict *qdict) dev = qemu_pci_hot_add_nic(mon, pci_addr, opts); } else if (strcmp(type, "storage") == 0) { dev = qemu_pci_hot_add_storage(mon, pci_addr, opts); -#ifdef CONFIG_MARU - } else if (strcmp(type, "keyboard") == 0) { - dev = qemu_pci_hot_add_keyboard(mon, pci_addr, opts); -#endif } else { monitor_printf(mon, "invalid type: %s\n", type); } @@ -344,9 +295,6 @@ void pci_device_hot_add(Monitor *mon, const QDict *qdict) PCI_FUNC(dev->devfn)); } else monitor_printf(mon, "failed to add %s\n", opts); -#ifdef CONFIG_MARU - return dev; -#endif } static int pci_device_hot_remove(Monitor *mon, const char *pci_addr) |