On Fri, Apr 14, 2017 at 4:52 PM, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> wrote: > On Fri, 2017-04-14 at 10:58 -0500, Bjorn Helgaas wrote: >> On Mon, Apr 10, 2017 at 07:58:13PM +0800, Yongji Xie wrote: >> > This overrides pcibios_default_alignment() to set default alignment >> > to PAGE_SIZE for all PCI devices on PowerNV platform. Thus sub-page >> > BARs would not share a page and could be mapped into guest when >> > VFIO >> > passthrough them. >> >> Thanks for doing this. This looks like a reasonable strategy to me, >> but it would be good to get a powerpc ack for it. > > I agree in principle. I'm surprised that PowerPC is the only one > interested here though, what about other platforms who want to use > KVM and PCI pass-through and use Linux to assign BARs ? If I understand correctly, the problem is with BARs smaller than a page, and this happens more on PowerPC because larger page sizes are more common there. Bjorn