• Takao Indoh's avatar
    iommu/vt-d: Disable translation if already enabled · 3a93c841
    Takao Indoh authored
    This patch disables translation(dma-remapping) before its initialization
    if it is already enabled.
    
    This is needed for kexec/kdump boot. If dma-remapping is enabled in the
    first kernel, it need to be disabled before initializing its page table
    during second kernel boot. Wei Hu also reported that this is needed
    when second kernel boots with intel_iommu=off.
    
    Basically iommu->gcmd is used to know whether translation is enabled or
    disabled, but it is always zero at boot time even when translation is
    enabled since iommu->gcmd is initialized without considering such a
    case. Therefor this patch synchronizes iommu->gcmd value with global
    command register when iommu structure is allocated.
    Signed-off-by: default avatarTakao Indoh <indou.takao@jp.fujitsu.com>
    Signed-off-by: default avatarJoerg Roedel <joro@8bytes.org>
    3a93c841
dmar.c 32.4 KB