Skip to content

Commit fc8299f

Browse files
committed
Merge tag 'iommu-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull iommu fixes from Will Deacon: "Two straightforward vt-d fixes: - Fix boot when intel iommu initialisation fails under TXT (tboot) - Fix intel iommu compilation error when DMAR is enabled without ATS and temporarily update IOMMU MAINTAINERs entry" * tag 'iommu-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: MAINTAINERS: Temporarily add myself to the IOMMU entry iommu/vt-d: Fix compile error with CONFIG_PCI_ATS not set iommu/vt-d: Avoid panic if iommu init fails in tboot system
2 parents 5de1867 + 91c2c28 commit fc8299f

5 files changed

Lines changed: 7 additions & 7 deletions

File tree

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9162,6 +9162,7 @@ F: include/linux/iomap.h
91629162

91639163
IOMMU DRIVERS
91649164
M: Joerg Roedel <joro@8bytes.org>
9165+
M: Will Deacon <will@kernel.org>
91659166
L: iommu@lists.linux-foundation.org
91669167
S: Maintained
91679168
T: git git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git

arch/x86/kernel/tboot.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -514,9 +514,6 @@ int tboot_force_iommu(void)
514514
if (!tboot_enabled())
515515
return 0;
516516

517-
if (intel_iommu_tboot_noforce)
518-
return 1;
519-
520517
if (no_iommu || swiotlb || dmar_disabled)
521518
pr_warn("Forcing Intel-IOMMU to enabled\n");
522519

drivers/iommu/intel/dmar.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,9 @@ static void dmar_pci_bus_del_dev(struct dmar_pci_notify_info *info)
335335

336336
static inline void vf_inherit_msi_domain(struct pci_dev *pdev)
337337
{
338-
dev_set_msi_domain(&pdev->dev, dev_get_msi_domain(&pdev->physfn->dev));
338+
struct pci_dev *physfn = pci_physfn(pdev);
339+
340+
dev_set_msi_domain(&pdev->dev, dev_get_msi_domain(&physfn->dev));
339341
}
340342

341343
static int dmar_pci_bus_notifier(struct notifier_block *nb,

drivers/iommu/intel/iommu.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ static int rwbf_quirk;
179179
* (used when kernel is launched w/ TXT)
180180
*/
181181
static int force_on = 0;
182-
int intel_iommu_tboot_noforce;
182+
static int intel_iommu_tboot_noforce;
183183
static int no_platform_optin;
184184

185185
#define ROOT_ENTRY_NR (VTD_PAGE_SIZE/sizeof(struct root_entry))
@@ -4884,7 +4884,8 @@ int __init intel_iommu_init(void)
48844884
* Intel IOMMU is required for a TXT/tboot launch or platform
48854885
* opt in, so enforce that.
48864886
*/
4887-
force_on = tboot_force_iommu() || platform_optin_force_iommu();
4887+
force_on = (!intel_iommu_tboot_noforce && tboot_force_iommu()) ||
4888+
platform_optin_force_iommu();
48884889

48894890
if (iommu_init_mempool()) {
48904891
if (force_on)

include/linux/intel-iommu.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,6 @@ extern int iommu_calculate_agaw(struct intel_iommu *iommu);
798798
extern int iommu_calculate_max_sagaw(struct intel_iommu *iommu);
799799
extern int dmar_disabled;
800800
extern int intel_iommu_enabled;
801-
extern int intel_iommu_tboot_noforce;
802801
extern int intel_iommu_gfx_mapped;
803802
#else
804803
static inline int iommu_calculate_agaw(struct intel_iommu *iommu)

0 commit comments

Comments
 (0)