aboutsummaryrefslogtreecommitdiff
path: root/lib/test_overflow.c
diff options
context:
space:
mode:
authorBjorn Helgaas <[email protected]>2019-01-19 11:35:04 -0600
committerBjorn Helgaas <[email protected]>2019-01-22 12:56:35 -0600
commit51c48b310183ab6ba5419edfc6a8de889cc04521 (patch)
tree3492cf9bfc81f046cd3259ee48d6d55231086b8a /lib/test_overflow.c
parentbfeffd155283772bbe78c6a05dec7c0128ee500c (diff)
PCI: Probe bridge window attributes once at enumeration-time
pci_bridge_check_ranges() determines whether a bridge supports the optional I/O and prefetchable memory windows and sets the flag bits in the bridge resources. This *could* be done once during enumeration except that the resource allocation code completely clears the flag bits, e.g., in the pci_assign_unassigned_bridge_resources() path. The problem with pci_bridge_check_ranges() in the resource allocation path is that we may allocate resources after devices have been claimed by drivers, and pci_bridge_check_ranges() *changes* the window registers to determine whether they're writable. This may break concurrent accesses to devices behind the bridge. Add a new pci_read_bridge_windows() to determine whether a bridge supports the optional windows, call it once during enumeration, remember the results, and change pci_bridge_check_ranges() so it doesn't touch the bridge windows but sets the flag bits based on those remembered results. Link: https://lore.kernel.org/linux-pci/[email protected] Link: https://lists.gnu.org/archive/html/qemu-devel/2018-12/msg02082.html Reported-by: Yandong Xu <[email protected]> Tested-by: Yandong Xu <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Cc: Michael S. Tsirkin <[email protected]> Cc: Sagi Grimberg <[email protected]> Cc: Ofer Hayut <[email protected]> Cc: Roy Shterman <[email protected]> Cc: Keith Busch <[email protected]> Cc: Zhou Wang <[email protected]>
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions