twx-linux/drivers
Linus Torvalds 4debf77169 iommufd for 6.6
This includes a shared branch with VFIO:
 
  - Enhance VFIO_DEVICE_GET_PCI_HOT_RESET_INFO so it can work with iommufd
    FDs, not just group FDs. This removes the last place in the uAPI that
    required the group fd.
 
  - Give VFIO a new device node /dev/vfio/devices/vfioX (the so called cdev
    node) which is very similar to the FD from VFIO_GROUP_GET_DEVICE_FD.
    The cdev is associated with the struct device that the VFIO driver is
    bound to and shows up in sysfs in the normal way.
 
  - Add a cdev IOCTL VFIO_DEVICE_BIND_IOMMUFD which allows a newly opened
    /dev/vfio/devices/vfioX to be associated with an IOMMUFD, this replaces
    the VFIO_GROUP_SET_CONTAINER flow.
 
  - Add cdev IOCTLs VFIO_DEVICE_[AT|DE]TACH_IOMMUFD_PT to allow the IOMMU
    translation the vfio_device is associated with to be changed. This is a
    significant new feature for VFIO as previously each vfio_device was
    fixed to a single translation.
 
    The translation is under the control of iommufd, so it can be any of
    the different translation modes that iommufd is learning to create.
 
 At this point VFIO has compilation options to remove the legacy interfaces
 and in modern mode it behaves like a normal driver subsystem. The
 /dev/vfio/iommu and /dev/vfio/groupX nodes are not present and each
 vfio_device only has a /dev/vfio/devices/vfioX cdev node that represents
 the device.
 
 On top of this is built some of the new iommufd functionality:
 
  - IOMMU_HWPT_ALLOC allows userspace to directly create the low level
    IO Page table objects and affiliate them with IOAS objects that hold
    the translation mapping. This is the basic functionality for the
    normal IOMMU_DOMAIN_PAGING domains.
 
  - VFIO_DEVICE_ATTACH_IOMMUFD_PT can be used to replace the current
    translation. This is wired up to through all the layers down to the
    driver so the driver has the ability to implement a hitless
    replacement. This is necessary to fully support guest behaviors when
    emulating HW (eg guest atomic change of translation)
 
  - IOMMU_GET_HW_INFO returns information about the IOMMU driver HW that
    owns a VFIO device. This includes support for the Intel iommu, and
    patches have been posted for all the other server IOMMU.
 
 Along the way are a number of internal items:
 
  - New iommufd kapis iommufd_ctx_has_group(), iommufd_device_to_ictx(),
    iommufd_device_to_id(), iommufd_access_detach(), iommufd_ctx_from_fd(),
    iommufd_device_replace()
 
  - iommufd now internally tracks iommu_groups as it needs some per-group
    data
 
  - Reorganize how the internal hwpt allocation flows to have more robust
    locking
 
  - Improve the access interfaces to support detach and replace of an IOAS
    from an access
 
  - New selftests and a rework of how the selftests creates a mock iommu
    driver to be more like a real iommu driver
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRRRCHOFoQz/8F5bUaFwuHvBreFYQUCZO/QDQAKCRCFwuHvBreF
 YZ2iAP4hNEF6MJLRI2A28V3I/80f3x9Ed3Cirp/Q8ZdVEE+HYQD8DFaafJ0y3iPQ
 5mxD4ZrZ9KfUns/gUqCT5oPHjrcvSAM=
 =EQCw
 -----END PGP SIGNATURE-----

Merge tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd

Pull iommufd updates from Jason Gunthorpe:
 "On top of the vfio updates is built some new iommufd functionality:

   - IOMMU_HWPT_ALLOC allows userspace to directly create the low level
     IO Page table objects and affiliate them with IOAS objects that
     hold the translation mapping. This is the basic functionality for
     the normal IOMMU_DOMAIN_PAGING domains.

   - VFIO_DEVICE_ATTACH_IOMMUFD_PT can be used to replace the current
     translation. This is wired up to through all the layers down to the
     driver so the driver has the ability to implement a hitless
     replacement. This is necessary to fully support guest behaviors
     when emulating HW (eg guest atomic change of translation)

   - IOMMU_GET_HW_INFO returns information about the IOMMU driver HW
     that owns a VFIO device. This includes support for the Intel iommu,
     and patches have been posted for all the other server IOMMU.

  Along the way are a number of internal items:

   - New iommufd kernel APIs: iommufd_ctx_has_group(),
        iommufd_device_to_ictx(), iommufd_device_to_id(),
        iommufd_access_detach(), iommufd_ctx_from_fd(),
        iommufd_device_replace()

   - iommufd now internally tracks iommu_groups as it needs some
     per-group data

   - Reorganize how the internal hwpt allocation flows to have more
     robust locking

   - Improve the access interfaces to support detach and replace of an
     IOAS from an access

   - New selftests and a rework of how the selftests creates a mock
     iommu driver to be more like a real iommu driver"

Link: https://lore.kernel.org/lkml/ZO%2FTe6LU1ENf58ZW@nvidia.com/

* tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd: (34 commits)
  iommufd/selftest: Don't leak the platform device memory when unloading the module
  iommu/vt-d: Implement hw_info for iommu capability query
  iommufd/selftest: Add coverage for IOMMU_GET_HW_INFO ioctl
  iommufd: Add IOMMU_GET_HW_INFO
  iommu: Add new iommu op to get iommu hardware information
  iommu: Move dev_iommu_ops() to private header
  iommufd: Remove iommufd_ref_to_users()
  iommufd/selftest: Make the mock iommu driver into a real driver
  vfio: Support IO page table replacement
  iommufd/selftest: Add IOMMU_TEST_OP_ACCESS_REPLACE_IOAS coverage
  iommufd: Add iommufd_access_replace() API
  iommufd: Use iommufd_access_change_ioas in iommufd_access_destroy_object
  iommufd: Add iommufd_access_change_ioas(_id) helpers
  iommufd: Allow passing in iopt_access_list_id to iopt_remove_access()
  vfio: Do not allow !ops->dma_unmap in vfio_pin/unpin_pages()
  iommufd/selftest: Add a selftest for IOMMU_HWPT_ALLOC
  iommufd/selftest: Return the real idev id from selftest mock_domain
  iommufd: Add IOMMU_HWPT_ALLOC
  iommufd/selftest: Test iommufd_device_replace()
  iommufd: Make destroy_rwsem use a lock class per object type
  ...
2023-08-30 20:41:37 -07:00
..
accel Linux 6.5-rc7 2023-08-24 07:26:06 +10:00
accessibility
acpi - Some swap cleanups from Ma Wupeng ("fix WARN_ON in add_to_avail_list") 2023-08-29 14:25:26 -07:00
amba
android v6.6-vfs.ctime 2023-08-28 09:31:32 -07:00
ata
atm
auxdisplay drm for 6.6-rc1 2023-08-30 13:34:34 -07:00
base This pull request is full of clk driver changes. In fact, there aren't any 2023-08-30 19:53:39 -07:00
bcma
block for-6.6/block-2023-08-28 2023-08-29 20:21:42 -07:00
bluetooth Bluetooth: btusb: Do not call kfree_skb() under spin_lock_irqsave() 2023-08-24 12:24:37 -07:00
bus ARM: SoC cleanups for 6.6 2023-08-30 16:49:40 -07:00
cdrom
cdx
char Minor fixes for IPMI 2023-08-30 19:20:35 -07:00
clk This pull request is full of clk driver changes. In fact, there aren't any 2023-08-30 19:53:39 -07:00
clocksource clocksource: Explicitly include correct DT includes 2023-08-28 13:30:57 -05:00
comedi
connector
counter
cpufreq ARM cpufreq updates for 6.6 2023-08-28 14:12:05 +02:00
cpuidle Merge branches 'pm-cpuidle' and 'pm-cpufreq' 2023-08-25 21:15:56 +02:00
crypto This update includes the following changes: 2023-08-29 11:23:29 -07:00
cxl
dax mm: remove enum page_entry_size 2023-08-24 16:20:30 -07:00
dca
devfreq PM / devfreq: Fix leak in devfreq_dev_release() 2023-08-10 22:48:16 +09:00
dio
dma dmaengine: xilinx: xdma: Fix typo 2023-08-07 00:01:41 +05:30
dma-buf drm for 6.6-rc1 2023-08-30 13:34:34 -07:00
edac Intel EDAC fixes: 2023-08-30 19:23:00 -07:00
eisa
extcon
firewire
firmware Pin control bulk changes for the v6.6 kernel cycle: 2023-08-30 19:36:19 -07:00
fpga
fsi
genpd ARM: SoC drivers for 6.6 2023-08-30 16:42:21 -07:00
gnss
gpio gpio updates for v6.6 2023-08-29 10:21:56 -07:00
gpu VFIO updates for v6.6-rc1 2023-08-30 20:36:01 -07:00
greybus
hid drm for 6.6-rc1 2023-08-30 13:34:34 -07:00
hsi
hte hte: Explicitly include correct DT includes 2023-08-28 13:31:06 -05:00
hv
hwmon hwmon updates for v6.6 2023-08-29 10:02:35 -07:00
hwspinlock
hwtracing
i2c i2c: bcm-iproc: Fix bcm_iproc_i2c_isr deadlock issue 2023-08-14 18:17:13 +02:00
i3c
idle Perf events changes for v6.6: 2023-08-28 16:35:01 -07:00
iio Add cs42l43 PC focused SoundWire CODEC 2023-08-22 12:48:04 +01:00
infiniband Networking changes for 6.6. 2023-08-29 11:33:01 -07:00
input
interconnect This pull request is full of clk driver changes. In fact, there aren't any 2023-08-30 19:53:39 -07:00
iommu iommufd for 6.6 2023-08-30 20:41:37 -07:00
ipack
irqchip Documentation work keeps chugging along; stuff for 6.6 includes: 2023-08-30 20:05:42 -07:00
isdn
leds Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-08-24 10:51:39 -07:00
macintosh macintosh: Explicitly include correct DT includes 2023-08-28 13:36:24 -05:00
mailbox
mcb
md for-6.6/block-2023-08-28 2023-08-29 20:21:42 -07:00
media sound updates for 6.6-rc1 2023-08-30 13:45:05 -07:00
memory memory: tegra: add MC client for Tegra234 GPU 2023-08-05 09:01:31 +02:00
memstick
message
mfd spi: Updates for v6.6 2023-08-29 09:47:33 -07:00
misc - Some swap cleanups from Ma Wupeng ("fix WARN_ON in add_to_avail_list") 2023-08-29 14:25:26 -07:00
mmc Modules changes for v6.6-rc1 2023-08-29 17:32:32 -07:00
most
mtd
mux mux: Explicitly include correct DT includes 2023-08-28 13:36:24 -05:00
net VFIO updates for v6.6-rc1 2023-08-30 20:36:01 -07:00
nfc nfc: virtual_ncidev: Use module_misc_device macro to simplify the code 2023-08-16 09:54:16 +01:00
ntb
nubus
nvdimm mm/hugepage pud: allow arch-specific helper function to check huge page pud support 2023-08-18 10:12:53 -07:00
nvme for-6.6/block-2023-08-28 2023-08-29 20:21:42 -07:00
nvmem
of Devicetree updates for v6.6: 2023-08-30 16:59:03 -07:00
opp OPP: Fix argument name in doc comment 2023-08-18 10:55:49 +05:30
parisc parisc: ccio-dma: Create private runway procfs root entry 2023-08-28 18:00:27 +02:00
parport Devicetree include cleanups for v6.6: 2023-08-30 17:04:28 -07:00
pci pci-v6.6-changes 2023-08-30 20:23:07 -07:00
pcmcia
peci
perf arm64 updates for 6.6 2023-08-28 17:34:54 -07:00
phy This pull request is full of clk driver changes. In fact, there aren't any 2023-08-30 19:53:39 -07:00
pinctrl Pin control bulk changes for the v6.6 kernel cycle: 2023-08-30 19:36:19 -07:00
platform Networking changes for 6.6. 2023-08-29 11:33:01 -07:00
pnp PNP: ACPI: Fix string truncation warning 2023-08-17 19:38:35 +02:00
power
powercap Power management updates for 6.6-rc1 2023-08-28 18:04:39 -07:00
pps
ps3
ptp net: ptp: create a mock-up PTP Hardware Clock driver 2023-08-09 15:59:21 -07:00
pwm
rapidio
ras
regulator regulator: Updates for v6.6 2023-08-29 09:40:16 -07:00
remoteproc soc: qcom: aoss: Tidy up qmp_send() callers 2023-08-13 19:27:32 -07:00
reset This pull request is full of clk driver changes. In fact, there aren't any 2023-08-30 19:53:39 -07:00
rpmsg
rtc
s390 VFIO updates for v6.6-rc1 2023-08-30 20:36:01 -07:00
sbus sbus: Explicitly include correct DT includes 2023-08-28 13:36:24 -05:00
scsi for-6.6/block-2023-08-28 2023-08-29 20:21:42 -07:00
sh
siox
slimbus
soc This pull request is full of clk driver changes. In fact, there aren't any 2023-08-30 19:53:39 -07:00
soundwire Immutable branch between MFD, Pinctrl and soundwire due for the v6.6 merge window 2023-08-18 17:37:08 +01:00
spi spi: Updates for v6.6 2023-08-29 09:47:33 -07:00
spmi
ssb
staging sound updates for 6.6-rc1 2023-08-30 13:45:05 -07:00
target bio-integrity: update the payload size in bio_integrity_add_page() 2023-08-09 16:05:35 -06:00
tc
tee
thermal Thermal control updates for 6.6-rc1 2023-08-28 18:26:45 -07:00
thunderbolt
tty - An extensive rework of kexec and crash Kconfig from Eric DeVolder 2023-08-29 14:53:51 -07:00
ufs scsi: ufs: ufs-qcom: Clear qunipro_g4_sel for HW major version > 5 2023-08-21 17:32:55 -04:00
uio
usb v6.6-vfs.ctime 2023-08-28 09:31:32 -07:00
vdpa Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-08-18 12:44:56 -07:00
vfio iommufd for 6.6 2023-08-30 20:41:37 -07:00
vhost vhost-scsi: Rename vhost_scsi_iov_to_sgl 2023-08-10 15:24:28 -04:00
video drm for 6.6-rc1 2023-08-30 13:34:34 -07:00
virt minmax: add in_range() macro 2023-08-24 16:20:18 -07:00
virtio virtio-mem: check if the config changed before fake offlining memory 2023-08-10 15:51:46 -04:00
vlynq
w1
watchdog
xen dma-maping updates for Linux 6.6 2023-08-29 20:32:10 -07:00
zorro zorro: Include zorro.h in names.c 2023-08-21 13:27:44 +02:00
Kconfig
Makefile This pull-request adds a new subsystem for genpd providers in drivers/genpd 2023-08-30 16:37:00 -07:00