Re: [PATCH v4] vfio-pci: Allow to mmap sub-page MMIO BARs if the mmio page is exclusive

2016-06-29 Thread Yongji Xie
On 2016/6/30 10:53, Alex Williamson wrote: On Thu, 30 Jun 2016 10:40:23 +0800 Yongji Xie wrote: Hi Alex, On 2016/6/30 4:03, Alex Williamson wrote: On Tue, 28 Jun 2016 13:47:23 -0600 Alex Williamson wrote: On Tue, 28 Jun 2016 18:09:46 +0800 Yongji Xie wrote: Hi, Alex On 2016/6/25

Re: [PATCH v4] vfio-pci: Allow to mmap sub-page MMIO BARs if the mmio page is exclusive

2016-06-29 Thread Alex Williamson
On Thu, 30 Jun 2016 10:40:23 +0800 Yongji Xie wrote: > Hi Alex, > > On 2016/6/30 4:03, Alex Williamson wrote: > > > On Tue, 28 Jun 2016 13:47:23 -0600 > > Alex Williamson wrote: > > > >> On Tue, 28 Jun 2016 18:09:46 +0800 > >> Yongji Xie wrote: > >> > >>> Hi, Alex > >>> > >>> On 2016/6/25

Re: [PATCH v4] vfio-pci: Allow to mmap sub-page MMIO BARs if the mmio page is exclusive

2016-06-29 Thread Yongji Xie
Hi Alex, On 2016/6/30 4:03, Alex Williamson wrote: On Tue, 28 Jun 2016 13:47:23 -0600 Alex Williamson wrote: On Tue, 28 Jun 2016 18:09:46 +0800 Yongji Xie wrote: Hi, Alex On 2016/6/25 0:43, Alex Williamson wrote: On Fri, 24 Jun 2016 23:37:02 +0800 Yongji Xie wrote: Hi, Alex

Re: [PATCH v4] vfio-pci: Allow to mmap sub-page MMIO BARs if the mmio page is exclusive

2016-06-29 Thread Alex Williamson
On Tue, 28 Jun 2016 13:47:23 -0600 Alex Williamson wrote: > On Tue, 28 Jun 2016 18:09:46 +0800 > Yongji Xie wrote: > > > Hi, Alex > > > > On 2016/6/25 0:43, Alex Williamson wrote: > > > > > On Fri, 24 Jun 2016 23:37:02 +0800 > > > Yongji Xie wrote: > > > > > >> Hi, Alex > > >> > > >> O

Re: [PATCH v4] vfio-pci: Allow to mmap sub-page MMIO BARs if the mmio page is exclusive

2016-06-28 Thread Alex Williamson
On Tue, 28 Jun 2016 18:09:46 +0800 Yongji Xie wrote: > Hi, Alex > > On 2016/6/25 0:43, Alex Williamson wrote: > > > On Fri, 24 Jun 2016 23:37:02 +0800 > > Yongji Xie wrote: > > > >> Hi, Alex > >> > >> On 2016/6/24 11:37, Alex Williamson wrote: > >> > >>> On Fri, 24 Jun 2016 10:52:58 +0800

Re: [PATCH v4] vfio-pci: Allow to mmap sub-page MMIO BARs if the mmio page is exclusive

2016-06-28 Thread Yongji Xie
Hi, Alex On 2016/6/25 0:43, Alex Williamson wrote: On Fri, 24 Jun 2016 23:37:02 +0800 Yongji Xie wrote: Hi, Alex On 2016/6/24 11:37, Alex Williamson wrote: On Fri, 24 Jun 2016 10:52:58 +0800 Yongji Xie wrote: On 2016/6/24 0:12, Alex Williamson wrote: On Mon, 30 May 2016 21:06:37 +0800

Re: [PATCH v4] vfio-pci: Allow to mmap sub-page MMIO BARs if the mmio page is exclusive

2016-06-24 Thread Alex Williamson
On Fri, 24 Jun 2016 23:37:02 +0800 Yongji Xie wrote: > Hi, Alex > > On 2016/6/24 11:37, Alex Williamson wrote: > > > On Fri, 24 Jun 2016 10:52:58 +0800 > > Yongji Xie wrote: > >> On 2016/6/24 0:12, Alex Williamson wrote: > >>> On Mon, 30 May 2016 21:06:37 +0800 > >>> Yongji Xie wrote: >

Re: [PATCH v4] vfio-pci: Allow to mmap sub-page MMIO BARs if the mmio page is exclusive

2016-06-24 Thread Yongji Xie
Hi, Alex On 2016/6/24 11:37, Alex Williamson wrote: On Fri, 24 Jun 2016 10:52:58 +0800 Yongji Xie wrote: On 2016/6/24 0:12, Alex Williamson wrote: On Mon, 30 May 2016 21:06:37 +0800 Yongji Xie wrote: +static void vfio_pci_probe_mmaps(struct vfio_pci_device *vdev) +{ + struct resource

RE: [PATCH v4] vfio-pci: Allow to mmap sub-page MMIO BARs if the mmio page is exclusive

2016-06-23 Thread Tian, Kevin
> From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Friday, June 24, 2016 11:37 AM > > On Fri, 24 Jun 2016 10:52:58 +0800 > Yongji Xie wrote: > > On 2016/6/24 0:12, Alex Williamson wrote: > > > On Mon, 30 May 2016 21:06:37 +0800 > > > Yongji Xie wrote: > > >> +static void vfio_pc

Re: [PATCH v4] vfio-pci: Allow to mmap sub-page MMIO BARs if the mmio page is exclusive

2016-06-23 Thread Alex Williamson
On Fri, 24 Jun 2016 10:52:58 +0800 Yongji Xie wrote: > On 2016/6/24 0:12, Alex Williamson wrote: > > On Mon, 30 May 2016 21:06:37 +0800 > > Yongji Xie wrote: > >> +static void vfio_pci_probe_mmaps(struct vfio_pci_device *vdev) > >> +{ > >> + struct resource *res; > >> + int bar; > >> + struct

Re: [PATCH v4] vfio-pci: Allow to mmap sub-page MMIO BARs if the mmio page is exclusive

2016-06-23 Thread Yongji Xie
Hi, Alex On 2016/6/24 0:12, Alex Williamson wrote: On Mon, 30 May 2016 21:06:37 +0800 Yongji Xie wrote: Current vfio-pci implementation disallows to mmap sub-page(size < PAGE_SIZE) MMIO BARs because these BARs' mmio page may be shared with other BARs. This will cause some performance issues

Re: [PATCH v4] vfio-pci: Allow to mmap sub-page MMIO BARs if the mmio page is exclusive

2016-06-23 Thread Alex Williamson
On Mon, 30 May 2016 21:06:37 +0800 Yongji Xie wrote: > Current vfio-pci implementation disallows to mmap > sub-page(size < PAGE_SIZE) MMIO BARs because these BARs' mmio > page may be shared with other BARs. This will cause some > performance issues when we passthrough a PCI device with > this kin

Re: [PATCH v4] vfio-pci: Allow to mmap sub-page MMIO BARs if the mmio page is exclusive

2016-06-22 Thread Alex Williamson
On Thu, 23 Jun 2016 10:39:30 +0800 Yongji Xie wrote: > Hi, Alex > > On 2016/6/23 6:04, Alex Williamson wrote: > > > On Mon, 30 May 2016 21:06:37 +0800 > > Yongji Xie wrote: > > > >> Current vfio-pci implementation disallows to mmap > >> sub-page(size < PAGE_SIZE) MMIO BARs because these BARs

Re: [PATCH v4] vfio-pci: Allow to mmap sub-page MMIO BARs if the mmio page is exclusive

2016-06-22 Thread Yongji Xie
Hi, Alex On 2016/6/23 6:04, Alex Williamson wrote: On Mon, 30 May 2016 21:06:37 +0800 Yongji Xie wrote: Current vfio-pci implementation disallows to mmap sub-page(size < PAGE_SIZE) MMIO BARs because these BARs' mmio page may be shared with other BARs. This will cause some performance issues

Re: [PATCH v4] vfio-pci: Allow to mmap sub-page MMIO BARs if the mmio page is exclusive

2016-06-22 Thread Alex Williamson
On Mon, 30 May 2016 21:06:37 +0800 Yongji Xie wrote: > Current vfio-pci implementation disallows to mmap > sub-page(size < PAGE_SIZE) MMIO BARs because these BARs' mmio > page may be shared with other BARs. This will cause some > performance issues when we passthrough a PCI device with > this kin

[PATCH v4] vfio-pci: Allow to mmap sub-page MMIO BARs if the mmio page is exclusive

2016-05-30 Thread Yongji Xie
Current vfio-pci implementation disallows to mmap sub-page(size < PAGE_SIZE) MMIO BARs because these BARs' mmio page may be shared with other BARs. This will cause some performance issues when we passthrough a PCI device with this kind of BARs. Guest will be not able to handle the mmio accesses to