[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 100/108] pci: assign devfn to pci_dev before calling
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 100/108] pci: assign devfn to pci_dev before calling pci_device_iommu_address_space() |
Date: |
Wed, 6 Aug 2014 15:39:50 -0500 |
From: Le Tan <address@hidden>
In function do_pci_register_device() in file hw/pci/pci.c, move the assignment
of pci_dev->devfn to the position before the call to
pci_device_iommu_address_space(pci_dev) which will use the value of
pci_dev->devfn.
Fixes: 9eda7d373e9c691c070eddcbe3467b991f67f6bd
pci: Introduce helper to retrieve a PCI device's DMA address space
Cc: address@hidden
Signed-off-by: Le Tan <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
(cherry picked from commit efc8188e9398e54567b238b756eec2cc746cd2a4)
Signed-off-by: Michael Roth <address@hidden>
---
hw/pci/pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 2a9f08e..e05d60c 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -830,6 +830,7 @@ static PCIDevice *do_pci_register_device(PCIDevice
*pci_dev, PCIBus *bus,
}
pci_dev->bus = bus;
+ pci_dev->devfn = devfn;
dma_as = pci_device_iommu_address_space(pci_dev);
memory_region_init_alias(&pci_dev->bus_master_enable_region,
@@ -839,7 +840,6 @@ static PCIDevice *do_pci_register_device(PCIDevice
*pci_dev, PCIBus *bus,
address_space_init(&pci_dev->bus_master_as,
&pci_dev->bus_master_enable_region,
name);
- pci_dev->devfn = devfn;
pstrcpy(pci_dev->name, sizeof(pci_dev->name), name);
pci_dev->irq_state = 0;
pci_config_alloc(pci_dev);
--
1.9.1
- [Qemu-devel] [PATCH 095/108] sdhci: Fix misuse of qemu_free_irqs(), (continued)
- [Qemu-devel] [PATCH 095/108] sdhci: Fix misuse of qemu_free_irqs(), Michael Roth, 2014/08/06
- [Qemu-devel] [PATCH 092/108] nbd: Shutdown socket before closing., Michael Roth, 2014/08/06
- [Qemu-devel] [PATCH 093/108] SMBIOS: Rename symbols to better reflect future use, Michael Roth, 2014/08/06
- [Qemu-devel] [PATCH 096/108] hw: Fix qemu_allocate_irqs() leaks, Michael Roth, 2014/08/06
- [Qemu-devel] [PATCH 098/108] virtio: validate config_len on load, Michael Roth, 2014/08/06
- [Qemu-devel] [PATCH 081/108] KVM: Fix GSI number space limit, Michael Roth, 2014/08/06
- [Qemu-devel] [PATCH 097/108] virtio: out-of-bounds buffer write on invalid state load, Michael Roth, 2014/08/06
- [Qemu-devel] [PATCH 106/108] vmstate_xhci_event: fix unterminated field list, Michael Roth, 2014/08/06
- [Qemu-devel] [PATCH 102/108] disas/libvixl: prepend the include path of libvixl header files, Michael Roth, 2014/08/06
- [Qemu-devel] [PATCH 105/108] kvm-all: Use 'tmpcpu' instead of 'cpu' in sub-looping to avoid 'cpu' be NULL, Michael Roth, 2014/08/06
- [Qemu-devel] [PATCH 100/108] pci: assign devfn to pci_dev before calling pci_device_iommu_address_space(),
Michael Roth <=
- [Qemu-devel] [PATCH 108/108] hw/arm/boot: Set PC correctly when loading AArch64 ELF files, Michael Roth, 2014/08/06
- [Qemu-devel] [PATCH 104/108] cadence_uart: check for serial backend before using it., Michael Roth, 2014/08/06
- [Qemu-devel] [PATCH 103/108] s390x/kvm: synchronize guest floating point registers, Michael Roth, 2014/08/06
- [Qemu-devel] [PATCH 107/108] hw/misc/imx_ccm.c: Add missing VMState list terminator, Michael Roth, 2014/08/06
- [Qemu-devel] [PATCH 101/108] mc146818rtc: register the clock reset notifier on the right clock, Michael Roth, 2014/08/06
- [Qemu-devel] [PATCH 099/108] Allow mismatched virtio config-len, Michael Roth, 2014/08/06
- Re: [Qemu-devel] [000/108] Patch Round-up for stable 2.0.1, freeze on 2014-08-12, Eric Blake, 2014/08/06