qemu-e2k/hw/pci
Peter Xu 4a94b3aa6d pci: fix pci_requester_id()
This fix SID verification failure when IOMMU IR is enabled with PCI
bridges. Existing pci_requester_id() is more like getting BDF info
only. Renaming it to pci_get_bdf(). Meanwhile, we provide the correct
implementation to get requester ID. VT-d spec 5.1.1 is a good reference
to go, though it talks only about interrupt delivery, the rule works
exactly the same for non-interrupt cases.

Currently, there are three use cases for pci_requester_id():

- PCIX status bits: here we need BDF only, not requester ID. Replacing
  with pci_get_bdf().
- PCIe Error injection and MSI delivery: for both these cases, we are
  looking for requester IDs. Here we should use the new impl.

To avoid a PCI walk every time we send MSI message, one requester_id
cache field is added to PCIDevice to cache the result when initialize
PCI device.

Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2016-06-17 03:28:02 +03:00
..
Makefile.objs pci-hotplug-old: Has been dead for five major releases, bury 2015-03-01 12:37:54 +01:00
msi.c Fix some typos found by codespell 2016-05-18 15:04:27 +03:00
msix.c msix: make msix_clr_pending() visible for clients 2016-06-02 10:42:09 +08:00
pci-stub.c pci: Clean up includes 2016-01-29 15:07:24 +00:00
pci.c pci: fix pci_requester_id() 2016-06-17 03:28:02 +03:00
pci_bridge.c Fix some typos found by codespell 2016-05-18 15:04:27 +03:00
pci_host.c pci: Clean up includes 2016-01-29 15:07:24 +00:00
pcie.c pcie: Introduce function for DSN capability creation 2016-06-02 10:42:26 +08:00
pcie_aer.c pcie_aer: expose pcie_aer_msg() interface 2016-02-19 09:42:28 -07:00
pcie_host.c pci: Clean up includes 2016-01-29 15:07:24 +00:00
pcie_port.c pci: Clean up includes 2016-01-29 15:07:24 +00:00
shpc.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
slotid_cap.c pci: Clean up includes 2016-01-29 15:07:24 +00:00