The patchset allows arbitrary BAR mapping for vNTB PCI endpoint function. This was developed for the Renesas platform with requires a mapping that was not possible before: * BAR0 (1MB): CTRL+SPAD * BAR2 (1MB): MW0 * BAR4 (256B): Doorbell It is possible to setup the host side driver with the mapping above without any functional change but it makes sense to also add arbitrary mapping support there. This is will be sent in a dedicated series. The patchset should not change anything for existing users. Possible next steps: - Align the NTB endpoint function: I'd be happy to propose something there but I would only be able to compile test it since I do not have the HW to test it. - Expose BAR configuration in the CTRL registers: I've been doodling with the idea to add a few extra registers in the CTRL region to describe the BAR mapping of the other regions. That way, there would less chance for the 2 sides to become mis-aligned. I'm not certain it makes sense and would welcome others opinion on this :) Signed-off-by: Jerome Brunet <jbrunet@xxxxxxxxxxxx> --- Changes in v2: - Align commit description casing style - Delay adding MW4 enumeration to patch 3 - Apply renaming suggestion on patch 3 - Dropped patch 4 for the NTB: will be re-sent separately. - Link to v1: https://lore.kernel.org/r/20250505-pci-vntb-bar-mapping-v1-0-0e0d12b2fa71@xxxxxxxxxxxx --- Jerome Brunet (3): PCI: endpoint: pci-epf-vntb: Return an error code on bar init PCI: endpoint: pci-epf-vntb: Align mw naming with config names PCI: endpoint: pci-epf-vntb: Allow BAR assignment via configfs drivers/pci/endpoint/functions/pci-epf-vntb.c | 141 +++++++++++++++++++++++--- 1 file changed, 129 insertions(+), 12 deletions(-) --- base-commit: db2e86db6ec76de51aff24fb0ae43987d4c02355 change-id: 20250505-pci-vntb-bar-mapping-3cc3ff624e76 Best regards, -- Jerome