Re: [RFC PATCH v4 4/7] PCI: Modify resource_alignment to support multiple devices

2016-03-20 Thread Alex Williamson
On Thu, 17 Mar 2016 19:28:34 +0800 Yongji Xie wrote: > On 2016/3/17 0:30, Alex Williamson wrote: > > On Mon, 7 Mar 2016 15:48:35 +0800 > > Yongji Xie wrote: > > > >> When vfio passthrough a PCI device of which MMIO BARs > >> are smaller than PAGE_SIZE, guest will not handle the > >> mmio acce

Re: [RFC PATCH v4 4/7] PCI: Modify resource_alignment to support multiple devices

2016-03-19 Thread Yongji Xie
On 2016/3/17 20:40, Alex Williamson wrote: On Thu, 17 Mar 2016 19:28:34 +0800 Yongji Xie wrote: On 2016/3/17 0:30, Alex Williamson wrote: On Mon, 7 Mar 2016 15:48:35 +0800 Yongji Xie wrote: When vfio passthrough a PCI device of which MMIO BARs are smaller than PAGE_SIZE, guest will not

Re: [RFC PATCH v4 4/7] PCI: Modify resource_alignment to support multiple devices

2016-03-19 Thread Alex Williamson
On Mon, 7 Mar 2016 15:48:35 +0800 Yongji Xie wrote: > When vfio passthrough 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 >

Re: [RFC PATCH v4 4/7] PCI: Modify resource_alignment to support multiple devices

2016-03-19 Thread Yongji Xie
On 2016/3/17 0:30, Alex Williamson wrote: On Mon, 7 Mar 2016 15:48:35 +0800 Yongji Xie wrote: When vfio passthrough 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 wil

[RFC PATCH v4 4/7] PCI: Modify resource_alignment to support multiple devices

2016-03-06 Thread Yongji Xie
When vfio passthrough 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. To solve this p