|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] VT-d: make flush-all actually flush all
VT-d: make flush-all actually flush all
Passing gfn=0 and page_count=0 actually avoids the
iommu_flush_iotlb_dsi() and results in page-specific invalidation
instead.
Reported-by: "åæ" <zhangzhi2014@xxxxxxx>
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -583,7 +583,7 @@ static void __intel_iommu_iotlb_flush(st
if ( iommu_domid == -1 )
continue;
- if ( page_count > 1 || gfn == -1 )
+ if ( page_count != 1 || gfn == INVALID_GFN )
{
if ( iommu_flush_iotlb_dsi(iommu, iommu_domid,
0, flush_dev_iotlb) )
@@ -592,7 +592,7 @@ static void __intel_iommu_iotlb_flush(st
else
{
if ( iommu_flush_iotlb_psi(iommu, iommu_domid,
- (paddr_t)gfn << PAGE_SHIFT_4K, 0,
+ (paddr_t)gfn << PAGE_SHIFT_4K, PAGE_ORDER_4K,
!dma_old_pte_present, flush_dev_iotlb) )
iommu_flush_write_buffer(iommu);
}
@@ -606,7 +606,7 @@ static void intel_iommu_iotlb_flush(stru
static void intel_iommu_iotlb_flush_all(struct domain *d)
{
- __intel_iommu_iotlb_flush(d, 0, 0, 0);
+ __intel_iommu_iotlb_flush(d, INVALID_GFN, 0, 0);
}
/* clear one page's page table */
Attachment:
VT-d-flush-all.patch _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |