Skip to content

Commit 2ccd450

Browse files
committed
Merge tag 'iommu-fixes-v6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu
Pull iommu fixes from Joerg Roedel: - Intel VT-d fixes from Lu Baolu: - Boot kdump kernels with VT-d scalable mode on - Calculate the right page table levels - Fix two recursive locking issues - Fix a lockdep splat issue - AMD IOMMU fixes: - Fix for completion-wait command to use full 64 bits of data - Fix PASID related issue where GPU sound devices failed to initialize - Fix for Virtio-IOMMU to report correct caching behavior, needed for use with VFIO * tag 'iommu-fixes-v6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu: Fix false ownership failure on AMD systems with PASID activated iommu/vt-d: Fix possible recursive locking in intel_iommu_init() iommu/virtio: Fix interaction with VFIO iommu/vt-d: Fix lockdep splat due to klist iteration in atomic context iommu/vt-d: Fix recursive lock issue in iommu_flush_dev_iotlb() iommu/vt-d: Correctly calculate sagaw value of IOMMU iommu/vt-d: Fix kdump kernels boot failure with scalable mode iommu/amd: use full 64-bit value in build_completion_wait()
2 parents 134984d + 2380f1e commit 2ccd450

File tree

8 files changed

+163
-135
lines changed

8 files changed

+163
-135
lines changed

drivers/iommu/amd/iommu.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,8 @@ static void build_completion_wait(struct iommu_cmd *cmd,
939939
memset(cmd, 0, sizeof(*cmd));
940940
cmd->data[0] = lower_32_bits(paddr) | CMD_COMPL_WAIT_STORE_MASK;
941941
cmd->data[1] = upper_32_bits(paddr);
942-
cmd->data[2] = data;
942+
cmd->data[2] = lower_32_bits(data);
943+
cmd->data[3] = upper_32_bits(data);
943944
CMD_SET_TYPE(cmd, CMD_COMPL_WAIT);
944945
}
945946

drivers/iommu/amd/iommu_v2.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,8 @@ int amd_iommu_init_device(struct pci_dev *pdev, int pasids)
777777
if (dev_state->domain == NULL)
778778
goto out_free_states;
779779

780+
/* See iommu_is_default_domain() */
781+
dev_state->domain->type = IOMMU_DOMAIN_IDENTITY;
780782
amd_iommu_domain_direct_map(dev_state->domain);
781783

782784
ret = amd_iommu_domain_enable_v2(dev_state->domain, pasids);

drivers/iommu/intel/dmar.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2349,6 +2349,13 @@ static int dmar_device_hotplug(acpi_handle handle, bool insert)
23492349
if (!dmar_in_use())
23502350
return 0;
23512351

2352+
/*
2353+
* It's unlikely that any I/O board is hot added before the IOMMU
2354+
* subsystem is initialized.
2355+
*/
2356+
if (IS_ENABLED(CONFIG_INTEL_IOMMU) && !intel_iommu_enabled)
2357+
return -EOPNOTSUPP;
2358+
23522359
if (dmar_detect_dsm(handle, DMAR_DSM_FUNC_DRHD)) {
23532360
tmp = handle;
23542361
} else {

0 commit comments

Comments
 (0)