Re: [PATCH v9 2/3] PCI: Add a macro to set default alignment for all PCI devices

2017-03-30 Thread Bjorn Helgaas
On Mon, Mar 27, 2017 at 09:25:50PM +1100, Benjamin Herrenschmidt wrote: > On Mon, 2017-03-27 at 21:17 +1100, Michael Ellerman wrote: > > > If so, is it acceptable to force that kernel to user 64K alignment > > > even > > > when it's running on non-PowerNV systems? > > > > Probably, but I'm not sur

Re: [PATCH v9 2/3] PCI: Add a macro to set default alignment for all PCI devices

2017-03-27 Thread Benjamin Herrenschmidt
On Mon, 2017-03-27 at 21:17 +1100, Michael Ellerman wrote: > > If so, is it acceptable to force that kernel to user 64K alignment > > even > > when it's running on non-PowerNV systems? > > Probably, but I'm not sure TBH. Benh will know, I'll try and get his > attention. Can we make the alignment

Re: [PATCH v9 2/3] PCI: Add a macro to set default alignment for all PCI devices

2017-03-27 Thread Michael Ellerman
Bjorn Helgaas writes: > > I don't know how powerpc kernels are built: can you build a kernel > that will run on PowerNV as well as on different powerpc systems? Yes you can. But there are some restrictions. You can only build a 64-bit OR a 32-bit kernel. And within 64-bit you can only build a *

Re: [PATCH v9 2/3] PCI: Add a macro to set default alignment for all PCI devices

2017-03-25 Thread Yongji Xie
On Thu, Mar 23, 2017 at 03:53:42PM -0500, Bjorn Helgaas wrote: > Hi Yongji, > > On Wed, Feb 15, 2017 at 02:45:05PM +0800, Yongji Xie wrote: >> When vfio passthroughs a PCI device of which MMIO BARs are >> smaller than PAGE_SIZE, guest will not handle the mmio >> accesses to the BARs which leads to

Re: [PATCH v9 2/3] PCI: Add a macro to set default alignment for all PCI devices

2017-03-23 Thread Bjorn Helgaas
On Thu, Mar 23, 2017 at 03:53:42PM -0500, Bjorn Helgaas wrote: > Hi Yongji, > > On Wed, Feb 15, 2017 at 02:45:05PM +0800, Yongji Xie wrote: > > When vfio passthroughs a PCI device of which MMIO BARs are > > smaller than PAGE_SIZE, guest will not handle the mmio > > accesses to the BARs which leads

Re: [PATCH v9 2/3] PCI: Add a macro to set default alignment for all PCI devices

2017-03-23 Thread Bjorn Helgaas
Hi Yongji, On Wed, Feb 15, 2017 at 02:45:05PM +0800, Yongji Xie wrote: > When vfio passthroughs a PCI device of which MMIO BARs are > smaller than PAGE_SIZE, guest will not handle the mmio > accesses to the BARs which leads to mmio emulations in host. > > This is because vfio will not allow to pa

[PATCH v9 2/3] PCI: Add a macro to set default alignment for all PCI devices

2017-02-14 Thread Yongji Xie
When vfio passthroughs a PCI device of which MMIO BARs are smaller than PAGE_SIZE, guest will not handle the mmio accesses to the BARs which leads to mmio emulations in host. This is because vfio will not allow to passthrough one BAR's mmio page which may be shared with other BARs. Otherwise, ther