[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 01/25] pci: pci capability must be in PCI space
From: |
Jason Baron |
Subject: |
[Qemu-devel] [PATCH 01/25] pci: pci capability must be in PCI space |
Date: |
Thu, 13 Sep 2012 16:12:35 -0400 |
From: Isaku Yamahata <address@hidden>
pci capability must be in PCI space.
It can't lay in PCIe extended config space.
Signed-off-by: Isaku Yamahata <address@hidden>
Signed-off-by: Jason Baron <address@hidden>
---
hw/pci.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/hw/pci.c b/hw/pci.c
index 4d95984..b348596 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -1626,12 +1626,11 @@ PCIDevice *pci_create_simple(PCIBus *bus, int devfn,
const char *name)
return pci_create_simple_multifunction(bus, devfn, false, name);
}
-static int pci_find_space(PCIDevice *pdev, uint8_t size)
+static uint8_t pci_find_space(PCIDevice *pdev, uint8_t size)
{
- int config_size = pci_config_size(pdev);
int offset = PCI_CONFIG_HEADER_SIZE;
int i;
- for (i = PCI_CONFIG_HEADER_SIZE; i < config_size; ++i)
+ for (i = PCI_CONFIG_HEADER_SIZE; i < PCI_CONFIG_SPACE_SIZE; ++i)
if (pdev->used[i])
offset = i + 1;
else if (i - offset + 1 == size)
--
1.7.1
- [Qemu-devel] [PATCH 15/25] q35: smbus: Remove PCI_STATUS_SIG_SYSTEM_ERROR and PCI_STATUS_DETECTED_PARITY from w1cmask, (continued)
- [Qemu-devel] [PATCH 15/25] q35: smbus: Remove PCI_STATUS_SIG_SYSTEM_ERROR and PCI_STATUS_DETECTED_PARITY from w1cmask, Jason Baron, 2012/09/13
- [Qemu-devel] [PATCH 09/25] pcie: pass pcie window size to pcie_host_mmcfg_update(), Jason Baron, 2012/09/13
- [Qemu-devel] [PATCH 17/25] q35: Add kvmclock support, Jason Baron, 2012/09/13
- [Qemu-devel] [PATCH 14/25] q35: Fix non-PCI IRQ processing in ich9_lpc_update_apic, Jason Baron, 2012/09/13
- [Qemu-devel] [PATCH 20/25] pcie: drop version_id field for live migration, Jason Baron, 2012/09/13
- [Qemu-devel] [PATCH 25/25] q35: automatically load the q35 dsdt table, Jason Baron, 2012/09/13
- [Qemu-devel] [PATCH 22/25] ahci: properly reset PxCMD on HBA reset, Jason Baron, 2012/09/13
- [Qemu-devel] [PATCH 01/25] pci: pci capability must be in PCI space,
Jason Baron <=
- [Qemu-devel] [PATCH 05/25] pc, pc_piix: split out pc nic initialization, Jason Baron, 2012/09/13
- [Qemu-devel] [PATCH 19/25] ahci: add migration support, Jason Baron, 2012/09/13
- [Qemu-devel] [PATCH 21/25] pcie_aer: clear cmask for Advanced Error Interrupt Message Number, Jason Baron, 2012/09/13
- [Qemu-devel] [PATCH 11/25] q35: Introduce q35 pc based chipset emulator, Jason Baron, 2012/09/13