WSL2-Linux-Kernel/drivers
Linus Torvalds 27d2dcb1b9 IOMMU Fixes for Linux v5.7-rc4
Including:
 
 	- The race condition fixes for the AMD IOMMU driver. This are 5
 	  patches fixing two race conditions around
 	  increase_address_space(). The first race condition was around
 	  the non-atomic update of the domain page-table root pointer
 	  and the variable containing the page-table depth (called
 	  mode). This is fixed now be merging page-table root and mode
 	  into one 64-bit field which is read/written atomically.
 
 	  The second race condition was around updating the page-table
 	  root pointer and making it public before the hardware caches
 	  were flushed. This could cause addresses to be mapped and
 	  returned to drivers which are not reachable by IOMMU hardware
 	  yet, causing IO page-faults. This is fixed too by adding the
 	  necessary flushes before a new page-table root is published.
 
 	  Related to the race condition fixes these patches also add a
 	  missing domain_flush_complete() barrier to update_domain() and
 	  a fix to bail out of the loop which tries to increase the
 	  address space when the call to increase_address_space() fails.
 
 	  Qian was able to trigger the race conditions under high load
 	  and memory pressure within a few days of testing. He confirmed
 	  that he has seen no issues anymore with the fixes included
 	  here.
 
 	- Fix for a list-handling bug in the VirtIO IOMMU driver.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEr9jSbILcajRFYWYyK/BELZcBGuMFAl638MYACgkQK/BELZcB
 GuOQxQ/5AYorgKuGkqVbob69YWZuSAEG08dlzDw4C8CDnPKXEPd0L4gJGLP7BpEh
 bPJo9QJtXW7zG6Hhk8sWk9/iONsThngoudaQrodJwaQRdCDGaDZlvBaezG2Vx4xb
 A2OrcM9lvQSODdgyf3x0O1cX7vkQ4J6nJR1Z8Fw4EufjH6TS9DR0tf8ZWHtIpHa6
 Josu3M+qhUXPsn7KK5o7GtNib7sI4whLldYaASGsuaFGzod3CgA0cgmL2HfD+DWP
 k1EIEZTCaOq0BamtpyXbSA6o0AxwKERr/KONi1pL0xN4r0yCjsxEQ6+Rw4caqvgA
 zrfv3kk4a+wFAxOe0hUEtKk8Oy587LPJvIX4FnjG8hRnBrEaQC9vy4eMj05utPid
 PpsNQ35P+SyrxTlIp7ybIVhUvKbxih8SSpRsjx16vX+r/h4SRvWHzjpHVq/4+gIT
 TeZGw1g7xCIyjzn5HqLs/nMG/Ly9QHQaWia8slJJgbzI/deUXAVTy6PmMrqHB+zv
 e0PelKsq5lEQBrFX+r/Sg5hBViKaMykXKbXXg3KIolzlutJc2Rrzh4EEKpP/ug2/
 upTXf+NvMobNxb3QLqn3IJApIirEGYQqI7lwjiUwTC5xb3EfYLUuRa5i4fbOAZIv
 krsVM4sNX1S32TblTMzDDOEEggPG1wPhVF5B+1emOolYHek3ShI=
 =gqwr
 -----END PGP SIGNATURE-----

Merge tag 'iommu-fixes-v5.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu

Pull iommu fixes from Joerg Roedel:

 - Race condition fixes for the AMD IOMMU driver.

   These are five patches fixing two race conditions around
   increase_address_space(). The first race condition was around the
   non-atomic update of the domain page-table root pointer and the
   variable containing the page-table depth (called mode). This is fixed
   now be merging page-table root and mode into one 64-bit field which
   is read/written atomically.

   The second race condition was around updating the page-table root
   pointer and making it public before the hardware caches were flushed.
   This could cause addresses to be mapped and returned to drivers which
   are not reachable by IOMMU hardware yet, causing IO page-faults. This
   is fixed too by adding the necessary flushes before a new page-table
   root is published.

   Related to the race condition fixes these patches also add a missing
   domain_flush_complete() barrier to update_domain() and a fix to bail
   out of the loop which tries to increase the address space when the
   call to increase_address_space() fails.

   Qian was able to trigger the race conditions under high load and
   memory pressure within a few days of testing. He confirmed that he
   has seen no issues anymore with the fixes included here.

 - Fix for a list-handling bug in the VirtIO IOMMU driver.

* tag 'iommu-fixes-v5.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
  iommu/virtio: Reverse arguments to list_add
  iommu/amd: Do not flush Device Table in iommu_map_page()
  iommu/amd: Update Device Table in increase_address_space()
  iommu/amd: Call domain_flush_complete() in update_domain()
  iommu/amd: Do not loop forever when trying to increase address space
  iommu/amd: Fix race in increase_address_space()/fetch_pte()
2020-05-10 11:26:23 -07:00
..
accessibility
acpi PM: ACPI: Output correct message on target power state 2020-04-27 10:33:40 +02:00
amba amba: Initialize dma_parms for amba devices 2020-04-28 17:44:34 +02:00
android
ata ata: sata_inic162x fix a spelling issue 2020-04-23 09:59:30 -06:00
atm
auxdisplay
base driver core: Ensure wait_for_device_probe() waits until the deferred_probe_timeout fires 2020-04-28 17:57:13 +02:00
bcma
block virtio-blk: handle block_device_operations callbacks after hot unplug 2020-05-02 10:28:13 -04:00
bluetooth
bus bus: mhi: core: Fix channel device name conflict 2020-05-05 16:59:54 +02:00
cdrom
char virtio: fixes, cleanups 2020-04-21 12:27:18 -07:00
clk
clocksource
connector
counter
cpufreq cpufreq: intel_pstate: Only mention the BIOS disabling turbo mode once 2020-04-27 10:30:11 +02:00
cpuidle
crypto Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-05-06 20:53:22 -07:00
dax
dca
devfreq
dio
dma dmaengine: dmatest: Fix process hang when reading 'wait' parameter 2020-04-28 21:46:35 +05:30
dma-buf dma-buf: fix documentation build warnings 2020-04-30 19:47:39 +05:30
edac
eisa
extcon
firewire
firmware gcc-10: mark more functions __init to avoid section mismatch warnings 2020-05-09 17:50:03 -07:00
fpga
fsi
gnss
gpio
gpu A few minor fixes for an ordering issue in virtio, an (old) gcc warning 2020-05-08 15:04:25 +10:00
greybus
hid HID: quirks: Add HID_QUIRK_NO_INIT_REPORTS quirk for Dell K12A keyboard-dock 2020-05-04 11:24:58 +02:00
hsi
hv hyperv-fixes for 5.7-rc4 2020-04-27 13:28:27 -07:00
hwmon
hwspinlock
hwtracing
i2c i2c: aspeed: Avoid i2c interrupt status clear race condition. 2020-04-30 16:12:33 +02:00
i3c
ide
idle
iio First set of IIO fixes for the 5.7 cycle. 2020-04-20 14:07:00 +02:00
infiniband RDMA/core: Fix race between destroy and release FD object 2020-04-24 15:40:41 -03:00
input
interconnect interconnect: qcom: Move the static keyword to the front of declaration 2020-04-29 13:11:44 +02:00
iommu iommu/virtio: Reverse arguments to list_add 2020-05-08 17:31:18 +02:00
ipack
irqchip
isdn
leds
lightnvm
macintosh
mailbox
mcb
md - Document DM integrity allow_discard feature that was added during 2020-04-30 16:45:08 -07:00
media
memory
memstick
message
mfd
misc mei: me: disable mei interface on LBG servers. 2020-05-05 16:56:41 +02:00
mmc mmc: sdhci-pci: Fix eMMC driver strength for BYT-based controllers 2020-04-22 17:57:17 +02:00
most most: core: use function subsys_initcall() 2020-04-28 15:04:09 +02:00
mtd
mux
net net: flow_offload: skip hw stats check for FLOW_ACTION_HW_STATS_DONT_CARE 2020-05-06 20:13:10 -07:00
nfc
ntb
nubus
nvdimm
nvme nvme: fix possible hang when ns scanning fails during error recovery 2020-05-09 16:07:58 -06:00
nvmem
of
opp
oprofile
parisc
parport
pci
pcmcia
perf
phy phy: qualcomm: usb-hs-28nm: Prepare clocks in init 2020-04-30 12:10:49 +05:30
pinctrl
platform chrome-platform fixes for v5.7-rc5 2020-05-06 16:40:14 -07:00
pnp
power
powercap
pps
ps3
ptp ptp: Remove unneeded conversion to bool 2020-04-21 15:45:32 -07:00
pwm
rapidio
ras
regulator regulator: Revert "Use driver_deferred_probe_timeout for regulator_init_complete_work" 2020-04-29 19:57:45 +02:00
remoteproc remoteproc fixes for v5.7 2020-04-23 09:28:15 -07:00
reset
rpmsg
rtc
s390 s390/qeth: fix cancelling of TX timer on dev_close() 2020-05-04 11:21:40 -07:00
sbus
scsi scsi: ibmvscsi: Fix WARN_ON during event pool release 2020-04-28 22:59:55 -04:00
sfi
sh
siox
slimbus
soc arm64: soc: ZynqMP SoC fixes for v5.7 2020-04-21 14:21:20 +02:00
soundwire
spi
spmi
ssb
staging staging: gasket: Check the return value of gasket_get_bar_index() 2020-05-05 12:36:05 +02:00
target scsi: target/iblock: fix WRITE SAME zeroing 2020-04-22 00:02:13 -04:00
tc
tee
thermal
thunderbolt thunderbolt: Check return value of tb_sw_read() in usb4_switch_op() 2020-04-28 19:00:59 +02:00
tty TTY/Serial fixes for 5.7-rc5 2020-05-08 08:56:16 -07:00
uio
usb usb: chipidea: msm: Ensure proper controller reset using role switch API 2020-05-07 08:46:35 +02:00
vdpa vhost: disable for OABI 2020-04-20 10:19:22 -04:00
vfio vfio/type1: Fix VA->PA translation for PFNMAP VMAs in vaddr_get_pfn() 2020-04-23 12:10:01 -06:00
vhost Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-05-06 20:53:22 -07:00
video
virt
virtio
visorbus
vlynq
vme
w1
watchdog
xen
zorro
Kconfig
Makefile