Re: [PATCH v1] vfio/pci: Avoid mapping BARs for devices with non-mappable BARs

Matthew Rosato <[email protected]> Tue, 4 Aug 2026 09:39:24 -0400
Newsgroups org.kernel.vger.kvm,org.kernel.vger.linux-kernel,org.kernel.vger.linux-s390
Message-ID <[email protected]>
>> The bar_mmap_supported flag describes something else, whether the BAR
>> can be mapped into the user address space.  My intention was only to
>> point out that there are BARs that cannot be mapped to the user address
>> space because either they're not MMIO or we can't safely map the full
>> page, therefore bar_mmap_supported is an invalid test for whether we
>> should request the region or iomap the BAR.
>>
>> Is there still a gap with the original proposal that I'm missing?
> 
> AFAICT this fix should be sufficient. I think Matt's question was to see
> if there were other cases for which bar_mmap_supported were set to
> false, that we need to consider here. But I will let him clarify to see
> if he has any concerns.

^ Yes exactly that.  To be clear: I am happy from the s390 side with the
fix as it is proposed.

My questions were basically trying to generate the conversation that was
just had in an effort to avoid another fix later.

So, with the context provided (thanks!):

Reviewed-by: Matthew Rosato <[email protected]>