summaryrefslogtreecommitdiffstats
path: root/sys/amd64/vmm/io/iommu.h
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2016-09-30 01:13:57 +0000
committerjhb <jhb@FreeBSD.org>2016-09-30 01:13:57 +0000
commit052839dc77fe6edfe29682625c568465791c9f8f (patch)
tree763970cf0e269dc2086a290e054643da6b5f13ae /sys/amd64/vmm/io/iommu.h
parent9cd96c281de542b627873b9106cff2dceab6e654 (diff)
downloadFreeBSD-src-052839dc77fe6edfe29682625c568465791c9f8f.zip
FreeBSD-src-052839dc77fe6edfe29682625c568465791c9f8f.tar.gz
MFC 303881: Reliably return PCI_GETCONF_LAST_DEVICE from PCIOCGETCONF.
Previously the loop in PCIIOCGETCONF would terminate as soon as it found enough matches. Now it will continue iterating through the PCI device list and only terminate if it finds another matching device for which it has no room to store a conf structure. This means that PCI_GETCONF_LAST_DEVICE is reliably returned when the number of matching devices is equal to the number of slots in the matches buffer. For example, if a program requests the conf structure for a single PCI function with a specified domain/bus/slot/function it will now get PCI_GETCONF_LAST_DEVICE instead of PCI_GETCONF_MORE_DEVS. While here, simplify the loop conditional a bit more by explicitly breaking out of the loop if copyout() fails and removing a redundant i < pci_numdevs check. Sponsored by: Chelsio Communications
Diffstat (limited to 'sys/amd64/vmm/io/iommu.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud