[PATCH 2/2] bus/pci: add selective BAR mapping support
Stephen Hemminger
stephen at networkplumber.org
Mon Nov 23 18:03:20 CET 2026
On Mon, 23 Nov 2026 08:57:45 +0100
David Marchand <david.marchand at redhat.com> wrote:
> On Mon, 23 Nov 2026 at 07:13, Cheryl Bansal <cheryl.bansal at altera.com> wrote:
> >
> > Drivers that only need a subset of PCI BARs still pay the cost of
> > mapping every valid BAR. There is no bus-level way to select which
> > BARs are mapped without changing each PMD.
> >
> > Add the bar_mask PCI bus argument to select which BARs to map. If it
> > is omitted, all valid BARs are mapped. A zero mask, a value outside
> > BAR0-BAR5, or a malformed value is rejected. The argument is parsed
> > from bus_str so it is not passed to PMDs. UIO and VFIO map slots are
> > indexed by BAR number so primary and secondary processes stay
> > consistent when some BARs are skipped.
> >
> > Example: -a bus=pci,addr=0000:01:00.0,bar_mask=0x05
> >
> > Signed-off-by: Cheryl Bansal <cheryl.bansal at altera.com>
>
> Clearly too late for 26.11.
> And don't Cc: stable.
>
>
> Adding a devargs looks like a bad idea.
> Why should a user know about such an internal consideration?
>
> A change in the internal PCI bus API seems a better direction.
>
> I wonder, which DPDK in-tree driver would benefit from this change?
>
>
Agree. Too late for 26.11 and devargs is not the best way to handle.
I wonder if bus API could allow probe to reject a device?
How does Linux and FreeBSD handle it?
More information about the dev
mailing list