VT-d: fix invalid domain id for KVM context flush
authorYu Zhao <yu.zhao@intel.com>
Fri, 8 May 2009 02:33:38 +0000 (10:33 +0800)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Sun, 10 May 2009 14:55:09 +0000 (15:55 +0100)
The domain->id is a sequence number associated with the KVM guest
and should not be used for the context flush. This patch replaces
the domain->id with a proper id value for both bare metal and KVM.

Signed-off-by: Yu Zhao <yu.zhao@intel.com>
Acked-by: Weidong Han <weidong.han@intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/pci/intel-iommu.c

index d3edd6aa82ce579afaa0dcd4f4f3f34d0b39606b..d6f4ee50924cb159573d7786c5fa30784a6d8ca6 100644 (file)
@@ -1429,7 +1429,7 @@ static int domain_context_mapping_one(struct dmar_domain *domain, int segment,
        domain_flush_cache(domain, context, sizeof(*context));
 
        /* it's a non-present to present mapping */
-       if (iommu->flush.flush_context(iommu, domain->id,
+       if (iommu->flush.flush_context(iommu, id,
                (((u16)bus) << 8) | devfn, DMA_CCMD_MASK_NOBIT,
                DMA_CCMD_DEVICE_INVL, 1))
                iommu_flush_write_buffer(iommu);
This page took 0.03636 seconds and 5 git commands to generate.