mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
hw/pci: Introduce pci_requester_id()
For GICv3 ITS implementation we are going to use requester IDs in KVM IRQ routing code. This patch introduces reusable convenient way to obtain this ID from the device pointer. The new function is now used in some places, where the same calculation was used. MemTxAttrs.stream_id also renamed to requester_id in order to better reflect semantics of the field. Signed-off-by: Pavel Fedin <p.fedin@samsung.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Message-Id: <5814bcb03a297f198e796b13ed9c35059c52f89b.1444916432.git.p.fedin@samsung.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
50bf31b937
commit
a05f686ff3
5 changed files with 10 additions and 5 deletions
|
@ -1483,7 +1483,7 @@ static int assigned_device_pci_cap_init(PCIDevice *pci_dev, Error **errp)
|
|||
* error bits, leave the rest. */
|
||||
status = pci_get_long(pci_dev->config + pos + PCI_X_STATUS);
|
||||
status &= ~(PCI_X_STATUS_BUS | PCI_X_STATUS_DEVFN);
|
||||
status |= (pci_bus_num(pci_dev->bus) << 8) | pci_dev->devfn;
|
||||
status |= pci_requester_id(pci_dev);
|
||||
status &= ~(PCI_X_STATUS_SPL_DISC | PCI_X_STATUS_UNX_SPL |
|
||||
PCI_X_STATUS_SPL_ERR);
|
||||
pci_set_long(pci_dev->config + pos + PCI_X_STATUS, status);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue