public inbox for intel-xe@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 0/3] PCI/IOV: Restore initial VF BAR sizing after VF ReBAR
@ 2026-05-05 17:00 Marcin Bernatowicz
  2026-05-05 17:00 ` [PATCH 1/3] PCI/IOV: Remember initial VF BAR sizes Marcin Bernatowicz
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Marcin Bernatowicz @ 2026-05-05 17:00 UTC (permalink / raw)
  To: Bjorn Helgaas, linux-pci, linux-kernel
  Cc: Michal Wajdeczko, Michał Winiarski, Ilpo Järvinen,
	Krzysztof Wilczyński, Thomas Hellström, Rodrigo Vivi,
	intel-xe, Marcin Bernatowicz

PF drivers can resize a VF BAR using VF Resizable BAR (ReBAR) support via
pci_iov_vf_bar_set_size(). The new size persists in the SR-IOV capability
config space. A later reprobe / unplug-rescan / next pci_enable_sriov()
then sees the inflated VF BAR registers, and the PCI core reserves MMIO
based on that size multiplied by TotalVFs.

On platforms with tight apertures, this can make subsequent SR-IOV enable
fail due to lack of address space.

This series records the initial per-VF BAR sizes during SR-IOV init and
restores those sizes when SR-IOV is disabled, when SR-IOV enable fails,
or when the PF driver is unbound.

Note on user-visible behavior: drivers that rely on a resized VF BAR
persisting across an enable/disable cycle must now call
pci_iov_vf_bar_set_size() again before each pci_enable_sriov().

Marcin Bernatowicz (3):
  PCI/IOV: Remember initial VF BAR sizes
  PCI/IOV: Restore initial VF ReBAR sizes on SR-IOV disable/failure
  PCI/IOV: Restore initial VF ReBAR sizes on PF release

 drivers/pci/iov.c | 64 +++++++++++++++++++++++++++++++++++++++++------
 drivers/pci/pci.h |  3 ++-
 2 files changed, 59 insertions(+), 8 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2026-05-05 17:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-05 17:00 [PATCH 0/3] PCI/IOV: Restore initial VF BAR sizing after VF ReBAR Marcin Bernatowicz
2026-05-05 17:00 ` [PATCH 1/3] PCI/IOV: Remember initial VF BAR sizes Marcin Bernatowicz
2026-05-05 17:00 ` [PATCH 2/3] PCI/IOV: Restore initial VF ReBAR sizes on SR-IOV disable/failure Marcin Bernatowicz
2026-05-05 17:00 ` [PATCH 3/3] PCI/IOV: Restore initial VF ReBAR sizes on PF release Marcin Bernatowicz
2026-05-05 17:05 ` ✗ CI.checkpatch: warning for PCI/IOV: Restore initial VF BAR sizing after VF ReBAR Patchwork
2026-05-05 17:07 ` ✓ CI.KUnit: success " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox