> From: Alex Williamson
> Sent: Tuesday, July 18, 2023 2:46 AM
>
> On Mon, 17 Jul 2023 08:08:59 +0000
> "Liu, Yi L" wrote:
>
> > > From: Liu, Yi L
> > > Sent: Monday, July 17, 2023 2:36 PM
> > >
> > > > From: Liu, Yi L
> &
> From: Jason Gunthorpe
> Sent: Monday, July 17, 2023 8:34 PM
>
> On Mon, Jul 17, 2023 at 06:36:19AM +0000, Liu, Yi L wrote:
> > Hi Alex, Jason,
> >
> > I found a minor nit on the kconfig. The below configuration is valid.
> > But user cannot use vfio di
> From: Liu, Yi L
> Sent: Monday, July 17, 2023 2:36 PM
>
> > From: Liu, Yi L
> > Sent: Friday, June 16, 2023 5:40 PM
> >
> > vfio_group is not needed for vfio device cdev, so with vfio device cdev
> > introduced, the vfio_group infrastructures can be
> From: Liu, Yi L
> Sent: Friday, June 16, 2023 5:40 PM
>
> vfio_group is not needed for vfio device cdev, so with vfio device cdev
> introduced, the vfio_group infrastructures can be compiled out if only
> cdev is needed.
>
> Tested-by: Nicolin Chen
> Tested-by:
> From: Jason Gunthorpe
> Sent: Saturday, July 15, 2023 9:05 PM
>
> On Sat, Jul 15, 2023 at 04:16:52AM +0000, Liu, Yi L wrote:
> > > From: Jason Gunthorpe
> > > Sent: Friday, July 14, 2023 10:42 PM
> > >
> > > On Mon, Jul 10, 2023 at 07:59:24PM -
> From: Jason Gunthorpe
> Sent: Friday, July 14, 2023 9:37 PM
>
> On Mon, Jul 10, 2023 at 07:31:25PM -0700, Yi Liu wrote:
>
> > @@ -1311,29 +1296,17 @@ static int vfio_pci_ioctl_get_pci_hot_reset_info(
> > ret = vfio_pci_for_each_slot_or_bus(vdev->pdev, vfio_pci_fill_devs,
> >
> From: Jason Gunthorpe
> Sent: Friday, July 14, 2023 10:42 PM
>
> On Mon, Jul 10, 2023 at 07:59:24PM -0700, Yi Liu wrote:
>
> > +static inline long vfio_df_ioctl_bind_iommufd(struct vfio_device_file *df,
> > + struct vfio_device_bind_iommufd
> > __user
>
> From: Jason Gunthorpe
> Sent: Friday, July 14, 2023 10:21 PM
>
> On Mon, Jul 10, 2023 at 07:59:22PM -0700, Yi Liu wrote:
> > It's common to get a reference to the iommufd context from a given file
> > descriptor. So adds an API for it. Existing users of this API are compiled
> > only when IOMMU
> From: Jason Gunthorpe
> Sent: Wednesday, June 28, 2023 10:34 PM
>
> On Mon, Jun 26, 2023 at 02:51:29PM +0000, Liu, Yi L wrote:
> > > > >
> > > > > Ah, any suggestion on the naming? How about
> vfio_device_get_kvm_safe_locked()?
> > >
13:12:14 -0300
> Jason Gunthorpe wrote:
>
> > On Tue, Jun 27, 2023 at 08:54:33AM +, Liu, Yi L wrote:
> > > > From: Alex Williamson
> > > > Sent: Thursday, June 22, 2023 5:54 AM
> > > >
> > > > On Fri, 16 Jun 2023 02:39:46 -0700
>
> From: Jason Gunthorpe
> Sent: Wednesday, June 28, 2023 12:12 AM
>
> On Tue, Jun 27, 2023 at 08:54:33AM +0000, Liu, Yi L wrote:
> > > From: Alex Williamson
> > > Sent: Thursday, June 22, 2023 5:54 AM
> > >
> > > On Fri, 16 Jun 2023 02:39:46 -07
> From: Alex Williamson
> Sent: Thursday, June 22, 2023 5:54 AM
>
> On Fri, 16 Jun 2023 02:39:46 -0700
> Yi Liu wrote:
> > +VFIO device cdev doesn't rely on VFIO group/container/iommu drivers.
> > +Hence those modules can be fully compiled out in an environment
> > +where no legacy VFIO applica
> From: Liu, Yi L
> Sent: Monday, June 26, 2023 9:35 PM
>
> > From: Jason Gunthorpe
> > Sent: Monday, June 26, 2023 8:56 PM
> >
> > On Mon, Jun 26, 2023 at 08:34:26AM +, Liu, Yi L wrote:
> > > > From: Jason Gunthorpe
&
> From: Jason Gunthorpe
> Sent: Monday, June 26, 2023 8:56 PM
>
> On Mon, Jun 26, 2023 at 08:34:26AM +0000, Liu, Yi L wrote:
> > > From: Jason Gunthorpe
> > > Sent: Saturday, June 24, 2023 12:15 AM
> >
> > > > }
> > > >
> > >
> From: Jason Gunthorpe
> Sent: Saturday, June 24, 2023 12:15 AM
> > }
> >
> > +static void vfio_device_get_kvm_safe(struct vfio_device_file *df)
> > +{
> > + spin_lock(&df->kvm_ref_lock);
> > + if (df->kvm)
> > + _vfio_device_get_kvm_safe(df->device, df->kvm);
> > + spin_unlock(
Maybe you could use the below branch? It’s based on Alex’s vfio next branch.
https://github.com/yiliu1765/iommufd/tree/vfio_device_cdev_v13
(config CONFIG_IOMMUFD=y CONFIG_VFIO_DEVICE_CDEV=y)
From: philly j
Sent: Monday, June 19, 2023 4:56 AM
To: Intel-Gfx
Cc: Liu, Yi L
Subject: Re: [Intel
> From: Jason Gunthorpe
> Sent: Wednesday, June 14, 2023 9:38 PM
>
> On Wed, Jun 14, 2023 at 01:05:45PM +0000, Liu, Yi L wrote:
> > > -EAGAIN basically means the kernel internally malfunctioned - eg it
> > > allocated too little space for the actual size of de
> From: Jason Gunthorpe
> Sent: Wednesday, June 14, 2023 8:23 PM
> On Wed, Jun 14, 2023 at 06:20:10AM +, Tian, Kevin wrote:
> > > From: Liu, Yi L
> > > Sent: Wednesday, June 14, 2023 2:14 PM
> > >
> > >
> > > > With that I
> From: Jason Gunthorpe
> Sent: Wednesday, June 14, 2023 8:17 PM
>
> On Wed, Jun 14, 2023 at 10:35:10AM +0000, Liu, Yi L wrote:
>
> > > - if (fill->cur == fill->max)
> > > - return -EAGAIN; /* Something changed, try again */
> &g
> From: Jason Gunthorpe
> Sent: Wednesday, June 14, 2023 2:23 AM
>
> On Fri, Jun 02, 2023 at 05:15:14AM -0700, Yi Liu wrote:
> > This allows VFIO_DEVICE_GET_PCI_HOT_RESET_INFO ioctl use the iommufd_ctx
> > of the cdev device to check the ownership of the other affected devices.
> >
> > When VFIO_
> From: Tian, Kevin
> Sent: Wednesday, June 14, 2023 1:42 PM
>
> > From: Liu, Yi L
> > Sent: Wednesday, June 14, 2023 11:24 AM
> >
> > > From: Alex Williamson
> > > Sent: Wednesday, June 14, 2023 4:11 AM
> > >
> > >
> From: Jason Gunthorpe
> Sent: Wednesday, June 14, 2023 1:56 AM
>
> On Fri, Jun 02, 2023 at 05:15:12AM -0700, Yi Liu wrote:
> > This can be used to differentiate whether to report group_id or devid in
> > the revised VFIO_DEVICE_GET_PCI_HOT_RESET_INFO ioctl. At this moment, no
> > cdev path yet,
> From: Alex Williamson
> Sent: Wednesday, June 14, 2023 4:11 AM
>
> On Tue, 13 Jun 2023 14:35:09 -0300
> Jason Gunthorpe wrote:
>
> > On Tue, Jun 13, 2023 at 11:15:11AM -0600, Alex Williamson wrote:
> > > [Sorry for breaking threading, replying to my own message id with reply
> > > content fr
> From: Alex Williamson
> Sent: Tuesday, June 13, 2023 11:04 PM
>
> > > >
> > > > >
> > > > > Unless I missed it, we've not described that vfio device cdev access
> > > > > is
> > > > > still bound by IOMMU group semantics, ie. there can be one DMA owner
> > > > > for the group. That's a pretty
> From: Alex Williamson
> Sent: Tuesday, June 13, 2023 10:48 PM
>
> On Tue, 13 Jun 2023 14:33:01 +0000
> "Liu, Yi L" wrote:
>
> > > From: Alex Williamson
> > > Sent: Tuesday, June 13, 2023 10:19 PM
> > >
> > > On Tue, 13 Jun 20
> From: Alex Williamson
> Sent: Tuesday, June 13, 2023 10:24 PM
>
> On Tue, 13 Jun 2023 12:01:51 +0000
> "Liu, Yi L" wrote:
>
> > > From: Alex Williamson
> > > Sent: Tuesday, June 13, 2023 7:06 AM
> > >
> > > On Fri, 2 Jun 2
> From: Alex Williamson
> Sent: Tuesday, June 13, 2023 10:42 PM
>
> On Tue, 13 Jun 2023 14:36:14 +0000
> "Liu, Yi L" wrote:
> > > > > >
> > > > > > diff --git a/drivers/vfio/vfio.h b/drivers/vfio/vfio.h
> > > > > >
> From: Alex Williamson
> Sent: Tuesday, June 13, 2023 10:40 PM
>
> On Tue, 13 Jun 2023 14:28:43 +0000
> "Liu, Yi L" wrote:
>
> > > From: Alex Williamson
> > > Sent: Tuesday, June 13, 2023 10:18 PM
> >
> > > > > > diff
> From: Alex Williamson
> Sent: Tuesday, June 13, 2023 10:17 PM
>
> On Tue, 13 Jun 2023 05:46:32 +0000
> "Liu, Yi L" wrote:
>
> > > From: Alex Williamson
> > > Sent: Tuesday, June 13, 2023 5:52 AM
> > >
> > > On Fri, 2 Jun
> From: Alex Williamson
> Sent: Tuesday, June 13, 2023 10:19 PM
>
> On Tue, 13 Jun 2023 05:53:42 +0000
> "Liu, Yi L" wrote:
>
> > > From: Alex Williamson
> > > Sent: Tuesday, June 13, 2023 6:42 AM
> > >
> > > On Fri, 2 Jun 2023
> From: Alex Williamson
> Sent: Tuesday, June 13, 2023 10:18 PM
> > > > diff --git a/include/linux/vfio.h b/include/linux/vfio.h
> > > > index 83cc5dc28b7a..e80a8ac86e46 100644
> > > > --- a/include/linux/vfio.h
> > > > +++ b/include/linux/vfio.h
> > > > @@ -66,6 +66,7 @@ struct vfio_device {
> >
> From: Jason Gunthorpe
> Sent: Tuesday, June 13, 2023 7:47 PM
>
> On Fri, Jun 02, 2023 at 05:15:14AM -0700, Yi Liu wrote:
> > +/*
> > + * Return devid for a device which is affected by hot-reset.
> > + * - valid devid > 0 for the device that is bound to the input
> > + * iommufd_ctx.
> > + * -
> From: Alex Williamson
> Sent: Tuesday, June 13, 2023 7:06 AM
>
> On Fri, 2 Jun 2023 05:16:53 -0700
> Yi Liu wrote:
>
> > This gives notes for userspace applications on device cdev usage.
> >
> > Reviewed-by: Kevin Tian
> > Signed-off-by: Yi Liu
> > ---
> > Documentation/driver-api/vfio.rs
> From: Alex Williamson
> Sent: Tuesday, June 13, 2023 6:38 AM
> On Fri, 2 Jun 2023 05:16:49 -0700
> Yi Liu wrote:
>
> > group->type can be VFIO_NO_IOMMU only when vfio_noiommu option is true.
> > And vfio_noiommu option can only be true if CONFIG_VFIO_NOIOMMU is enabled.
> > So checking group-
> From: Alex Williamson
> Sent: Tuesday, June 13, 2023 6:42 AM
>
> On Fri, 2 Jun 2023 05:16:50 -0700
> Yi Liu wrote:
>
> > This moves the noiommu device determination and noiommu taint out of
> > vfio_group_find_or_alloc(). noiommu device is determined in
> > __vfio_register_dev() and result i
> From: Alex Williamson
> Sent: Tuesday, June 13, 2023 6:27 AM
>
> On Fri, 2 Jun 2023 05:16:47 -0700
> Yi Liu wrote:
>
> > This adds ioctl for userspace to bind device cdev fd to iommufd.
> >
> > VFIO_DEVICE_BIND_IOMMUFD: bind device to an iommufd, hence gain DMA
> >
> From: Alex Williamson
> Sent: Tuesday, June 13, 2023 5:52 AM
>
> On Fri, 2 Jun 2023 05:16:36 -0700
> Yi Liu wrote:
>
> > Allow the vfio_device file to be in a state where the device FD is
> > opened but the device cannot be used by userspace (i.e. its .open_device()
> > hasn't been called).
> From: Alex Williamson
> Sent: Tuesday, June 13, 2023 5:52 AM
>
> On Fri, 2 Jun 2023 05:16:35 -0700
> Yi Liu wrote:
>
> > This avoids passing too much parameters in multiple functions. Per the
> > input parameter change, rename the function to be vfio_df_open/close().
> >
> > Reviewed-by: Kev
> From: Alex Williamson
> Sent: Friday, June 9, 2023 6:30 AM
>
> On Fri, 2 Jun 2023 05:15:15 -0700
> Yi Liu wrote:
>
> > This is the way user to invoke hot-reset for the devices opened by cdev
> > interface. User should check the flag VFIO_PCI_HOT_RESET_FLAG_DEV_ID_OWNED
> > in the output of V
> From: Alex Williamson
> Sent: Friday, June 9, 2023 6:27 AM
>
> On Fri, 2 Jun 2023 05:15:14 -0700
> Yi Liu wrote:
>
> > This allows VFIO_DEVICE_GET_PCI_HOT_RESET_INFO ioctl use the iommufd_ctx
> > of the cdev device to check the ownership of the other affected devices.
> >
> > When VFIO_DEVIC
> From: Alex Williamson
> Sent: Friday, June 9, 2023 5:41 AM
>
> On Fri, 2 Jun 2023 05:15:10 -0700
> Yi Liu wrote:
>
> > This adds the helper to check if any device within the given iommu_group
> > has been bound with the iommufd_ctx. This is helpful for the checking on
> > device ownership fo
> From: Jason Gunthorpe
> Sent: Thursday, June 1, 2023 3:00 AM
>
> On Fri, May 26, 2023 at 10:04:27AM +0800, Baolu Lu wrote:
> > On 5/25/23 9:02 PM, Liu, Yi L wrote:
> > > > It's possible that requirement
> > > > might be relaxed in the new DMA
> From: Alex Williamson
> Sent: Thursday, June 1, 2023 1:22 AM
> > Now, I intend to disallow it. If compat mode user binds the devices
> > to different containers, it shall be able to do hot reset as it can use
> > group fd to prove ownership. But if using the zero-length array, it
> > would be f
> From: Alex Williamson
> Sent: Thursday, May 25, 2023 4:20 AM
>
> On Mon, 22 May 2023 04:57:51 -0700
> Yi Liu wrote:
>
> > This is the way user to invoke hot-reset for the devices opened by cdev
> > interface. User should check the flag VFIO_PCI_HOT_RESET_FLAG_DEV_ID_OWNED
> > in the output of
> From: Alex Williamson
> Sent: Friday, May 26, 2023 12:00 AM
>
> On Thu, 25 May 2023 03:03:54 +0000
> "Liu, Yi L" wrote:
>
> > > From: Alex Williamson
> > > Sent: Wednesday, May 24, 2023 11:32 PM
> > >
> > > On Wed, 24 May 20
> From: Alex Williamson
> Sent: Thursday, May 25, 2023 3:56 AM
> On Mon, 22 May 2023 04:57:50 -0700
> Yi Liu wrote:
>
> > +
> > +/*
> > + * Return devid for vfio_device if the device is owned by the input
> > + * ictx.
> > + * - valid devid > 0 for the device that are bound to the input
> > + *
> From: Alex Williamson
> Sent: Wednesday, May 24, 2023 11:32 PM
>
> On Wed, 24 May 2023 02:12:14 +0000
> "Liu, Yi L" wrote:
>
> > > From: Alex Williamson
> > > Sent: Tuesday, May 23, 2023 11:50 PM
> > >
> > > On Tue, 23 May 20
> From: Liu, Yi L
> Sent: Wednesday, May 24, 2023 10:41 AM
>
> > From: Tian, Kevin
> > Sent: Wednesday, May 24, 2023 10:39 AM
> >
> > > From: Liu, Yi L
> > > Sent: Wednesday, May 24, 2023 10:21 AM
> > >
> > > > >
> >
Hi Alex,
I've two new patches to address the comment in this patch. If
it makes sense then I'll put them in cdev v12.
> From: Liu, Yi L
> Sent: Tuesday, May 23, 2023 10:13 AM
>
> > From: Alex Williamson
> > Sent: Tuesday, May 23, 2023 7:04 AM
> >
> >
> From: Tian, Kevin
> Sent: Wednesday, May 24, 2023 10:39 AM
>
> > From: Liu, Yi L
> > Sent: Wednesday, May 24, 2023 10:21 AM
> >
> > > >
> > > > vfio_device_open_file()
> > > > {
> > > > dev_warn(device->de
> From: Alex Williamson
> Sent: Tuesday, May 23, 2023 11:51 PM
>
> On Tue, 23 May 2023 01:41:36 +0000
> "Liu, Yi L" wrote:
>
> > > From: Alex Williamson
> > > Sent: Tuesday, May 23, 2023 6:01 AM
> > >
> > > On Sat, 13 May 2023 0
> From: Alex Williamson
> Sent: Tuesday, May 23, 2023 11:50 PM
>
> On Tue, 23 May 2023 01:20:17 +0000
> "Liu, Yi L" wrote:
>
> > > From: Alex Williamson
> > > Sent: Tuesday, May 23, 2023 6:16 AM
> > >
> > > On Sat, 13 May 2023 0
> From: Alex Williamson
> Sent: Tuesday, May 23, 2023 7:04 AM
>
> On Sat, 13 May 2023 06:28:25 -0700
> Yi Liu wrote:
>
> > This is to make the cdev path and group path consistent for the noiommu
> > devices registration. If vfio_noiommu is disabled, such registration
> > should fail. However, t
> From: Alex Williamson
> Sent: Tuesday, May 23, 2023 6:01 AM
>
> On Sat, 13 May 2023 06:28:23 -0700
> Yi Liu wrote:
>
> > This adds ioctl for userspace to bind device cdev fd to iommufd.
> >
> > VFIO_DEVICE_BIND_IOMMUFD: bind device to an iommufd, hence gain DMA
> >
> From: Alex Williamson
> Sent: Tuesday, May 23, 2023 4:59 AM
>
> On Mon, 22 May 2023 14:46:17 -0600
> Alex Williamson wrote:
>
> > On Sat, 13 May 2023 06:28:17 -0700
> > Yi Liu wrote:
> >
> > > this prepares for adding DETACH ioctl for physical VFIO devices.
> > >
> > > Reviewed-by: Kevin Tia
> From: Alex Williamson
> Sent: Tuesday, May 23, 2023 6:16 AM
>
> On Sat, 13 May 2023 06:28:24 -0700
> Yi Liu wrote:
>
> > This adds ioctl for userspace to attach device cdev fd to and detach
> > from IOAS/hw_pagetable managed by iommufd.
> >
> > VFIO_DEVICE_ATTACH_IOMMUFD_PT: attach vfio d
> From: Alex Williamson
> Sent: Tuesday, May 23, 2023 4:25 AM
>
> On Sat, 13 May 2023 06:28:14 -0700
> Yi Liu wrote:
>
> > into vfio_device_group_open(). This is more consistent with what will
> > be done in vfio device cdev path.
>
> Same comment regarding flowing commit subject into body on
> From: Alex Williamson
> Sent: Thursday, May 18, 2023 6:02 AM
>
> On Sat, 13 May 2023 06:21:35 -0700
> Yi Liu wrote:
>
> > This makes VFIO_DEVICE_GET_PCI_HOT_RESET_INFO ioctl to use the iommufd_ctx
>
> s/makes/allows/?
>
> s/to//
>
> > of the cdev device to check the ownership of the other
> From: Liu, Yi L
> Sent: Thursday, May 18, 2023 9:22 PM
>
> > From: Alex Williamson
> > Sent: Thursday, May 18, 2023 6:02 AM
> >
> > On Sat, 13 May 2023 06:21:35 -0700
> > Yi Liu wrote:
> >
> > stati
> From: Alex Williamson
> Sent: Thursday, May 18, 2023 2:15 AM
>
> On Sat, 13 May 2023 06:21:32 -0700
> Yi Liu wrote:
>
> > This is needed by the vfio-pci driver to report affected devices in the
> > hot reset for a given device.
> >
> > Signed-off-by: Yi Liu
> > ---
> > drivers/iommu/iommufd
> From: Alex Williamson
> Sent: Thursday, May 18, 2023 3:40 AM
>
> On Sat, 13 May 2023 06:21:34 -0700
> Yi Liu wrote:
>
> > to check if any device within the given iommu_group has been bound with
>
> Nit, I find these commit logs where the subject line is intended to
> flow into the commit log
> From: Alex Williamson
> Sent: Thursday, May 18, 2023 3:13 AM
>
> On Sat, 13 May 2023 06:21:33 -0700
> Yi Liu wrote:
>
> > There are drivers that need to search vfio_device within a given dev_set.
> > e.g. vfio-pci. So add a helper.
> >
> > Signed-off-by: Yi Liu
> > ---
> > drivers/vfio/pci/
> From: Jason Gunthorpe
> Sent: Thursday, May 18, 2023 2:21 AM
>
> On Wed, May 17, 2023 at 11:26:09AM -0600, Alex Williamson wrote:
>
> > It's not clear to me why we need a separate iommufd_access for
> > noiommu.
>
> The point was to allocate an ID for the device so we can use that ID
> with t
> From: Cédric Le Goater
> Sent: Monday, May 15, 2023 3:30 PM
>
> On 5/13/23 15:21, Yi Liu wrote:
> > This makes VFIO_DEVICE_GET_PCI_HOT_RESET_INFO ioctl to use the iommufd_ctx
> > of the cdev device to check the ownership of the other affected devices.
> >
> > This returns devid for each of the
> From: Cédric Le Goater
> Sent: Thursday, May 11, 2023 3:11 PM
>
> On 4/26/23 17:03, Yi Liu wrote:
> > This defines KVM_DEV_VFIO_FILE* and make alias with KVM_DEV_VFIO_GROUP*.
> > Old userspace uses KVM_DEV_VFIO_GROUP* works as well.
> >
> > diff --git a/virt/kvm/vfio.c b/virt/kvm/vfio.c
> > ind
> From: Liu, Yi L
> Sent: Wednesday, May 3, 2023 5:49 PM
>
> > From: Jason Gunthorpe
> > Sent: Wednesday, May 3, 2023 2:12 AM
> >
> > On Sat, Apr 29, 2023 at 12:07:24AM +0800, Yi Liu wrote:
> > > > The emulated stuff is for mdev only, it
> From: Alex Williamson
> Sent: Friday, April 28, 2023 4:16 AM
>
> > > + *
> > > * Return: 0 on success, -errno on failure:
> > > * -enospc = insufficient buffer, -enodev = unsupported for device.
> > > */
> > > struct vfio_pci_dependent_device {
> > > - __u32 group_id;
> > > + unio
> From: Jason Gunthorpe
> Sent: Wednesday, May 3, 2023 2:22 AM
>
> On Sat, Apr 29, 2023 at 12:13:39AM +0800, Yi Liu wrote:
>
> > > Whoa, noiommu is inherently unsafe an only meant to expose the vfio
> > > device interface for userspace drivers that are going to do unsafe
> > > things regardless.
> From: Jason Gunthorpe
> Sent: Wednesday, May 3, 2023 2:12 AM
>
> On Sat, Apr 29, 2023 at 12:07:24AM +0800, Yi Liu wrote:
> > > The emulated stuff is for mdev only, it should not be confused with
> > > no-iommu
> >
> > hmmm. I guess the confusion is due to the reuse of
> > vfio_iommufd_emulated_
> From: Alex Williamson
> Sent: Friday, April 28, 2023 5:55 AM
>
> On Wed, 26 Apr 2023 07:54:19 -0700
> Yi Liu wrote:
>
> > This is the way user to invoke hot-reset for the devices opened by cdev
> > interface. User should check the flag VFIO_PCI_HOT_RESET_FLAG_RESETTABLE
> > in the output of V
> From: Tian, Kevin
> Sent: Thursday, April 27, 2023 2:46 PM
>
> > From: Yi Liu
> > Sent: Wednesday, April 26, 2023 10:54 PM
> > +
> > +/*
> > + * Return devid for devices that have been bound with iommufd,
> > + * returns 0 if not bound yet.
> > + */
> > +u32 vfio_iommufd_physical_devid(struct v
> From: Tian, Kevin
> Sent: Thursday, April 27, 2023 2:42 PM
>
> > From: Liu, Yi L
> > Sent: Wednesday, April 26, 2023 10:54 PM
> >
> > VFIO needs two reserved values. 0 is already reserved by initializing
> > xarray with XA_FLAGS_ALLOC1. This reserve
> From: Tian, Kevin
> Sent: Thursday, April 27, 2023 2:36 PM
>
> > From: Liu, Yi L
> > Sent: Wednesday, April 26, 2023 10:54 PM
> >
> > -static inline bool vfio_device_is_noiommu(struct vfio_device *vdev)
> > +static inline int vfio_device
> From: Tian, Kevin
> Sent: Thursday, April 27, 2023 2:54 PM
>
> > From: Liu, Yi L
> > Sent: Wednesday, April 26, 2023 10:54 PM
> >
> > +static bool vfio_dev_in_iommufd_ctx(struct vfio_pci_core_device *vdev,
> > +
> From: Tian, Kevin
> Sent: Thursday, April 27, 2023 2:39 PM
>
> > From: Liu, Yi L
> > Sent: Wednesday, April 26, 2023 10:54 PM
> > @@ -121,7 +128,8 @@ static void vfio_emulated_unmap(void *data,
> > unsigned long iova,
> > {
> > struct vfio_d
> From: Alex Williamson
> Sent: Wednesday, April 26, 2023 9:20 PM
>
> On Wed, 26 Apr 2023 07:22:17 +0000
> "Liu, Yi L" wrote:
>
> > > From: Alex Williamson
> > > Sent: Thursday, April 20, 2023 10:09 PM
> > [...]
> > > > &g
> From: Liu, Yi L
> Sent: Wednesday, April 26, 2023 10:54 PM
>
> VFIO_DEVICE_PCI_HOT_RESET requires user to pass an array of group fds
> to prove that it owns all devices affected by resetting the calling
> device. While for cdev devices, user can use an iommufd-based ownershi
> From: Alex Williamson
> Sent: Thursday, April 20, 2023 10:09 PM
[...]
> > > Whereas dev-id < 0
> > > (== -1) is an affected device which prevents hot-reset, ex. an un-owned
> > > device, device configured within a different iommufd_ctx, or device
> > > opened outside of the vfio cdev API." Is t
> From: Jason Gunthorpe
> Sent: Saturday, April 22, 2023 6:36 AM
>
> On Thu, Apr 20, 2023 at 08:08:39AM -0600, Alex Williamson wrote:
>
> > > Hide this device in the list looks fine to me. But the calling user should
> > > not do any new device open before finishing hot-reset. Otherwise, user ma
> From: Jason Gunthorpe
> Sent: Tuesday, April 18, 2023 9:02 PM
>
> On Tue, Apr 18, 2023 at 10:23:55AM +0000, Liu, Yi L wrote:
> > > From: Jason Gunthorpe
> > > Sent: Monday, April 17, 2023 9:39 PM
> > >
> > > On Fri, Apr 14, 2023 at 09:11:30AM
> From: Alex Williamson
> Sent: Wednesday, April 5, 2023 5:49 AM
> On Tue, 4 Apr 2023 17:28:40 +0200
> Eric Auger wrote:
>
> > Hi,
> >
> > On 4/1/23 16:44, Yi Liu wrote:
> > > This is needed by the vfio-pci driver to report affected devices in the
> > > hot reset for a given device.
> > >
> > >
> From: Eric Auger
> Sent: Wednesday, April 5, 2023 7:48 PM
>
> On 4/1/23 16:44, Yi Liu wrote:
> > There are users that need to check if vfio_device is opened as cdev.
> > e.g. vfio-pci. This adds a flag in vfio_device, it will be set in the
> > cdev path when device is opened. This is not used a
> From: Alex Williamson
> Sent: Wednesday, April 19, 2023 2:39 AM
>
> On Tue, 18 Apr 2023 09:57:32 -0300
> Jason Gunthorpe wrote:
>
> > On Mon, Apr 17, 2023 at 02:06:42PM -0600, Alex Williamson wrote:
> > > On Mon, 17 Apr 2023 16:31:56 -0300
> > > Jason Gunthorpe wrote:
> > >
> > > > On Mon, A
> From: Alex Williamson
> Sent: Tuesday, April 18, 2023 12:11 PM
>
[...]
>
> We haven't discussed how it fails when called on a group-opened device
> in a mixed environment. I'd propose that the INFO ioctl behaves
> exactly as it does today, reporting group-id and BDF for each affected
> device.
> From: Jason Gunthorpe
> Sent: Monday, April 17, 2023 9:39 PM
>
> On Fri, Apr 14, 2023 at 09:11:30AM +, Tian, Kevin wrote:
>
> > The only corner case with this option is when a user mixes group
> > and cdev usages. iirc you mentioned it's a valid usage to be supported.
> > In that case the
> From: Alex Williamson
> Sent: Saturday, April 15, 2023 1:11 AM
>
> On Fri, 14 Apr 2023 11:38:24 +0000
> "Liu, Yi L" wrote:
>
> > > From: Tian, Kevin
> > > Sent: Friday, April 14, 2023 5:12 PM
> > >
> > > >
> From: Tian, Kevin
> Sent: Friday, April 14, 2023 5:12 PM
>
> > From: Alex Williamson
> > Sent: Friday, April 14, 2023 2:07 AM
> >
> > We had already iterated a proposal where the group-id is replaced with
> > a dev-id in the existing ioctl and a flag indicates when the return
> > value is a de
> From: Jason Gunthorpe
> Sent: Thursday, April 13, 2023 7:51 PM
>
> On Thu, Apr 13, 2023 at 08:25:52AM +, Tian, Kevin wrote:
> > > From: Jason Gunthorpe
> > > Sent: Thursday, April 13, 2023 4:07 AM
> > >
> > >
> > > > in which case we need c) a way to
> > > > report the overall set of affec
> From: Jason Gunthorpe
> Sent: Wednesday, April 12, 2023 8:01 AM
>
> On Tue, Apr 11, 2023 at 03:58:27PM -0600, Alex Williamson wrote:
>
> > > Management tools already need to understand dev_set if they want to
> > > offer reliable reset support to the VMs. Same as today.
> >
> > I don't think t
Hi Alex,
> From: Alex Williamson
> Sent: Friday, April 7, 2023 8:04 PM
>
> On Fri, 7 Apr 2023 10:09:58 +0000
> "Liu, Yi L" wrote:
>
> > Hi Alex,
> >
> > > From: Alex Williamson
> > > Sent: Monday, April 3, 2023 11:02 PM
> > &g
> From: Alex Williamson
> Sent: Monday, April 10, 2023 10:41 PM
>
> On Mon, 10 Apr 2023 08:48:54 +0000
> "Liu, Yi L" wrote:
>
> > > From: Alex Williamson
> > > Sent: Sunday, April 9, 2023 9:30 PM
> > [...]
> > > > yeah,
> From: Alex Williamson
> Sent: Sunday, April 9, 2023 9:30 PM
[...]
> > yeah, needs to move the iommu group creation back to vfio_main.c. This
> > would be a prerequisite for [1]
> >
> > [1] https://lore.kernel.org/kvm/20230401151833.124749-25-yi.l@intel.com/
> >
> > I'll also try out your sug
> From: Alex Williamson
> Sent: Saturday, April 8, 2023 5:07 AM
>
> On Fri, 7 Apr 2023 15:47:10 +0000
> "Liu, Yi L" wrote:
>
> > > From: Alex Williamson
> > > Sent: Friday, April 7, 2023 11:14 PM
> > >
> > > On Fri, 7 Apr 20
> From: Alex Williamson
> Sent: Friday, April 7, 2023 11:14 PM
>
> On Fri, 7 Apr 2023 14:04:02 +0000
> "Liu, Yi L" wrote:
>
> > > From: Alex Williamson
> > > Sent: Friday, April 7, 2023 9:52 PM
> > >
> > > On Fri, 7 Apr 2023 13:
> From: Alex Williamson
> Sent: Friday, April 7, 2023 9:52 PM
>
> On Fri, 7 Apr 2023 13:24:25 +0000
> "Liu, Yi L" wrote:
>
> > > From: Alex Williamson
> > > Sent: Friday, April 7, 2023 8:04 PM
> > >
> > > > >
> From: Alex Williamson
> Sent: Friday, April 7, 2023 8:04 PM
>
> > > > > @@ -791,7 +813,21 @@ static int vfio_pci_fill_devs(struct pci_dev
> > > > > *pdev, void
> > > *data)
> > > > > if (!iommu_group)
> > > > > return -EPERM; /* Cannot reset non-isolated devices */
[1]
>
Hi Eric,
> From: Eric Auger
> Sent: Friday, April 7, 2023 4:57 PM
>
> Hi Yi,
>
> On 4/7/23 05:42, Liu, Yi L wrote:
> >> From: Alex Williamson
> >> Sent: Friday, April 7, 2023 2:58 AM
> >>>> You don't say anything about p
Hi Eric,
> From: Eric Auger
> Sent: Friday, April 7, 2023 5:48 PM
>
> Hi Yi,
>
> On 4/1/23 17:18, Yi Liu wrote:
> > VFIO group has historically allowed multi-open of the device FD. This
> > was made secure because the "open" was executed via an ioctl to the
> > group FD which is itself only sin
Hi Alex,
> From: Alex Williamson
> Sent: Monday, April 3, 2023 11:02 PM
>
> On Mon, 3 Apr 2023 09:25:06 +0000
> "Liu, Yi L" wrote:
>
> > > From: Liu, Yi L
> > > Sent: Saturday, April 1, 2023 10:44 PM
> >
> > > @@ -791,7
> From: Alex Williamson
> Sent: Friday, April 7, 2023 1:54 AM
>
> On Thu, 6 Apr 2023 10:02:10 +0000
> "Liu, Yi L" wrote:
>
> > > From: Jason Gunthorpe
> > > Sent: Thursday, April 6, 2023 7:23 AM
> > >
> > >
1 - 100 of 262 matches
Mail list logo