]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
PCI/IOV: Allow IOV resources to be resized in pci_resize_resource()
authorMichał Winiarski <michal.winiarski@intel.com>
Wed, 2 Jul 2025 09:35:20 +0000 (11:35 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 14 Jul 2025 20:04:18 +0000 (15:04 -0500)
commite200f4f7eab52bb7affcd92bf079958326c154d5
tree32b355f0f90de07624b6c46a2607d19b5724b07a
parent535bdbeaacf96a8c4ef8d726382fb8fae97f168f
PCI/IOV: Allow IOV resources to be resized in pci_resize_resource()

Similar to regular resizable BARs, VF BARs can also be resized.

The capability layout is the same as PCI_EXT_CAP_ID_REBAR, which means we
can reuse most of the implementation, the only difference being resource
size calculation (which is multiplied by total VFs) and memory decoding
(which is controlled by a separate VF MSE field in SR-IOV cap).

Extend the pci_resize_resource() function to accept IOV resources.

See PCIe r6.2, sec 7.8.7.

Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://patch.msgid.link/20250702093522.518099-4-michal.winiarski@intel.com
drivers/pci/iov.c
drivers/pci/pci.c
drivers/pci/pci.h
drivers/pci/setup-res.c