linux/drivers
Jiang Liu 59ce0515cd iommu/vt-d: Update DRHD/RMRR/ATSR device scope caches when PCI hotplug happens
Current Intel DMAR/IOMMU driver assumes that all PCI devices associated
with DMAR/RMRR/ATSR device scope arrays are created at boot time and
won't change at runtime, so it caches pointers of associated PCI device
object. That assumption may be wrong now due to:
1) introduction of PCI host bridge hotplug
2) PCI device hotplug through sysfs interfaces.

Wang Yijing has tried to solve this issue by caching <bus, dev, func>
tupple instead of the PCI device object pointer, but that's still
unreliable because PCI bus number may change in case of hotplug.
Please refer to http://lkml.org/lkml/2013/11/5/64
Message from Yingjing's mail:
after remove and rescan a pci device
[  611.857095] dmar: DRHD: handling fault status reg 2
[  611.857109] dmar: DMAR:[DMA Read] Request device [86:00.3] fault addr ffff7000
[  611.857109] DMAR:[fault reason 02] Present bit in context entry is clear
[  611.857524] dmar: DRHD: handling fault status reg 102
[  611.857534] dmar: DMAR:[DMA Read] Request device [86:00.3] fault addr ffff6000
[  611.857534] DMAR:[fault reason 02] Present bit in context entry is clear
[  611.857936] dmar: DRHD: handling fault status reg 202
[  611.857947] dmar: DMAR:[DMA Read] Request device [86:00.3] fault addr ffff5000
[  611.857947] DMAR:[fault reason 02] Present bit in context entry is clear
[  611.858351] dmar: DRHD: handling fault status reg 302
[  611.858362] dmar: DMAR:[DMA Read] Request device [86:00.3] fault addr ffff4000
[  611.858362] DMAR:[fault reason 02] Present bit in context entry is clear
[  611.860819] IPv6: ADDRCONF(NETDEV_UP): eth3: link is not ready
[  611.860983] dmar: DRHD: handling fault status reg 402
[  611.860995] dmar: INTR-REMAP: Request device [[86:00.3] fault index a4
[  611.860995] INTR-REMAP:[fault reason 34] Present field in the IRTE entry is clear

This patch introduces a new mechanism to update the DRHD/RMRR/ATSR device scope
caches by hooking PCI bus notification.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
2014-03-04 17:51:06 +01:00
..
accessibility
acpi ACPI / processor: Rework processor throttling with work_on_cpu() 2014-02-27 00:21:05 +01:00
amba
ata PCI updates for v3.14: 2014-02-20 12:46:24 -08:00
atm
auxdisplay
base PM / hibernate: Fix restore hang in freeze_processes() 2014-02-26 01:13:15 +01:00
bcma Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-01-30 17:20:32 -08:00
block Merge branch 'for-linus' of git://git.kernel.dk/linux-block 2014-02-14 10:45:18 -08:00
bluetooth
bus drivers: bus: fix CCI driver kcalloc call parameters swap 2014-01-31 15:15:13 -08:00
cdrom
char Char/Misc fixes for 3.14-rc3 2014-02-14 16:13:00 -08:00
clk
clocksource clocksource: Kona: Print warning rather than panic 2014-02-06 16:01:40 +01:00
connector
cpufreq intel_pstate: Change busy calculation to use fixed point math. 2014-02-26 00:56:49 +01:00
cpuidle
crypto crypto/nx/nx-842: Fix handling of vmalloc addresses 2014-02-11 11:24:49 +11:00
dca
devfreq
dio
dma Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma 2014-03-01 21:30:43 -06:00
edac i7300_edac: Fix device reference count 2014-02-25 09:43:13 +01:00
eisa
extcon ASoC: dapm: Add locking to snd_soc_dapm_xxxx_pin functions 2014-02-20 18:40:07 +09:00
firewire
firmware
fmc drivers/fmc/fmc-write-eeprom.c: fix decimal permissions 2014-02-25 15:25:43 -08:00
gpio gpio: tb10x: GPIO_TB10X needs to select GENERIC_IRQ_CHIP 2014-02-05 11:13:59 +01:00
gpu Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux 2014-03-02 15:25:45 -08:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2014-02-18 16:29:46 -08:00
hsi
hv Drivers: hv: vmbus: Don't timeout during the initial connection with host 2014-02-07 08:27:34 -08:00
hwmon hwmon: (max1668) Fix writing the minimum temperature 2014-02-18 15:53:49 -08:00
hwspinlock
i2c i2c: mv64xxx: refactor message start to ensure proper initialization 2014-02-15 15:42:31 +01:00
ide
idle
iio iio:gyro: bug on L3GD20H gyroscope support 2014-02-18 10:24:49 +00:00
infiniband Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2014-02-15 16:18:47 -08:00
input ASoC: dapm: Add locking to snd_soc_dapm_xxxx_pin functions 2014-02-20 18:40:07 +09:00
iommu iommu/vt-d: Update DRHD/RMRR/ATSR device scope caches when PCI hotplug happens 2014-03-04 17:51:06 +01:00
ipack
irqchip irq-metag*: stop set_affinity vectoring to offline cpus 2014-02-25 22:35:06 +00:00
isdn isdn/hisax: hex vs decimal typo in prfeatureind() 2014-02-06 21:18:06 -08:00
leds
lguest
macintosh
mailbox
md dm cache: fix truncation bug when mapping I/O to >2TB fast device 2014-02-28 09:23:02 -05:00
media [media] adv7842: Composite free-run platfrom-data fix 2014-02-04 06:46:10 -02:00
memory
memstick
message drivers/message/i2o/i2o_config.c: fix deadlock in compat_ioctl(I2OGETIOPS) 2014-02-10 16:01:40 -08:00
mfd sound fixes for 3.14-rc4 2014-02-21 09:55:32 -08:00
misc mei: set client's read_cb to NULL when flow control fails 2014-02-18 10:07:36 -08:00
mmc Fix uses of dma_max_pfn() when converting to a limiting address 2014-02-17 23:08:41 +00:00
mtd Just a single fix for the UBI module unload path which makes sure we do not 2014-02-27 10:36:50 -08:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-02-18 15:52:43 -08:00
nfc
ntb
nubus
of Device tree compatible match order bug fix 2014-02-21 14:35:05 -08:00
oprofile
parisc
parport
pci PCI updates for v3.14: 2014-02-20 12:46:24 -08:00
pcmcia
phy phy: let phy_provider_register be the last step in registering PHY 2014-02-18 12:13:16 -08:00
pinctrl pinctrl: tegra: return correct error type 2014-02-06 14:21:19 +01:00
platform
pnp
power Few fixes: 2014-02-14 10:32:28 -08:00
powercap
pps
ps3
ptp
pwm pwm: lp3943: Fix potential memory leak during request 2014-02-26 15:45:12 +01:00
rapidio
regulator Merge remote-tracking branches 'regulator/fix/da9063', 'regulator/fix/max14577' and 'regulator/fix/s5m8767' into regulator-linus 2014-02-23 12:22:18 +09:00
remoteproc
reset
rpmsg
rtc
s390 s390/cio: Fix missing subchannels after CHPID configure on 2014-02-21 08:48:33 +01:00
sbus Sparc: sparc_cpu_model isn't in asm/system.h any more [ver #2] 2014-02-20 13:34:11 -05:00
scsi Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2014-03-01 21:33:09 -06:00
sfi
sh
sn
spi Merge remote-tracking branches 'spi/fix/doc', 'spi/fix/nuc900' and 'spi/fix/rspi' into spi-linus 2014-02-11 12:08:27 +00:00
ssb Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-01-30 17:20:32 -08:00
staging Fourth set of IIO fixes for the 3.14 kernel. 2014-02-28 17:08:03 -08:00
target Target/sbc: Don't use sg as iterator in sbc_verify_read 2014-02-23 16:35:32 -08:00
tc
thermal
tty Revert "tty: Set correct tty name in 'active' sysfs attribute" 2014-02-22 14:31:04 -08:00
uio
usb usb: ehci: fix deadlock when threadirqs option is used 2014-02-26 15:46:42 -08:00
uwb
vfio
vhost Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2014-03-01 21:33:09 -06:00
video video: Kconfig: Allow more broad selection of the imxfb framebuffer driver. 2014-02-14 10:44:52 +02:00
virt
virtio
vlynq
vme VME: Correct read/write alignment algorithm 2014-02-07 08:16:14 -08:00
w1
watchdog watchdog: w83697hf_wdt: return ENODEV if no device was found 2014-02-21 20:36:46 +01:00
xen Bug-fix: 2014-02-12 12:28:05 -08:00
zorro
Kconfig
Makefile