Re: [Qemu-devel] [RFC PATCH v2 3/3] VFIO: Type1 IOMMU mapping support for vGPU

2016-03-11 Thread Neo Jia
On Fri, Mar 11, 2016 at 10:56:24AM -0700, Alex Williamson wrote: > On Fri, 11 Mar 2016 08:55:44 -0800 > Neo Jia wrote: > > > > > Alex, what's your opinion on this? > > > > > > The sticky point is how vfio, which is only handling the vGPU, has a > > > reference to the physical

Re: [Qemu-devel] [RFC PATCH v2 3/3] VFIO: Type1 IOMMU mapping support for vGPU

2016-03-11 Thread Alex Williamson
On Fri, 11 Mar 2016 08:55:44 -0800 Neo Jia wrote: > On Fri, Mar 11, 2016 at 09:13:15AM -0700, Alex Williamson wrote: > > On Fri, 11 Mar 2016 04:46:23 + > > "Tian, Kevin" wrote: > > > > > > From: Neo Jia [mailto:c...@nvidia.com] > > > > Sent: Friday,

Re: [Qemu-devel] [RFC PATCH v2 3/3] VFIO: Type1 IOMMU mapping support for vGPU

2016-03-11 Thread Neo Jia
On Fri, Mar 11, 2016 at 09:13:15AM -0700, Alex Williamson wrote: > On Fri, 11 Mar 2016 04:46:23 + > "Tian, Kevin" wrote: > > > > From: Neo Jia [mailto:c...@nvidia.com] > > > Sent: Friday, March 11, 2016 12:20 PM > > > > > > On Thu, Mar 10, 2016 at 11:10:10AM +0800,

Re: [Qemu-devel] [RFC PATCH v2 3/3] VFIO: Type1 IOMMU mapping support for vGPU

2016-03-11 Thread Alex Williamson
On Fri, 11 Mar 2016 04:46:23 + "Tian, Kevin" wrote: > > From: Neo Jia [mailto:c...@nvidia.com] > > Sent: Friday, March 11, 2016 12:20 PM > > > > On Thu, Mar 10, 2016 at 11:10:10AM +0800, Jike Song wrote: > > > > > > >> Is it supposed to be the caller who should set

Re: [Qemu-devel] [RFC PATCH v2 3/3] VFIO: Type1 IOMMU mapping support for vGPU

2016-03-11 Thread Tian, Kevin
> From: Neo Jia > Sent: Friday, March 11, 2016 2:11 PM > > > Hi Jike, > > > > > > For vGPU, what we have is just a virtual device and a fake IOMMU group, > > > therefore > > > the actual interaction with the real GPU should be managed by the GPU > > > vendor driver. > > > > > > > Hi, Neo, > > >

Re: [Qemu-devel] [RFC PATCH v2 3/3] VFIO: Type1 IOMMU mapping support for vGPU

2016-03-10 Thread Neo Jia
On Fri, Mar 11, 2016 at 04:46:23AM +, Tian, Kevin wrote: > > From: Neo Jia [mailto:c...@nvidia.com] > > Sent: Friday, March 11, 2016 12:20 PM > > > > On Thu, Mar 10, 2016 at 11:10:10AM +0800, Jike Song wrote: > > > > > > >> Is it supposed to be the caller who should set > > > >> up IOMMU by

Re: [Qemu-devel] [RFC PATCH v2 3/3] VFIO: Type1 IOMMU mapping support for vGPU

2016-03-10 Thread Tian, Kevin
> From: Neo Jia [mailto:c...@nvidia.com] > Sent: Friday, March 11, 2016 12:20 PM > > On Thu, Mar 10, 2016 at 11:10:10AM +0800, Jike Song wrote: > > > > >> Is it supposed to be the caller who should set > > >> up IOMMU by DMA api such as dma_map_page(), after calling > > >>

Re: [Qemu-devel] [RFC PATCH v2 3/3] VFIO: Type1 IOMMU mapping support for vGPU

2016-03-10 Thread Neo Jia
On Thu, Mar 10, 2016 at 11:10:10AM +0800, Jike Song wrote: > > >> Is it supposed to be the caller who should set > >> up IOMMU by DMA api such as dma_map_page(), after calling > >> vgpu_dma_do_translate()? > >> > > > > Don't think you need to call dma_map_page here. Once you have the pfn > >

Re: [Qemu-devel] [RFC PATCH v2 3/3] VFIO: Type1 IOMMU mapping support for vGPU

2016-03-09 Thread Jike Song
On 03/08/2016 08:31 AM, Neo Jia wrote: > On Mon, Mar 07, 2016 at 02:07:15PM +0800, Jike Song wrote: >> Hi Neo, >> >> On Fri, Mar 4, 2016 at 3:00 PM, Neo Jia wrote: >>> On Wed, Mar 02, 2016 at 04:38:34PM +0800, Jike Song wrote: On 02/24/2016 12:24 AM, Kirti Wankhede wrote:

Re: [Qemu-devel] [RFC PATCH v2 3/3] VFIO: Type1 IOMMU mapping support for vGPU

2016-03-07 Thread Neo Jia
On Mon, Mar 07, 2016 at 02:07:15PM +0800, Jike Song wrote: > Hi Neo, > > On Fri, Mar 4, 2016 at 3:00 PM, Neo Jia wrote: > > On Wed, Mar 02, 2016 at 04:38:34PM +0800, Jike Song wrote: > >> On 02/24/2016 12:24 AM, Kirti Wankhede wrote: > >> > + vgpu_dma->size = map->size; > >> >

Re: [Qemu-devel] [RFC PATCH v2 3/3] VFIO: Type1 IOMMU mapping support for vGPU

2016-03-06 Thread Jike Song
Hi Neo, On Fri, Mar 4, 2016 at 3:00 PM, Neo Jia wrote: > On Wed, Mar 02, 2016 at 04:38:34PM +0800, Jike Song wrote: >> On 02/24/2016 12:24 AM, Kirti Wankhede wrote: >> > + vgpu_dma->size = map->size; >> > + >> > + vgpu_link_dma(vgpu_iommu, vgpu_dma); >> >> Hi Kirti & Neo, >>

Re: [Qemu-devel] [RFC PATCH v2 3/3] VFIO: Type1 IOMMU mapping support for vGPU

2016-03-03 Thread Neo Jia
On Wed, Mar 02, 2016 at 04:38:34PM +0800, Jike Song wrote: > On 02/24/2016 12:24 AM, Kirti Wankhede wrote: > > + vgpu_dma->size = map->size; > > + > > + vgpu_link_dma(vgpu_iommu, vgpu_dma); > > Hi Kirti & Neo, > > seems that no one actually setup mappings for IOMMU here? > Hi Jike, Yes.

Re: [Qemu-devel] [RFC PATCH v2 3/3] VFIO: Type1 IOMMU mapping support for vGPU

2016-03-02 Thread Jike Song
On 02/24/2016 12:24 AM, Kirti Wankhede wrote: > Aim of this module is to pin and unpin guest memory. > This module provides interface to GPU driver that can be used to map guest > physical memory into its kernel space driver. > Currently this module has duplicate code from vfio_iommu_type1.c >

[Qemu-devel] [RFC PATCH v2 3/3] VFIO: Type1 IOMMU mapping support for vGPU

2016-02-23 Thread Kirti Wankhede
Aim of this module is to pin and unpin guest memory. This module provides interface to GPU driver that can be used to map guest physical memory into its kernel space driver. Currently this module has duplicate code from vfio_iommu_type1.c Working on refining functions to reuse existing code in