• Jiang Liu's avatar
    iommu/vt-d: Allocate dynamic domain id for virtual domains only · 44bde614
    Jiang Liu authored
    Check the same domain id is allocated for si_domain on each IOMMU,
    otherwise the IOTLB flush for si_domain will fail.
    
    Now the rules to allocate and manage domain id are:
    1) For normal and static identity domains, domain id is allocated
       when creating domain structure. And this id will be written into
       context entry.
    2) For virtual machine domain, a virtual id is allocated when creating
       domain. And when binding virtual machine domain to an iommu, a real
       domain id is allocated on demand and this domain id will be written
       into context entry. So domain->id for virtual machine domain may be
       different from the domain id written into context entry(used by
       hardware).
    Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
    Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
    44bde614
intel-iommu.c 116 KB