qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v3] fix pci_requester_id()
@ 2016-05-17  6:45 Peter Xu
  2016-05-17  6:45 ` [Qemu-devel] [PATCH v3] pci: " Peter Xu
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Xu @ 2016-05-17  6:45 UTC (permalink / raw)
  To: qemu-devel; +Cc: mst, pbonzini, jan.kiszka, rkrcmar, alex.williamson, peterx

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
  wrong.

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

Thanks,

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(-)

-- 
2.4.11

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-05-17  8:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-17  6:45 [Qemu-devel] [PATCH v3] fix pci_requester_id() Peter Xu
2016-05-17  6:45 ` [Qemu-devel] [PATCH v3] pci: " Peter Xu
2016-05-17  7:46   ` Michael S. Tsirkin
2016-05-17  8:00     ` Peter Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).