Re: [PATCH v4 1/2] vfio/mdev: Check globally for duplicate devices

2018-05-22 Thread Zhenyu Wang
On 2018.05.22 09:53:37 -0600, Alex Williamson wrote: > [Cc +GVT-g maintainers/lists] > > On Tue, 22 May 2018 10:13:46 +0200 > Cornelia Huck wrote: > > > On Fri, 18 May 2018 13:10:25 -0600 > > Alex Williamson wrote: > > > > > When we create an

Re: [PATCH v4 1/2] vfio/mdev: Check globally for duplicate devices

2018-05-22 Thread Zhenyu Wang
On 2018.05.22 09:53:37 -0600, Alex Williamson wrote: > [Cc +GVT-g maintainers/lists] > > On Tue, 22 May 2018 10:13:46 +0200 > Cornelia Huck wrote: > > > On Fri, 18 May 2018 13:10:25 -0600 > > Alex Williamson wrote: > > > > > When we create an mdev device, we check for duplicates against the >

Re: [PATCH v4 1/2] vfio/mdev: Check globally for duplicate devices

2018-05-22 Thread Alex Williamson
[Cc +GVT-g maintainers/lists] On Tue, 22 May 2018 10:13:46 +0200 Cornelia Huck wrote: > On Fri, 18 May 2018 13:10:25 -0600 > Alex Williamson wrote: > > > When we create an mdev device, we check for duplicates against the > > parent device and

Re: [PATCH v4 1/2] vfio/mdev: Check globally for duplicate devices

2018-05-22 Thread Alex Williamson
[Cc +GVT-g maintainers/lists] On Tue, 22 May 2018 10:13:46 +0200 Cornelia Huck wrote: > On Fri, 18 May 2018 13:10:25 -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 > >

Re: [PATCH v4 1/2] vfio/mdev: Check globally for duplicate devices

2018-05-22 Thread Cornelia Huck
On Fri, 18 May 2018 13:10:25 -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 v4 1/2] vfio/mdev: Check globally for duplicate devices

2018-05-22 Thread Cornelia Huck
On Fri, 18 May 2018 13:10:25 -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

Re: [PATCH v4 1/2] vfio/mdev: Check globally for duplicate devices

2018-05-18 Thread Kirti Wankhede
On 5/19/2018 12:40 AM, 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

Re: [PATCH v4 1/2] vfio/mdev: Check globally for duplicate devices

2018-05-18 Thread Kirti Wankhede
On 5/19/2018 12:40 AM, 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 v4 1/2] vfio/mdev: Check globally for duplicate devices

2018-05-18 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 v4 1/2] vfio/mdev: Check globally for duplicate devices

2018-05-18 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