From: sashiko-bot@kernel.org
To: "Marcin Bernatowicz" <marcin.bernatowicz@linux.intel.com>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH v2 2/3] PCI/IOV: Restore initial VF ReBAR sizes on SR-IOV disable/failure
Date: Mon, 03 Aug 2026 10:46:56 +0000 [thread overview]
Message-ID: <20260803104657.332411F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260803103007.209625-3-marcin.bernatowicz@linux.intel.com>
> PF drivers can resize a VF BAR via pci_iov_vf_bar_set_size(). The new
> size persists in config space. A subsequent reprobe/unplug-rescan may
> then cause the PCI core to reserve MMIO based on the inflated VF BAR
> registers in the SR-IOV capability, often multiplied by TotalVFs.
> On platforms with tight apertures, later SR-IOV enable can fail due to
> lack of space.
>
> Restore the initial VF BAR sizes saved at SR-IOV init time when SR-IOV
> is disabled and when SR-IOV enable fails. This covers both the resource
> allocation failures later in sriov_enable() and the earlier validation
> failures that can otherwise leave a resized VF BAR in hardware while
> num_VFs remains zero.
>
> Restore is only performed when VF Memory Space is disabled, which is the
> precondition of pci_iov_vf_bar_set_size() and is true at all the new
> call sites.
>
> Note: this changes user-visible behavior for drivers that rely on the
> resized VF BAR persisting across an enable/disable cycle. After this
> change drivers must call pci_iov_vf_bar_set_size() before each
> pci_enable_sriov() if a non-default size is desired.
>
> Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/5937
> Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260803103007.209625-1-marcin.bernatowicz@linux.intel.com?part=2
next prev parent reply other threads:[~2026-08-03 10:46 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
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 20:36 ` sashiko-bot
2026-05-05 17:00 ` [PATCH 3/3] PCI/IOV: Restore initial VF ReBAR sizes on PF release Marcin Bernatowicz
2026-05-05 21:17 ` sashiko-bot
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
2026-08-03 10:30 ` [PATCH v2 0/3] " Marcin Bernatowicz
2026-08-03 10:30 ` [PATCH v2 1/3] PCI/IOV: Remember initial VF BAR sizes Marcin Bernatowicz
2026-08-03 10:41 ` sashiko-bot
2026-08-03 10:30 ` [PATCH v2 2/3] PCI/IOV: Restore initial VF ReBAR sizes on SR-IOV disable/failure Marcin Bernatowicz
2026-08-03 10:46 ` sashiko-bot [this message]
2026-08-03 10:30 ` [PATCH v2 3/3] PCI/IOV: Restore initial VF ReBAR sizes on PF driver remove Marcin Bernatowicz
2026-08-03 10:41 ` sashiko-bot
2026-08-03 11:17 ` [PATCH v2 0/3] PCI/IOV: Restore initial VF BAR sizing after VF ReBAR Simon Richter
2026-08-04 11:39 ` Bernatowicz, Marcin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260803104657.332411F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=marcin.bernatowicz@linux.intel.com \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.