|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] ioemu: fix multiple pci-attach/pci-detach
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1220262489 -3600
# Node ID 7eefe6399bcd51b60f2f486673ca9dcc0fbd1890
# Parent 05c7efee10a1d253b9b7f8b52464627aff441931
ioemu: fix multiple pci-attach/pci-detach by removing the meaningless irq_index
For HVM guest, we can't do pci-attach/pci-detach for >64 times due to
the meaningless checking in pci_register_device(). I made a test of
300 times of attach/detach and everything now works well.
Signed-off-by: Dexuan Cui <dexuan.cui@xxxxxxxxx>
---
tools/ioemu/hw/pci.c | 5 -----
tools/ioemu/vl.h | 2 --
2 files changed, 7 deletions(-)
diff -r 05c7efee10a1 -r 7eefe6399bcd tools/ioemu/hw/pci.c
--- a/tools/ioemu/hw/pci.c Sat Aug 30 08:36:02 2008 +0100
+++ b/tools/ioemu/hw/pci.c Mon Sep 01 10:48:09 2008 +0100
@@ -45,7 +45,6 @@ static void pci_update_mappings(PCIDevic
static void pci_update_mappings(PCIDevice *d);
target_phys_addr_t pci_mem_base;
-static int pci_irq_index;
static PCIBus *first_bus;
PCIBus *pci_register_bus(pci_set_irq_fn set_irq, pci_map_irq_fn map_irq,
@@ -114,9 +113,6 @@ PCIDevice *pci_register_device(PCIBus *b
{
PCIDevice *pci_dev;
- if (pci_irq_index >= PCI_DEVICES_MAX)
- return NULL;
-
if (devfn < 0) {
for(devfn = bus->devfn_min ; devfn < 256; devfn += 8) {
if ( !bus->devices[devfn] &&
@@ -140,7 +136,6 @@ PCIDevice *pci_register_device(PCIBus *b
config_write = pci_default_write_config;
pci_dev->config_read = config_read;
pci_dev->config_write = config_write;
- pci_dev->irq_index = pci_irq_index++;
bus->devices[devfn] = pci_dev;
return pci_dev;
}
diff -r 05c7efee10a1 -r 7eefe6399bcd tools/ioemu/vl.h
--- a/tools/ioemu/vl.h Sat Aug 30 08:36:02 2008 +0100
+++ b/tools/ioemu/vl.h Mon Sep 01 10:48:09 2008 +0100
@@ -812,8 +812,6 @@ struct PCIDevice {
/* do not access the following fields */
PCIConfigReadFunc *config_read;
PCIConfigWriteFunc *config_write;
- /* ??? This is a PC-specific hack, and should be removed. */
- int irq_index;
/* Current IRQ levels. Used internally by the generic PCI code. */
int irq_state[4];
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] ioemu: fix multiple pci-attach/pci-detach by removing the meaningless irq_index,
Xen patchbot-unstable <=
|
|
|
|
|