Merge tag 'vfio-v6.3-rc1' of https://github.com/awilliam/linux-vfio
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 25 Feb 2023 19:52:57 +0000 (11:52 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 25 Feb 2023 19:52:57 +0000 (11:52 -0800)
Pull VFIO updates from Alex Williamson:

 - Remove redundant resource check in vfio-platform (Angus Chen)

 - Use GFP_KERNEL_ACCOUNT for persistent userspace allocations, allowing
   removal of arbitrary kernel limits in favor of cgroup control (Yishai
   Hadas)

 - mdev tidy-ups, including removing the module-only build restriction
   for sample drivers, Kconfig changes to select mdev support,
   documentation movement to keep sample driver usage instructions with
   sample drivers rather than with API docs, remove references to
   out-of-tree drivers in docs (Christoph Hellwig)

 - Fix collateral breakages from mdev Kconfig changes (Arnd Bergmann)

 - Make mlx5 migration support match device support, improve source and
   target flows to improve pre-copy support and reduce downtime (Yishai
   Hadas)

 - Convert additional mdev sysfs case to use sysfs_emit() (Bo Liu)

 - Resolve copy-paste error in mdev mbochs sample driver Kconfig (Ye
   Xingchen)

 - Avoid propagating missing reset error in vfio-platform if reset
   requirement is relaxed by module option (Tomasz Duszynski)

 - Range size fixes in mlx5 variant driver for missed last byte and
   stricter range calculation (Yishai Hadas)

 - Fixes to suspended vaddr support and locked_vm accounting, excluding
   mdev configurations from the former due to potential to indefinitely
   block kernel threads, fix underflow and restore locked_vm on new mm
   (Steve Sistare)

 - Update outdated vfio documentation due to new IOMMUFD interfaces in
   recent kernels (Yi Liu)

 - Resolve deadlock between group_lock and kvm_lock, finally (Matthew
   Rosato)

 - Fix NULL pointer in group initialization error path with IOMMUFD (Yan
   Zhao)

* tag 'vfio-v6.3-rc1' of https://github.com/awilliam/linux-vfio: (32 commits)
  vfio: Fix NULL pointer dereference caused by uninitialized group->iommufd
  docs: vfio: Update vfio.rst per latest interfaces
  vfio: Update the kdoc for vfio_device_ops
  vfio/mlx5: Fix range size calculation upon tracker creation
  vfio: no need to pass kvm pointer during device open
  vfio: fix deadlock between group lock and kvm lock
  vfio: revert "iommu driver notify callback"
  vfio/type1: revert "implement notify callback"
  vfio/type1: revert "block on invalid vaddr"
  vfio/type1: restore locked_vm
  vfio/type1: track locked_vm per dma
  vfio/type1: prevent underflow of locked_vm via exec()
  vfio/type1: exclude mdevs from VFIO_UPDATE_VADDR
  vfio: platform: ignore missing reset if disabled at module init
  vfio/mlx5: Improve the target side flow to reduce downtime
  vfio/mlx5: Improve the source side flow upon pre_copy
  vfio/mlx5: Check whether VF is migratable
  samples: fix the prompt about SAMPLE_VFIO_MDEV_MBOCHS
  vfio/mdev: Use sysfs_emit() to instead of sprintf()
  vfio-mdev: add back CONFIG_VFIO dependency
  ...

1  2 
MAINTAINERS
arch/s390/Kconfig
drivers/gpu/drm/i915/Kconfig
drivers/vfio/container.c
drivers/vfio/group.c
drivers/vfio/pci/vfio_pci_core.c
drivers/vfio/vfio.h
drivers/vfio/vfio_iommu_type1.c
drivers/vfio/vfio_main.c
samples/Kconfig

diff --cc MAINTAINERS
Simple merge
Simple merge
Simple merge
Simple merge
index e166ad7ce6e75529d9ce922b5500456899b314d1,160deff6649b5f4d981e930f1075faf9b7f177aa..27d5ba7cf9dcd467fb92aaf683c66655354faf18
@@@ -133,14 -133,11 +133,14 @@@ static int vfio_group_ioctl_set_contain
  
        iommufd = iommufd_ctx_from_file(f.file);
        if (!IS_ERR(iommufd)) {
 -              u32 ioas_id;
 +              if (IS_ENABLED(CONFIG_VFIO_NOIOMMU) &&
 +                  group->type == VFIO_NO_IOMMU)
 +                      ret = iommufd_vfio_compat_set_no_iommu(iommufd);
 +              else
 +                      ret = iommufd_vfio_compat_ioas_create(iommufd);
  
 -              ret = iommufd_vfio_compat_ioas_id(iommufd, &ioas_id);
                if (ret) {
-                       iommufd_ctx_put(group->iommufd);
+                       iommufd_ctx_put(iommufd);
                        goto out_unlock;
                }
  
Simple merge
index 9e94abcf8ee1a83cf7c76899e8862a88e698befe,e9721d8424bc433f011e24dff75fa84bd8e87fd2..7b19c621e0e6821a8c3b34886531456da2249240
@@@ -88,18 -88,7 +88,13 @@@ bool vfio_device_has_container(struct v
  int __init vfio_group_init(void);
  void vfio_group_cleanup(void);
  
 +static inline bool vfio_device_is_noiommu(struct vfio_device *vdev)
 +{
 +      return IS_ENABLED(CONFIG_VFIO_NOIOMMU) &&
 +             vdev->group->type == VFIO_NO_IOMMU;
 +}
 +
  #if IS_ENABLED(CONFIG_VFIO_CONTAINER)
- /* events for the backend driver notify callback */
- enum vfio_iommu_notify_type {
-       VFIO_IOMMU_CONTAINER_CLOSE = 0,
- };
  /**
   * struct vfio_iommu_driver_ops - VFIO IOMMU driver callbacks
   */
Simple merge
Simple merge
diff --cc samples/Kconfig
Simple merge