Re: [PATCH v9 07/10] iommu/vt-d: enable kdump support in iommu module

Joerg Roedel
2015-04-02T11:06:16Z

On Thu, Mar 19, 2015 at 01:36:25PM +0800, Li, Zhen-Hua wrote:
> +#ifdef CONFIG_CRASH_DUMP
> + if (is_kdump_kernel())
> + __iommu_update_old_root_entry(iommu, bus);
> +#endif

All the is_kdump_kernel checks in this patch (and maybe in other patches
too) should really be checks whether translation on the IOMMU was
enabled or not when the kernel booted. You might also boot from a kernel
that had translation disabled into a kdump kernel that wants to enable
it. In this case these checks would break.

Speaking of booting from kernels with translation disabled, there is a
valid use of is_kdump_enabled(), to omit iommu initialization in the
kdump kernel when translation was disabled before. But the other checks
should depend on the state the iommu had when booting the kdump kernel.

Joerg