]> xenbits.xensource.com Git - qemu-xen.git/commit
pci: assign devfn to pci_dev before calling pci_device_iommu_address_space()
authorLe Tan <tamlokveer@gmail.com>
Wed, 2 Jul 2014 00:06:35 +0000 (08:06 +0800)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 6 Aug 2014 19:55:49 +0000 (14:55 -0500)
commit210ec8f757f0945f0d47ecbaee43b87a7ba0c141
tree162ae4f05f45215ced07437c06fad3ca9276fc1a
parent55103ab3b4f1ab43adb02a5ea52db132f96413fe
pci: assign devfn to pci_dev before calling pci_device_iommu_address_space()

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: qemu-stable@nongnu.org
Signed-off-by: Le Tan <tamlokveer@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit efc8188e9398e54567b238b756eec2cc746cd2a4)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/pci/pci.c