[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v3] fix pci_requester_id()

From: Peter Xu
Subject: [Qemu-devel] [PATCH v3] fix pci_requester_id()
Date: Tue, 17 May 2016 14:45:06 +0800

This is v3 to fix pci_requester_id() issue.

I avoided detecting root bus type since it seems not matter much if
we will directly drop them for non-pcie cases.

Also, I used zero to indicate uncached requester_id (assuming that
BDF 0x0000 is never used by any device).

v3 changes:
- add empty line after local var defines
- enhance comments to explain reason than what is done, also fix
  some english errors in comments
- add requester_id cache: Here I didn't cache the PCI device but
  requester ID directly, since for pcie-to-pci case we are not
  returning BDF but (secondary bus num, 0) pair. So if to cache with
  device, we need one more field, which is complicated. This is
  based on the assumption that requester_id will not change for a
  device lifecycle (is it possible that guest kernel modify
  bus number during runtime?). Anyway, please let me know if I am

Test done: IOMMU IR v7 (not yet posted) work with pci-pci bridges.


Peter Xu (1):
  pci: fix pci_requester_id()

 hw/i386/kvm/pci-assign.c |  2 +-
 hw/pci/pci.c             | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 include/hw/pci/pci.h     | 11 +++++++++--
 3 files changed, 56 insertions(+), 3 deletions(-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]