Re: [Qemu-devel] [RFC PATCH v3 2/3] VFIO driver for vGPU device

2016-05-11 Thread Tian, Kevin
> From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Thursday, May 12, 2016 4:11 AM > On Wed, 11 May 2016 06:45:41 + > "Tian, Kevin" wrote: > > > > From: Alex Williamson > > > Sent: Thursday, May 05, 2016 1:06 AM > > > > > > + > > > > > > + ret = remap_pfn_range(vma, virtaddr

Re: [Qemu-devel] [RFC PATCH v3 2/3] VFIO driver for vGPU device

2016-05-11 Thread Alex Williamson
On Wed, 11 May 2016 06:45:41 + "Tian, Kevin" wrote: > > From: Alex Williamson > > Sent: Thursday, May 05, 2016 1:06 AM > > > > > + > > > > > + ret = remap_pfn_range(vma, virtaddr, pgoff, req_size, pg_prot); > > > > > > > > > > > > > So not supporting validate_map_request() means that

Re: [Qemu-devel] [RFC PATCH v3 2/3] VFIO driver for vGPU device

2016-05-10 Thread Tian, Kevin
> From: Alex Williamson > Sent: Thursday, May 05, 2016 1:06 AM > > > > + > > > > + ret = remap_pfn_range(vma, virtaddr, pgoff, req_size, pg_prot); > > > > > > So not supporting validate_map_request() means that the user can > > > directly mmap BARs of the host GPU and as shown below, we assum

Re: [Qemu-devel] [RFC PATCH v3 2/3] VFIO driver for vGPU device

2016-05-05 Thread Neo Jia
On Thu, May 05, 2016 at 09:24:26AM +, Tian, Kevin wrote: > > From: Alex Williamson > > Sent: Thursday, May 05, 2016 1:06 AM > > > > > + > > > > > +static int vgpu_dev_mmio_fault(struct vm_area_struct *vma, struct > > > > > vm_fault > > *vmf) > > > > > +{ > > > > > + int ret = 0; > > > > >

Re: [Qemu-devel] [RFC PATCH v3 2/3] VFIO driver for vGPU device

2016-05-05 Thread Tian, Kevin
> From: Alex Williamson > Sent: Thursday, May 05, 2016 1:06 AM > > > > + > > > > +static int vgpu_dev_mmio_fault(struct vm_area_struct *vma, struct > > > > vm_fault > *vmf) > > > > +{ > > > > + int ret = 0; > > > > + struct vfio_vgpu_device *vdev = vma->vm_private_data; > > > > +

Re: [Qemu-devel] [RFC PATCH v3 2/3] VFIO driver for vGPU device

2016-05-04 Thread Kirti Wankhede
On 5/5/2016 2:44 AM, Neo Jia wrote: On Wed, May 04, 2016 at 11:06:19AM -0600, Alex Williamson wrote: On Wed, 4 May 2016 03:23:13 + "Tian, Kevin" wrote: From: Alex Williamson [mailto:alex.william...@redhat.com] Sent: Wednesday, May 04, 2016 6:43 AM + + if (gpu_dev->ops->wr

Re: [Qemu-devel] [RFC PATCH v3 2/3] VFIO driver for vGPU device

2016-05-04 Thread Neo Jia
On Wed, May 04, 2016 at 11:06:19AM -0600, Alex Williamson wrote: > On Wed, 4 May 2016 03:23:13 + > "Tian, Kevin" wrote: > > > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > > Sent: Wednesday, May 04, 2016 6:43 AM > > > > + > > > > + if (gpu_dev->ops->write) {

Re: [Qemu-devel] [RFC PATCH v3 2/3] VFIO driver for vGPU device

2016-05-04 Thread Alex Williamson
On Wed, 4 May 2016 03:23:13 + "Tian, Kevin" wrote: > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Wednesday, May 04, 2016 6:43 AM > > > + > > > + if (gpu_dev->ops->write) { > > > + ret = gpu_dev->ops->write(vgpu_dev, > > > +

Re: [Qemu-devel] [RFC PATCH v3 2/3] VFIO driver for vGPU device

2016-05-04 Thread Kirti Wankhede
On 5/4/2016 4:13 AM, Alex Williamson wrote: > On Tue, 3 May 2016 00:10:40 +0530 >> obj-$(CONFIG_VGPU)+= vgpu.o >> +obj-$(CONFIG_VGPU_VFIO) += vgpu_vfio.o > > This is where we should add a new Kconfig entry for VGPU_VFIO, nothing > in patch 1 has any vfio depe

Re: [Qemu-devel] [RFC PATCH v3 2/3] VFIO driver for vGPU device

2016-05-03 Thread Tian, Kevin
> From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Wednesday, May 04, 2016 6:43 AM > > + > > + if (gpu_dev->ops->write) { > > + ret = gpu_dev->ops->write(vgpu_dev, > > + user_data, > > +

Re: [Qemu-devel] [RFC PATCH v3 2/3] VFIO driver for vGPU device

2016-05-03 Thread Alex Williamson
On Tue, 3 May 2016 00:10:40 +0530 Kirti Wankhede wrote: > VFIO driver registers with vGPU core driver. vGPU core driver creates vGPU > device and calls probe routine of vGPU VFIO driver. This vGPU VFIO driver adds > vGPU device to VFIO core module. > Main aim of this module is to manage all VFIO

[Qemu-devel] [RFC PATCH v3 2/3] VFIO driver for vGPU device

2016-05-02 Thread Kirti Wankhede
VFIO driver registers with vGPU core driver. vGPU core driver creates vGPU device and calls probe routine of vGPU VFIO driver. This vGPU VFIO driver adds vGPU device to VFIO core module. Main aim of this module is to manage all VFIO APIs for each vGPU device. Those are: - get region information fro