linux/drivers/iommu
Thomas Gleixner 3f4cb7c064 iommu/amd: Fix irq remapping detection logic
Commit 7fa1c842ca "iommu/irq_remapping: Change variable
disable_irq_remap to be static" returns unconditionally success from
the irq remapping prepare callback if the iommu can be initialized.

The change assumed that iommu_go_to_state(IOMMU_ACPI_FINISHED) returns
a failure if irq remapping is not enabled, but thats not the case.

The function returns success when the iommu is initialized to the
point which is required for remapping to work. The actual state of the
irq remapping feature is reflected in the status variable
amd_iommu_irq_remap, which is not considered in the return value.

The fix is simple: If the iommu_go_to_state() returns success,
evaluate the remapping state amd_iommu_irq_remap and reflect it in the
return value.

Fixes: 7fa1c842ca iommu/irq_remapping: Change variable disable_irq_remap to be static
Reported-and-tested-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Joerg Roedel <joro@8bytes.org>
2015-01-23 14:32:46 +01:00
..
amd_iommu_init.c iommu/amd: Fix irq remapping detection logic 2015-01-23 14:32:46 +01:00
amd_iommu_proto.h iommu/irq_remapping: Kill function irq_remapping_supported() and related code 2015-01-15 11:24:23 +01:00
amd_iommu_types.h iommu/amd: Move struct iommu_dev_data to amd_iommu.c 2014-08-26 11:37:37 +02:00
amd_iommu_v2.c Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2014-12-15 15:52:01 -08:00
amd_iommu.c iommu/irq_remapping: Kill function irq_remapping_supported() and related code 2015-01-15 11:24:23 +01:00
arm-smmu.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
dmar.c iommu/vt-d: Search for ACPI _DSM method for DMAR hotplug 2014-11-18 11:18:36 +01:00
exynos-iommu.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
fsl_pamu_domain.c iommu/fsl: Convert to iommu_capable() API function 2014-09-25 15:47:37 +02:00
fsl_pamu_domain.h iommu/fsl: Freescale PAMU driver and iommu implementation. 2013-08-14 11:38:34 +02:00
fsl_pamu.c iommu: drop owner assignment from platform_drivers 2014-10-20 16:20:42 +02:00
fsl_pamu.h iommu/fsl: Freescale PAMU driver and iommu implementation. 2013-08-14 11:38:34 +02:00
intel_irq_remapping.c iommu/irq_remapping: Change variable disable_irq_remap to be static 2015-01-15 11:24:24 +01:00
intel-iommu.c iommu/vt-d: Remove dead code in device_notifier 2015-01-05 12:23:38 +01:00
iommu-sysfs.c iommu: Fix compile error in iommu-sysfs.c 2014-07-07 12:01:21 +02:00
iommu-traces.c iommu: Add iommu_error class event to iommu trace 2013-09-25 11:07:04 +02:00
iommu.c ARM: SoC/iommu configuration for 3.19 2014-12-16 14:53:01 -08:00
iova.c iommu/vt-d: Update IOMMU state when memory hotplug happens 2014-03-04 17:51:06 +01:00
ipmmu-vmsa.c iommu/ipmmu-vmsa: Change IOMMU_EXEC to IOMMU_NOEXEC 2015-01-05 12:23:37 +01:00
irq_remapping.c iommu/irq_remapping: Normailize the way to detect whether IR is enabled 2015-01-15 11:24:24 +01:00
irq_remapping.h iommu/irq_remapping: Change variable disable_irq_remap to be static 2015-01-15 11:24:24 +01:00
Kconfig ARM: SoC/iommu configuration for 3.19 2014-12-16 14:53:01 -08:00
Makefile Merge branches 'arm/omap', 'arm/msm', 'arm/rockchip', 'arm/renesas', 'arm/smmu', 'x86/vt-d', 'x86/amd' and 'core' into next 2014-12-02 13:07:13 +01:00
msm_iommu_dev.c iommu/msm: Use dev_get_platdata() 2014-11-04 15:03:39 +01:00
msm_iommu_hw-8xxx.h iommu/msm: Move mach includes to iommu directory 2013-08-06 11:18:03 -07:00
msm_iommu.c Merge branches 'arm/omap', 'arm/msm', 'arm/rockchip', 'arm/renesas', 'arm/smmu', 'x86/vt-d', 'x86/amd' and 'core' into next 2014-12-02 13:07:13 +01:00
msm_iommu.h iommu/msm: Move mach includes to iommu directory 2013-08-06 11:18:03 -07:00
of_iommu.c iommu: store DT-probed IOMMU data privately 2014-12-05 14:35:52 +00:00
omap-iommu-debug.c iommu/omap: Switch pagetable debugfs entry to use seq_file 2014-10-23 14:33:48 +02:00
omap-iommu.c Merge branches 'arm/omap', 'arm/msm', 'arm/rockchip', 'arm/renesas', 'arm/smmu', 'x86/vt-d', 'x86/amd' and 'core' into next 2014-12-02 13:07:13 +01:00
omap-iommu.h iommu/omap: Do not export unneeded functions 2014-10-23 14:33:47 +02:00
omap-iopgtable.h iommu/omap: Move to_iommu definition from omap-iopgtable.h 2014-04-16 16:30:15 +02:00
rockchip-iommu.c iommu/rockchip: Drop owner assignment from platform_drivers 2015-01-05 12:40:06 +01:00
shmobile-iommu.c iommu: Add iommu_map_sg() function 2014-11-04 14:53:36 +01:00
shmobile-ipmmu.c iommu: drop owner assignment from platform_drivers 2014-10-20 16:20:42 +02:00
shmobile-ipmmu.h iommu/shmobile: Turn the flush_lock mutex into a spinlock 2014-01-07 15:35:25 +01:00
tegra-gart.c iommu: drop owner assignment from platform_drivers 2014-10-20 16:20:42 +02:00
tegra-smmu.c memory: Add NVIDIA Tegra memory controller support 2014-12-04 16:11:47 +01:00