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

2013-07-09 Thread Alex Williamson
On Tue, 2013-07-09 at 15:40 +1000, Alexey Kardashevskiy wrote: > 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 situati

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 P

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-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 *

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

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 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(f

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

2013-06-26 Thread Stephen Rothwell
Hi Alexy, On Thu, 27 Jun 2013 15:02:31 +1000 Alexey Kardashevskiy 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, exporte