• Sheng Yang's avatar
    intel-iommu: Fix enabling snooping feature by mistake · c5b15255
    Sheng Yang authored
    Two defects work together result in KVM device passthrough randomly can't
    work:
    1. iommu_snooping is not initialized to zero when vm_iommu_init() called.
    So it is possible to get a random value.
    2. One line added by commit 2c2e2c38("IOMMU Identity Mapping Support")
    change the code path, let it bypass domain_update_iommu_cap(), as well as
    missing the increment of domain iommu reference count.
    
    The latter is also likely to cause a leak of domains on repeated VMM 
    assignment and deassignment.
    Signed-off-by: default avatarSheng Yang <sheng@linux.intel.com>
    Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
    c5b15255
intel-iommu.c 88.1 KB