Re: [PATCH 3/8] vfio: add external user support

2013-07-08 Thread Alex Williamson
On Sun, 2013-07-07 at 01:07 +1000, Alexey Kardashevskiy wrote: VFIO is designed to be used via ioctls on file descriptors returned by VFIO. However in some situations support for an external user is required. The first user is KVM on PPC64 (SPAPR TCE protocol) which is going to use the

Re: [PATCH 3/8] vfio: add external user support

2013-07-08 Thread Alexey Kardashevskiy
On 07/09/2013 07:52 AM, Alex Williamson wrote: On Sun, 2013-07-07 at 01:07 +1000, Alexey Kardashevskiy wrote: VFIO is designed to be used via ioctls on file descriptors returned by VFIO. However in some situations support for an external user is required. The first user is KVM on PPC64

[PATCH 3/8] vfio: add external user support

2013-07-06 Thread Alexey Kardashevskiy
VFIO is designed to be used via ioctls on file descriptors returned by VFIO. However in some situations support for an external user is required. The first user is KVM on PPC64 (SPAPR TCE protocol) which is going to use the existing VFIO groups for exclusive access in real/virtual mode on a host

Re: [PATCH 3/8] vfio: add external user support

2013-06-27 Thread Stephen Rothwell
Hi Alexy, On Thu, 27 Jun 2013 15:02:31 +1000 Alexey Kardashevskiy a...@ozlabs.ru wrote: index c488da5..54192b2 100644 --- a/drivers/vfio/vfio.c +++ b/drivers/vfio/vfio.c @@ -1370,6 +1370,59 @@ static const struct file_operations vfio_device_fops = { }; /** + * External user API,

Re: [PATCH 3/8] vfio: add external user support

2013-06-27 Thread Stephen Rothwell
Hi Alexy, On Thu, 27 Jun 2013 15:02:31 +1000 Alexey Kardashevskiy a...@ozlabs.ru wrote: +/* Allows an external user (for example, KVM) to unlock an IOMMU group */ +static void vfio_group_del_external_user(struct file *filep) +{ + struct vfio_group *group = filep-private_data; + +

Re: [PATCH 3/8] vfio: add external user support

2013-06-27 Thread Benjamin Herrenschmidt
On Thu, 2013-06-27 at 16:59 +1000, Stephen Rothwell wrote: +/* Allows an external user (for example, KVM) to unlock an IOMMU group */ +static void vfio_group_del_external_user(struct file *filep) +{ + struct vfio_group *group = filep-private_data; + + BUG_ON(filep-f_op !=

Re: [PATCH 3/8] vfio: add external user support

2013-06-27 Thread Alexey Kardashevskiy
On 06/27/2013 07:42 PM, Benjamin Herrenschmidt wrote: On Thu, 2013-06-27 at 16:59 +1000, Stephen Rothwell wrote: +/* Allows an external user (for example, KVM) to unlock an IOMMU group */ +static void vfio_group_del_external_user(struct file *filep) +{ + struct vfio_group *group =

[PATCH 3/8] vfio: add external user support

2013-06-26 Thread Alexey Kardashevskiy
VFIO is designed to be used via ioctls on file descriptors returned by VFIO. However in some situations support for an external user is required. The first user is KVM on PPC64 (SPAPR TCE protocol) which is going to use the existing VFIO groups for exclusive access in real/virtual mode in the