1
0
Fork 0
alistair23-linux/drivers
Suravee Suthikulpanit e52d58d54a iommu/amd: Use cmpxchg_double() when updating 128-bit IRTE
When using 128-bit interrupt-remapping table entry (IRTE) (a.k.a GA mode),
current driver disables interrupt remapping when it updates the IRTE
so that the upper and lower 64-bit values can be updated safely.

However, this creates a small window, where the interrupt could
arrive and result in IO_PAGE_FAULT (for interrupt) as shown below.

  IOMMU Driver            Device IRQ
  ============            ===========
  irte.RemapEn=0
       ...
   change IRTE            IRQ from device ==> IO_PAGE_FAULT !!
       ...
  irte.RemapEn=1

This scenario has been observed when changing irq affinity on a system
running I/O-intensive workload, in which the destination APIC ID
in the IRTE is updated.

Instead, use cmpxchg_double() to update the 128-bit IRTE at once without
disabling the interrupt remapping. However, this means several features,
which require GA (128-bit IRTE) support will also be affected if cmpxchg16b
is not supported (which is unprecedented for AMD processors w/ IOMMU).

Fixes: 880ac60e25 ("iommu/amd: Introduce interrupt remapping ops structure")
Reported-by: Sean Osborne <sean.m.osborne@oracle.com>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Tested-by: Erik Rockstrom <erik.rockstrom@oracle.com>
Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
Link: https://lore.kernel.org/r/20200903093822.52012-3-suravee.suthikulpanit@amd.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2020-09-04 11:53:18 +02:00
..
accessibility Char/Misc driver fixes for 5.9-rc3 2020-08-26 10:50:50 -07:00
acpi Merge branch 'acpi-mm' 2020-08-28 21:17:56 +02:00
amba
android drivers: android: Fix the SPDX comment style 2020-07-29 17:05:44 +02:00
ata treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
atm treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
auxdisplay treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
base Device properties framework fix for 5.9-rc3 2020-08-28 13:23:31 -07:00
bcma bcma: gpio: Use irqchip template 2020-08-02 18:26:51 +03:00
block block-5.9-2020-08-28 2020-08-28 16:38:29 -07:00
bluetooth Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next 2020-07-31 15:11:52 -07:00
bus treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
cdrom
char Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2020-08-30 15:53:44 -07:00
clk More ACPI updates for 5.9-rc1 2020-08-15 08:18:22 -07:00
clocksource treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
connector
counter
cpufreq Power management fixes for 5.9-rc3 2020-08-28 13:12:09 -07:00
cpuidle cpuidle: Make CPUIDLE_FLAG_TLB_FLUSHED generic 2020-08-26 12:41:53 +02:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2020-08-30 15:53:44 -07:00
dax dax: do not print error message for non-persistent memory block device 2020-08-20 11:43:18 -06:00
dca
devfreq PM / devfreq: Fix the wrong end with semicolon 2020-07-30 17:22:58 +09:00
dio
dma fsldma: fix very broken 32-bit ppc ioread64 functionality 2020-08-29 13:50:56 -07:00
dma-buf A set of locking fixes and updates: 2020-08-10 19:07:44 -07:00
edac A fix to properly clear ghes_edac driver state on driver remove so that 2020-08-30 10:47:23 -07:00
eisa
extcon
firewire treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
firmware A set of fixes for interrupt chip drivers: 2020-08-30 11:56:54 -07:00
fpga
fsi
gnss
gpio treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
gpu drm fixes for 5.9-rc3 2020-08-28 09:46:48 -07:00
greybus greybus: Use fallthrough pseudo-keyword 2020-07-29 16:58:08 +02:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid 2020-08-25 11:13:29 -07:00
hsi treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
hv hyperv-fixes for 5.9-rc3 2020-08-26 10:44:15 -07:00
hwmon hwmon fixes for v5.9-rc3 2020-08-29 12:37:00 -07:00
hwspinlock
hwtracing treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
i2c Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2020-08-29 13:13:44 -07:00
i3c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
ide treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
idle cpuidle: Make CPUIDLE_FLAG_TLB_FLUSHED generic 2020-08-26 12:41:53 +02:00
iio iio: dpot-dac: fix code comment in dpot_dac_read_raw() 2020-08-26 14:02:24 -05:00
infiniband treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
input treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
interconnect Char/Misc driver patches for 5.9-rc1 2020-08-05 11:43:47 -07:00
iommu iommu/amd: Use cmpxchg_double() when updating 128-bit IRTE 2020-09-04 11:53:18 +02:00
ipack
irqchip A set of fixes for interrupt chip drivers: 2020-08-30 11:56:54 -07:00
isdn treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
leds LEDs changes for 5.9-rc1. 2020-08-05 19:24:27 -07:00
lightnvm treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
macintosh treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
mailbox iomap: constify ioreadX() iomem argument (as in generic implementation) 2020-08-14 19:56:57 -07:00
mcb
md block-5.9-2020-08-28 2020-08-28 16:38:29 -07:00
media media: dib0700: Fix identation issue in dib8096_set_param_override() 2020-08-27 15:36:28 -05:00
memory treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
memstick treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
message treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
mfd - Bug Fixes 2020-08-28 10:15:33 -07:00
misc Char/Misc driver fixes for 5.9-rc3 2020-08-26 10:50:50 -07:00
mmc treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
most drivers: most: add USB adapter driver 2020-07-31 14:38:12 +02:00
mtd This pull request contains changes for JFFS2, UBI and UBIFS 2020-08-10 18:20:04 -07:00
mux treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
net treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
nfc treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
ntb treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
nubus
nvdimm libnvdimm: KASAN: global-out-of-bounds Read in internal_create_group 2020-08-17 14:47:38 -06:00
nvme io_uring-5.9-2020-08-23 2020-08-24 11:53:15 -07:00
nvmem nvmem: qcom-spmi-sdam: Enable multiple devices 2020-07-29 17:12:09 +02:00
of of: address: Work around missing device_type property in pcie nodes 2020-08-19 16:30:57 -06:00
opp opp: Enable resources again if they were disabled earlier 2020-08-20 11:30:22 +05:30
oprofile
parisc Merge branch 'parisc-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux 2020-08-12 12:41:15 -07:00
parport treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
pci treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
pcmcia treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
perf treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
phy treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
pinctrl This is the bulk of the pin control changes for the v5.9 2020-08-09 12:52:28 -07:00
platform treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
pnp
power treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
powercap This tree adds the sched_set_fifo*() encapsulation APIs to remove 2020-08-06 11:55:43 -07:00
pps
ps3 treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
ptp ptp: ptp_clockmatrix: use i2c_master_send for i2c write 2020-08-19 16:23:22 -07:00
pwm pwm: Changes for v5.9-rc1 2020-08-14 16:00:09 -07:00
rapidio treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
ras
regulator treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
remoteproc treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
reset treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
rpmsg treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
rtc treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
s390 treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
sbus
scsi treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
sfi
sh iomap: constify ioreadX() iomem argument (as in generic implementation) 2020-08-14 19:56:57 -07:00
siox
slimbus
soc treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
soundwire
spi treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
spmi
ssb treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
staging treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
target treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
tc
tee
thermal treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
thunderbolt treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
tty TTY/Serial fixes for 5.9-rc3 2020-08-26 10:58:20 -07:00
uio
usb USB fixes for 5.9-rc3 - take 2 2020-08-30 10:51:03 -07:00
vdpa vdpa/mlx5: Avoid warnings about shifts on 32-bit platforms 2020-08-26 08:13:59 -04:00
vfio treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
vhost vhost-iotlb: fix vhost_iotlb_itree_next() documentation 2020-08-26 08:13:59 -04:00
video powerpc fixes for 5.9 #4 2020-08-30 10:56:12 -07:00
virt
virtio virtio: pci: constify ioreadX() iomem argument (as in generic implementation) 2020-08-14 19:56:57 -07:00
visorbus
vlynq
vme
w1
watchdog treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
xen xen: branch for v5.9-rc3 2020-08-29 12:44:30 -07:00
zorro
Kconfig
Makefile