aboutsummaryrefslogtreecommitdiff
path: root/hw/pci.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2009-06-18 15:14:09 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-06-22 10:15:29 -0500
commit1f5f6638c063514f193ca447d49fa95f8a574a69 (patch)
treebbfca84f5610579dccbbc632e96888cc5ce6b23e /hw/pci.c
parent5607c38820366954c38dd702e979499486057481 (diff)
downloadqemu-1f5f6638c063514f193ca447d49fa95f8a574a69.zip
qemu-1f5f6638c063514f193ca447d49fa95f8a574a69.tar.gz
qemu-1f5f6638c063514f193ca447d49fa95f8a574a69.tar.bz2
Make first argument of monitor command pci_add work
Simply pass the PCI address through qemu_pci_hot_add_nic() to pci_nic_init() and through qemu_pci_hot_add_storage() to pci_create(). Before, pci_device_hot_add() passed along the PCI bus to use, and ignored any user-specified slot. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/pci.c')
-rw-r--r--hw/pci.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/hw/pci.c b/hw/pci.c
index 260f75e..f2d7daf 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -237,23 +237,6 @@ int pci_read_devaddr(const char *addr, int *domp, int *busp, unsigned *slotp)
return pci_parse_devaddr(devaddr, domp, busp, slotp);
}
-int pci_assign_devaddr(const char *addr, int *domp, int *busp, unsigned *slotp)
-{
- char devaddr[32];
-
- if (!get_param_value(devaddr, sizeof(devaddr), "pci_addr", addr))
- return -1;
-
- if (!strcmp(devaddr, "auto")) {
- *domp = *busp = 0;
- *slotp = -1;
- /* want to support dom/bus auto-assign at some point */
- return 0;
- }
-
- return pci_parse_devaddr(devaddr, domp, busp, slotp);
-}
-
static PCIBus *pci_get_bus_devfn(int *devfnp, const char *devaddr)
{
int dom, bus;
@@ -820,7 +803,7 @@ void pci_info(Monitor *mon)
pci_for_each_device(0, pci_info_device);
}
-static PCIDevice *pci_create(const char *name, const char *devaddr)
+PCIDevice *pci_create(const char *name, const char *devaddr)
{
PCIBus *bus;
int devfn;