Re: [PATCH v3] vfio/mdev: Check globally for duplicate devices

2018-05-18 Thread Kirti Wankhede
On 5/18/2018 11:00 PM, Alex Williamson wrote: > On Fri, 18 May 2018 12:34:03 +0530 > Kirti Wankhede wrote: > >> On 5/18/2018 3:07 AM, Alex Williamson wrote: >>> On Fri, 18 May 2018 01:56:50 +0530 >>> Kirti Wankhede wrote: >>> On 5/17/2018

Re: [PATCH v3] vfio/mdev: Check globally for duplicate devices

2018-05-18 Thread Kirti Wankhede
On 5/18/2018 11:00 PM, Alex Williamson wrote: > On Fri, 18 May 2018 12:34:03 +0530 > Kirti Wankhede wrote: > >> On 5/18/2018 3:07 AM, Alex Williamson wrote: >>> On Fri, 18 May 2018 01:56:50 +0530 >>> Kirti Wankhede wrote: >>> On 5/17/2018 9:50 PM, Alex Williamson wrote: > On

Re: [PATCH v3] vfio/mdev: Check globally for duplicate devices

2018-05-18 Thread Alex Williamson
On Fri, 18 May 2018 12:34:03 +0530 Kirti Wankhede wrote: > On 5/18/2018 3:07 AM, Alex Williamson wrote: > > On Fri, 18 May 2018 01:56:50 +0530 > > Kirti Wankhede wrote: > > > >> On 5/17/2018 9:50 PM, Alex Williamson wrote: > >>> On Thu, 17 May

Re: [PATCH v3] vfio/mdev: Check globally for duplicate devices

2018-05-18 Thread Alex Williamson
On Fri, 18 May 2018 12:34:03 +0530 Kirti Wankhede wrote: > On 5/18/2018 3:07 AM, Alex Williamson wrote: > > On Fri, 18 May 2018 01:56:50 +0530 > > Kirti Wankhede wrote: > > > >> On 5/17/2018 9:50 PM, Alex Williamson wrote: > >>> On Thu, 17 May 2018 21:25:22 +0530 > >>> Kirti Wankhede

Re: [PATCH v3] vfio/mdev: Check globally for duplicate devices

2018-05-18 Thread Cornelia Huck
On Fri, 18 May 2018 12:34:03 +0530 Kirti Wankhede wrote: > On 5/18/2018 3:07 AM, Alex Williamson wrote: > > On Fri, 18 May 2018 01:56:50 +0530 > > Kirti Wankhede wrote: > > > >> On 5/17/2018 9:50 PM, Alex Williamson wrote: > >>> On Thu, 17 May

Re: [PATCH v3] vfio/mdev: Check globally for duplicate devices

2018-05-18 Thread Cornelia Huck
On Fri, 18 May 2018 12:34:03 +0530 Kirti Wankhede wrote: > On 5/18/2018 3:07 AM, Alex Williamson wrote: > > On Fri, 18 May 2018 01:56:50 +0530 > > Kirti Wankhede wrote: > > > >> On 5/17/2018 9:50 PM, Alex Williamson wrote: > >>> On Thu, 17 May 2018 21:25:22 +0530 > >>> Kirti Wankhede

Re: [PATCH v3] vfio/mdev: Check globally for duplicate devices

2018-05-18 Thread Halil Pasic
On 05/17/2018 10:09 AM, Cornelia Huck wrote: [Dong Jia, Halil: Can you please take a look whether vfio-ccw is really ok? I don't think we open up any new races, but I'd appreciate a second or third opinion.] I will wait for things to settle a bit before I start reviewing the synchronization

Re: [PATCH v3] vfio/mdev: Check globally for duplicate devices

2018-05-18 Thread Halil Pasic
On 05/17/2018 10:09 AM, Cornelia Huck wrote: [Dong Jia, Halil: Can you please take a look whether vfio-ccw is really ok? I don't think we open up any new races, but I'd appreciate a second or third opinion.] I will wait for things to settle a bit before I start reviewing the synchronization

Re: [PATCH v3] vfio/mdev: Check globally for duplicate devices

2018-05-18 Thread Kirti Wankhede
On 5/18/2018 3:07 AM, Alex Williamson wrote: > On Fri, 18 May 2018 01:56:50 +0530 > Kirti Wankhede wrote: > >> On 5/17/2018 9:50 PM, Alex Williamson wrote: >>> On Thu, 17 May 2018 21:25:22 +0530 >>> Kirti Wankhede wrote: >>> On 5/17/2018

Re: [PATCH v3] vfio/mdev: Check globally for duplicate devices

2018-05-18 Thread Kirti Wankhede
On 5/18/2018 3:07 AM, Alex Williamson wrote: > On Fri, 18 May 2018 01:56:50 +0530 > Kirti Wankhede wrote: > >> On 5/17/2018 9:50 PM, Alex Williamson wrote: >>> On Thu, 17 May 2018 21:25:22 +0530 >>> Kirti Wankhede wrote: >>> On 5/17/2018 1:39 PM, Cornelia Huck wrote: > On Wed,

Re: [PATCH v3] vfio/mdev: Check globally for duplicate devices

2018-05-17 Thread Alex Williamson
On Thu, 17 May 2018 15:37:37 -0600 Alex Williamson wrote: > On Fri, 18 May 2018 01:56:50 +0530 > Kirti Wankhede wrote: > > > On 5/17/2018 9:50 PM, Alex Williamson wrote: > > > On Thu, 17 May 2018 21:25:22 +0530 > > > Kirti Wankhede

Re: [PATCH v3] vfio/mdev: Check globally for duplicate devices

2018-05-17 Thread Alex Williamson
On Thu, 17 May 2018 15:37:37 -0600 Alex Williamson wrote: > On Fri, 18 May 2018 01:56:50 +0530 > Kirti Wankhede wrote: > > > On 5/17/2018 9:50 PM, Alex Williamson wrote: > > > On Thu, 17 May 2018 21:25:22 +0530 > > > Kirti Wankhede wrote: > > > > > >> On 5/17/2018 1:39 PM, Cornelia

Re: [PATCH v3] vfio/mdev: Check globally for duplicate devices

2018-05-17 Thread Alex Williamson
On Fri, 18 May 2018 01:56:50 +0530 Kirti Wankhede wrote: > On 5/17/2018 9:50 PM, Alex Williamson wrote: > > On Thu, 17 May 2018 21:25:22 +0530 > > Kirti Wankhede wrote: > > > >> On 5/17/2018 1:39 PM, Cornelia Huck wrote: > >>> On Wed, 16 May 2018

Re: [PATCH v3] vfio/mdev: Check globally for duplicate devices

2018-05-17 Thread Alex Williamson
On Fri, 18 May 2018 01:56:50 +0530 Kirti Wankhede wrote: > On 5/17/2018 9:50 PM, Alex Williamson wrote: > > On Thu, 17 May 2018 21:25:22 +0530 > > Kirti Wankhede wrote: > > > >> On 5/17/2018 1:39 PM, Cornelia Huck wrote: > >>> On Wed, 16 May 2018 21:30:19 -0600 > >>> Alex Williamson

Re: [PATCH v3] vfio/mdev: Check globally for duplicate devices

2018-05-17 Thread Kirti Wankhede
On 5/17/2018 9:50 PM, Alex Williamson wrote: > On Thu, 17 May 2018 21:25:22 +0530 > Kirti Wankhede wrote: > >> On 5/17/2018 1:39 PM, Cornelia Huck wrote: >>> On Wed, 16 May 2018 21:30:19 -0600 >>> Alex Williamson wrote: >>> When we

Re: [PATCH v3] vfio/mdev: Check globally for duplicate devices

2018-05-17 Thread Kirti Wankhede
On 5/17/2018 9:50 PM, Alex Williamson wrote: > On Thu, 17 May 2018 21:25:22 +0530 > Kirti Wankhede wrote: > >> On 5/17/2018 1:39 PM, Cornelia Huck wrote: >>> On Wed, 16 May 2018 21:30:19 -0600 >>> Alex Williamson wrote: >>> When we create an mdev device, we check for duplicates

Re: [PATCH v3] vfio/mdev: Check globally for duplicate devices

2018-05-17 Thread Alex Williamson
On Thu, 17 May 2018 21:25:22 +0530 Kirti Wankhede wrote: > On 5/17/2018 1:39 PM, Cornelia Huck wrote: > > On Wed, 16 May 2018 21:30:19 -0600 > > Alex Williamson wrote: > > > >> When we create an mdev device, we check for duplicates against

Re: [PATCH v3] vfio/mdev: Check globally for duplicate devices

2018-05-17 Thread Alex Williamson
On Thu, 17 May 2018 21:25:22 +0530 Kirti Wankhede wrote: > On 5/17/2018 1:39 PM, Cornelia Huck wrote: > > On Wed, 16 May 2018 21:30:19 -0600 > > Alex Williamson wrote: > > > >> When we create an mdev device, we check for duplicates against the > >> parent device and return -EEXIST if found,

Re: [PATCH v3] vfio/mdev: Check globally for duplicate devices

2018-05-17 Thread Kirti Wankhede
On 5/17/2018 1:39 PM, Cornelia Huck wrote: > On Wed, 16 May 2018 21:30:19 -0600 > Alex Williamson wrote: > >> When we create an mdev device, we check for duplicates against the >> parent device and return -EEXIST if found, but the mdev device >> namespace is global

Re: [PATCH v3] vfio/mdev: Check globally for duplicate devices

2018-05-17 Thread Kirti Wankhede
On 5/17/2018 1:39 PM, Cornelia Huck wrote: > On Wed, 16 May 2018 21:30:19 -0600 > Alex Williamson wrote: > >> When we create an mdev device, we check for duplicates against the >> parent device and return -EEXIST if found, but the mdev device >> namespace is global since we'll link all devices

Re: [PATCH v3] vfio/mdev: Check globally for duplicate devices

2018-05-17 Thread Cornelia Huck
On Wed, 16 May 2018 21:30:19 -0600 Alex Williamson wrote: > When we create an mdev device, we check for duplicates against the > parent device and return -EEXIST if found, but the mdev device > namespace is global since we'll link all devices from the bus. We do >

Re: [PATCH v3] vfio/mdev: Check globally for duplicate devices

2018-05-17 Thread Cornelia Huck
On Wed, 16 May 2018 21:30:19 -0600 Alex Williamson wrote: > When we create an mdev device, we check for duplicates against the > parent device and return -EEXIST if found, but the mdev device > namespace is global since we'll link all devices from the bus. We do > catch this later in

[PATCH v3] vfio/mdev: Check globally for duplicate devices

2018-05-16 Thread Alex Williamson
When we create an mdev device, we check for duplicates against the parent device and return -EEXIST if found, but the mdev device namespace is global since we'll link all devices from the bus. We do catch this later in sysfs_do_create_link_sd() to return -EEXIST, but with it comes a kernel

[PATCH v3] vfio/mdev: Check globally for duplicate devices

2018-05-16 Thread Alex Williamson
When we create an mdev device, we check for duplicates against the parent device and return -EEXIST if found, but the mdev device namespace is global since we'll link all devices from the bus. We do catch this later in sysfs_do_create_link_sd() to return -EEXIST, but with it comes a kernel