On Tue, Mar 16, 2021 at 09:16:34PM +0800, Joerg Roedel wrote:
Hi Huang,
On Thu, Mar 11, 2021 at 10:28:07PM +0800, Huang Rui wrote:
diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c index f0adbc48fd17..a08e885403b7 100644 --- a/drivers/iommu/amd/iommu.c +++ b/drivers/iommu/amd/iommu.c @@ -3862,7 +3862,7 @@ static int irq_remapping_select(struct irq_domain *d, struct irq_fwspec *fwspec, else if (x86_fwspec_is_hpet(fwspec)) devid = get_hpet_devid(fwspec->param[0]);
- if (devid < 0)
- if (devid < 0 || !amd_iommu_rlookup_table) return 0;
The problem is deeper than this fix suggests. I prepared other fixes for this particular problem. Please find them here:
Thanks for the comments. Could you please elaborate this?
Do you mean while amd_iommu=off, we won't prepare the IVRS, and even needn't get all ACPI talbes. Because they are never be used and the next state will always goes into IOMMU_CMDLINE_DISABLED, am I right?
Thanks, Ray
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.kernel...
Regards,
Joerg