linux/drivers
Linus Torvalds 463f46e114 iommufd for 6.7
This branch has three new iommufd capabilities:
 
  - Dirty tracking for DMA. AMD/ARM/Intel CPUs can now record if a DMA
    writes to a page in the IOPTEs within the IO page table. This can be used
    to generate a record of what memory is being dirtied by DMA activities
    during a VM migration process. A VMM like qemu will combine the IOMMU
    dirty bits with the CPU's dirty log to determine what memory to
    transfer.
 
    VFIO already has a DMA dirty tracking framework that requires PCI
    devices to implement tracking HW internally. The iommufd version
    provides an alternative that the VMM can select, if available. The two
    are designed to have very similar APIs.
 
  - Userspace controlled attributes for hardware page
    tables (HWPT/iommu_domain). There are currently a few generic attributes
    for HWPTs (support dirty tracking, and parent of a nest). This is an
    entry point for the userspace iommu driver to control the HW in detail.
 
  - Nested translation support for HWPTs. This is a 2D translation scheme
    similar to the CPU where a DMA goes through a first stage to determine
    an intermediate address which is then translated trough a second stage
    to a physical address.
 
    Like for CPU translation the first stage table would exist in VM
    controlled memory and the second stage is in the kernel and matches the
    VM's guest to physical map.
 
    As every IOMMU has a unique set of parameter to describe the S1 IO page
    table and its associated parameters the userspace IOMMU driver has to
    marshal the information into the correct format.
 
    This is 1/3 of the feature, it allows creating the nested translation
    and binding it to VFIO devices, however the API to support IOTLB and
    ATC invalidation of the stage 1 io page table, and forwarding of IO
    faults are still in progress.
 
 The series includes AMD and Intel support for dirty tracking. Intel
 support for nested translation.
 
 Along the way are a number of internal items:
 
  - New iommu core items: ops->domain_alloc_user(), ops->set_dirty_tracking,
    ops->read_and_clear_dirty(), IOMMU_DOMAIN_NESTED, and iommu_copy_struct_from_user
 
  - UAF fix in iopt_area_split()
 
  - Spelling fixes and some test suite improvement
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRRRCHOFoQz/8F5bUaFwuHvBreFYQUCZUDu2wAKCRCFwuHvBreF
 YcdeAQDaBmjyGLrRIlzPyohF6FrombyWo2512n51Hs8IHR4IvQEA3oRNgQ2tsJRr
 1UPuOqnOD5T/oVX6AkUPRBwanCUQwwM=
 =nyJ3
 -----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:
 "This brings three new iommufd capabilities:

   - Dirty tracking for DMA.

     AMD/ARM/Intel CPUs can now record if a DMA writes to a page in the
     IOPTEs within the IO page table. This can be used to generate a
     record of what memory is being dirtied by DMA activities during a
     VM migration process. A VMM like qemu will combine the IOMMU dirty
     bits with the CPU's dirty log to determine what memory to transfer.

     VFIO already has a DMA dirty tracking framework that requires PCI
     devices to implement tracking HW internally. The iommufd version
     provides an alternative that the VMM can select, if available. The
     two are designed to have very similar APIs.

   - Userspace controlled attributes for hardware page tables
     (HWPT/iommu_domain). There are currently a few generic attributes
     for HWPTs (support dirty tracking, and parent of a nest). This is
     an entry point for the userspace iommu driver to control the HW in
     detail.

   - Nested translation support for HWPTs. This is a 2D translation
     scheme similar to the CPU where a DMA goes through a first stage to
     determine an intermediate address which is then translated trough a
     second stage to a physical address.

     Like for CPU translation the first stage table would exist in VM
     controlled memory and the second stage is in the kernel and matches
     the VM's guest to physical map.

     As every IOMMU has a unique set of parameter to describe the S1 IO
     page table and its associated parameters the userspace IOMMU driver
     has to marshal the information into the correct format.

     This is 1/3 of the feature, it allows creating the nested
     translation and binding it to VFIO devices, however the API to
     support IOTLB and ATC invalidation of the stage 1 io page table,
     and forwarding of IO faults are still in progress.

  The series includes AMD and Intel support for dirty tracking. Intel
  support for nested translation.

  Along the way are a number of internal items:

   - New iommu core items: ops->domain_alloc_user(),
     ops->set_dirty_tracking, ops->read_and_clear_dirty(),
     IOMMU_DOMAIN_NESTED, and iommu_copy_struct_from_user

   - UAF fix in iopt_area_split()

   - Spelling fixes and some test suite improvement"

* tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd: (52 commits)
  iommufd: Organize the mock domain alloc functions closer to Joerg's tree
  iommufd/selftest: Fix page-size check in iommufd_test_dirty()
  iommufd: Add iopt_area_alloc()
  iommufd: Fix missing update of domains_itree after splitting iopt_area
  iommu/vt-d: Disallow read-only mappings to nest parent domain
  iommu/vt-d: Add nested domain allocation
  iommu/vt-d: Set the nested domain to a device
  iommu/vt-d: Make domain attach helpers to be extern
  iommu/vt-d: Add helper to setup pasid nested translation
  iommu/vt-d: Add helper for nested domain allocation
  iommu/vt-d: Extend dmar_domain to support nested domain
  iommufd: Add data structure for Intel VT-d stage-1 domain allocation
  iommu/vt-d: Enhance capability check for nested parent domain allocation
  iommufd/selftest: Add coverage for IOMMU_HWPT_ALLOC with nested HWPTs
  iommufd/selftest: Add nested domain allocation for mock domain
  iommu: Add iommu_copy_struct_from_user helper
  iommufd: Add a nested HW pagetable object
  iommu: Pass in parent domain with user_data to domain_alloc_user op
  iommufd: Share iommufd_hwpt_alloc with IOMMUFD_OBJ_HWPT_NESTED
  iommufd: Derive iommufd_hwpt_paging from iommufd_hw_pagetable
  ...
2023-11-01 16:44:56 -10:00
..
accel drm for 6.7-rc1 2023-11-01 06:28:35 -10:00
accessibility
acpi asm-generic updates for v6.7 2023-11-01 15:28:33 -10:00
amba amba: bus: balance firmware node reference counting 2023-10-17 13:37:35 -05:00
android vfs-6.7.ctime 2023-10-30 09:47:13 -10:00
ata ATA changes for 6.7-rc1 2023-11-01 12:50:12 -10:00
atm atm: fore200e: Drop unnecessary of_match_device() 2023-10-10 12:41:17 +02:00
auxdisplay auxdisplay: panel: Replace deprecated strncpy() with strtomem_pad() 2023-09-29 14:48:31 -07:00
base SoC driver updates for 6.7 2023-11-01 14:46:51 -10:00
bcma
block for-6.7/block-2023-10-30 2023-11-01 12:30:07 -10:00
bluetooth Bluetooth: btmtksdio: enable bluetooth wakeup in system suspend 2023-10-23 11:04:51 -07:00
bus SoC driver updates for 6.7 2023-11-01 14:46:51 -10:00
cache riscv: RISCV_NONSTANDARD_CACHE_OPS shouldn't depend on RISCV_DMA_NONCOHERENT 2023-10-26 09:42:37 +02:00
cdrom cdrom: Remove now superfluous sentinel element from ctl_table array 2023-10-02 20:04:58 -06:00
cdx cdx: add support for bus mastering 2023-09-28 12:12:07 -06:00
char asm-generic updates for v6.7 2023-11-01 15:28:33 -10:00
clk SoC driver updates for 6.7 2023-11-01 14:46:51 -10:00
clocksource arm64 updates for 6.7: 2023-11-01 09:34:55 -10:00
comedi
connector Fix NULL pointer dereference in cn_filter() 2023-10-24 10:53:45 +02:00
counter First set of Counter fixes for 6.6 2023-10-02 13:13:15 +02:00
cpufreq asm-generic updates for v6.7 2023-11-01 15:28:33 -10:00
cpuidle cpuidle: dt: Replace deprecated strncpy() with strscpy() 2023-09-29 14:48:31 -07:00
crypto virtio-crypto: handle config changed by work queue 2023-10-18 11:30:06 -04:00
cxl cxl/acpi: Annotate struct cxl_cxims_data with __counted_by 2023-09-22 14:31:04 -07:00
dax
dca
devfreq PM / devfreq: rockchip-dfi: add support for RK3588 2023-10-19 21:21:16 +09:00
dio
dma dmaengine fixes for v6.6 2023-10-13 08:52:57 -07:00
dma-buf dma-buf: add dma_fence_timestamp helper 2023-10-05 11:05:58 +02:00
dpll dpll: netlink/core: change pin frequency set behavior 2023-10-15 16:08:25 +01:00
edac hardening updates for v6.7-rc1 2023-10-30 19:09:55 -10:00
eisa
extcon
firewire scsi: sd: Introduce manage_shutdown device flag 2023-10-27 10:00:19 +09:00
firmware asm-generic updates for v6.7 2023-11-01 15:28:33 -10:00
fpga fpga: Fix memory leak for fpga_region_test_class_find() 2023-10-24 19:32:39 +02:00
fsi
gnss
gpio gpio updates for v6.7-rc1 2023-10-31 17:21:54 -10:00
gpu asm-generic updates for v6.7 2023-11-01 15:28:33 -10:00
greybus
hid drm for 6.7-rc1 2023-11-01 06:28:35 -10:00
hsi
hte hte: Changes for v6.7-rc1 2023-10-31 18:32:51 -10:00
hv
hwmon hwmon updates for v6.7-rc1 2023-10-31 17:44:17 -10:00
hwspinlock
hwtracing coresight: tmc-etr: Disable warnings for allocation failures 2023-09-20 10:46:30 +01:00
i2c gpio updates for v6.7-rc1 2023-10-31 17:21:54 -10:00
i3c i3c: Add support for bus enumeration & notification 2023-10-17 12:45:03 +02:00
idle intel_idle: Add ibrs_off module parameter to force-disable IBRS 2023-10-07 11:33:28 +02:00
iio iio: afe: rescale: Accept only offset channels 2023-10-17 20:25:32 +01:00
infiniband Networking changes for 6.7. 2023-10-31 05:10:11 -10:00
input asm-generic updates for v6.7 2023-11-01 15:28:33 -10:00
interconnect
iommu iommufd for 6.7 2023-11-01 16:44:56 -10:00
ipack
irqchip arm64 updates for 6.7: 2023-11-01 09:34:55 -10:00
isdn hardening updates for v6.7-rc1 2023-10-30 19:09:55 -10:00
leds leds: Drop BUG_ON check for LED_COLOR_ID_MULTI 2023-09-19 15:16:23 +01:00
macintosh
mailbox ACPI updates for 6.7-rc1 2023-10-31 15:33:26 -10:00
mcb mcb: remove is_added flag from mcb_device struct 2023-10-05 09:50:14 +02:00
md - Update DM core to directly call the map function for both the linear 2023-11-01 12:55:54 -10:00
media asm-generic updates for v6.7 2023-11-01 15:28:33 -10:00
memory Memory controller drivers for v6.7 2023-10-16 23:00:46 +02:00
memstick memstick: jmb38x_ms: Annotate struct jmb38x_ms with __counted_by 2023-09-27 12:13:18 +02:00
message
mfd Couple of small fixes, including: 2023-10-05 11:03:20 -07:00
misc asm-generic updates for v6.7 2023-11-01 15:28:33 -10:00
mmc mmc: Merge branch fixes into next 2023-10-27 12:00:35 +02:00
most
mtd gpio updates for v6.7-rc1 2023-10-31 17:21:54 -10:00
mux
net Follow up to networking PR for 6.7 2023-11-01 16:33:20 -10:00
nfc
ntb
nubus
nvdimm
nvme for-6.7/block-2023-10-30 2023-11-01 12:30:07 -10:00
nvmem nvmem: imx: correct nregs for i.MX6ULL 2023-10-16 21:00:08 +02:00
of Devicetree updates for 6.7: 2023-10-31 18:50:13 -10:00
opp OPP: No need to defer probe from _opp_attach_genpd() 2023-10-17 11:11:28 +05:30
parisc parisc/power: Trivial whitespace cleanups and license update 2023-10-30 14:54:40 +01:00
parport
pci asm-generic updates for v6.7 2023-11-01 15:28:33 -10:00
pcmcia
peci
perf arm64 updates for 6.7: 2023-11-01 09:34:55 -10:00
phy phy fixes for 6.6 2023-10-22 07:11:10 -10:00
pinctrl gpio updates for v6.7-rc1 2023-10-31 17:21:54 -10:00
platform platform-drivers-x86 for v6.7-1 2023-10-31 17:53:00 -10:00
pmdomain SoC driver updates for 6.7 2023-11-01 14:46:51 -10:00
pnp PNP: replace deprecated strncpy() with memcpy() 2023-10-20 19:50:40 +02:00
power power: reset: vexpress: Use device_get_match_data() 2023-10-21 00:57:55 +02:00
powercap powercap: intel_rapl: Downgrade BIOS locked limits pr_warn() to pr_debug() 2023-10-24 22:07:07 +02:00
pps
ps3
ptp ptp: prevent string overflow 2023-10-19 15:51:52 -07:00
pwm
rapidio
ras
regulator regulator: Merge up pending fix 2023-10-30 13:14:27 +00:00
remoteproc
reset reset: Annotate struct reset_control_array with __counted_by 2023-10-24 14:10:04 -07:00
rpmsg
rtc
s390 Networking changes for 6.7. 2023-10-31 05:10:11 -10:00
sbus
scsi ATA changes for 6.7-rc1 2023-11-01 12:50:12 -10:00
sh
siox
slimbus
soc SoC driver updates for 6.7 2023-11-01 14:46:51 -10:00
soundwire soundwire: bus: Make IRQ handling conditionally built 2023-09-21 11:31:33 +02:00
spi spi: Merge up fix 2023-10-30 13:20:58 +00:00
spmi
ssb ssb: relax SSB_EMBEDDED dependencies 2023-10-19 10:26:26 +03:00
staging drm for 6.7-rc1 2023-11-01 06:28:35 -10:00
target scsi: target: Convert to bdev_open_by_path() 2023-10-28 13:29:19 +02:00
tc
tee ARM: SoC fixes for 6.6, part 2 2023-10-12 11:52:23 -07:00
thermal Thermal control updates for 6.7-rc1 2023-10-31 15:28:37 -10:00
thunderbolt thunderbolt: Fix for v6.6-rc7 2023-10-17 19:25:42 +02:00
tty asm-generic updates for v6.7 2023-11-01 15:28:33 -10:00
ufs scsi: ufs: core: Correct clear TM error log 2023-10-09 21:33:30 -04:00
uio
usb drm for 6.7-rc1 2023-11-01 06:28:35 -10:00
vdpa vdpa/mlx5: Fix firmware error on creation of 1k VQs 2023-10-18 11:29:41 -04:00
vfio iommufd for 6.7 2023-11-01 16:44:56 -10:00
vhost Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-10-26 13:46:28 -07:00
video asm-generic updates for v6.7 2023-11-01 15:28:33 -10:00
virt hardening updates for v6.7-rc1 2023-10-30 19:09:55 -10:00
virtio virtio_pci: fix the common cfg map size 2023-10-18 11:30:12 -04:00
vlynq
w1 w1: ds2482: Switch back to use struct i2c_driver's .probe() 2023-09-13 10:48:42 +02:00
watchdog
xen xen: branch for v6.7-rc1 2023-11-01 10:46:48 -10:00
zorro
Kconfig - Move Kconfig files into the pmdomain subsystem 2023-11-01 13:09:46 -10:00
Makefile dpll: core: Add DPLL framework base functions 2023-09-17 11:50:20 +01:00