diff options
| author | Peter Xu | 2016-05-17 13:26:10 +0200 |
|---|---|---|
| committer | Michael S. Tsirkin | 2016-06-17 02:28:02 +0200 |
| commit | 4a94b3aa6d97dfa67a20c7a0315c9773352f0e8e (patch) | |
| tree | 9c12a5330bb5d1ed0f3ad4591d56940e45bd8b1c /net | |
| parent | Merge remote-tracking branch 'remotes/sstabellini/tags/xen-20160614-tag' into... (diff) | |
| download | qemu-4a94b3aa6d97dfa67a20c7a0315c9773352f0e8e.tar.gz qemu-4a94b3aa6d97dfa67a20c7a0315c9773352f0e8e.tar.xz qemu-4a94b3aa6d97dfa67a20c7a0315c9773352f0e8e.zip | |
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>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions
