[PATCH v11 07/10] iommu/vt-d: enable kdump support in iommu module
Baoquan He
bhe at redhat.com
Tue May 12 19:10:27 PDT 2015
On 05/11/15 at 05:52pm, Li, Zhen-Hua wrote:
> Modify the operation of the following functions when called during crash dump:
> iommu_context_addr
> free_context_table
> get_domain_for_dev
> init_dmars
> intel_iommu_init
>
> Bill Sumner:
> Original version.
>
> Zhenhua:
> The name of new calling functions.
> Do not disable and re-enable TE in kdump kernel.
> Use the did and gaw from old context entry;
>
> Signed-off-by: Bill Sumner <billsumnerlinux at gmail.com>
> Signed-off-by: Li, Zhen-Hua <zhen-hual at hp.com>
> ---
> drivers/iommu/intel-iommu.c | 95 +++++++++++++++++++++++++++++++++++++++------
> 1 file changed, 83 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
> index 28c3c64..91545bf 100644
> --- a/drivers/iommu/intel-iommu.c
> +++ b/drivers/iommu/intel-iommu.c
> @@ -397,6 +397,7 @@ static int copy_root_entry_table(struct intel_iommu *iommu);
> static int intel_iommu_load_translation_tables(struct intel_iommu *iommu);
>
> static void iommu_check_pre_te_status(struct intel_iommu *iommu);
> +static u8 g_translation_pre_enabled;
Hi Zhenhua,
I haven't checked patch one by one, am going through the code flow.
About g_translation_pre_enabled, I don't think it's necessary to define
it as a global variable. Both its assignment and judgement are in
init_dmars(). In this situation a local variable translation_pre_enabled
in init_dmars() is enough.
You can assign value to it here:
iommu_check_pre_te_status(iommu);
if (iommu->pre_enabled_trans) {
translation_pre_enabled = 1;
...
}
Thanks
Baoquan
More information about the kexec
mailing list