Commit fa3b6dcd authored by Yu Zhao's avatar Yu Zhao Committed by David Woodhouse

VT-d: fix invalid domain id for KVM context flush

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: default avatarYu Zhao <yu.zhao@intel.com>
Acked-by: default avatarWeidong Han <weidong.han@intel.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent aed5d5f4
...@@ -1429,7 +1429,7 @@ static int domain_context_mapping_one(struct dmar_domain *domain, int segment, ...@@ -1429,7 +1429,7 @@ static int domain_context_mapping_one(struct dmar_domain *domain, int segment,
domain_flush_cache(domain, context, sizeof(*context)); domain_flush_cache(domain, context, sizeof(*context));
/* it's a non-present to present mapping */ /* 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, (((u16)bus) << 8) | devfn, DMA_CCMD_MASK_NOBIT,
DMA_CCMD_DEVICE_INVL, 1)) DMA_CCMD_DEVICE_INVL, 1))
iommu_flush_write_buffer(iommu); iommu_flush_write_buffer(iommu);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment