Re: [PATCH v5 4/4] PCI: Add a macro to set default alignment for all PCI devices

2016-09-29 Thread Yongji Xie
On 2016/9/29 22:00, Bjorn Helgaas wrote: On Tue, Sep 13, 2016 at 05:00:34PM +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 vf

Re: [PATCH v5 4/4] PCI: Add a macro to set default alignment for all PCI devices

2016-09-29 Thread Bjorn Helgaas
On Tue, Sep 13, 2016 at 05:00:34PM +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 passthrough on

[PATCH v5 4/4] PCI: Add a macro to set default alignment for all PCI devices

2016-09-13 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