[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v9 1/3] vt-d: fix the IOMMU flush issue
On June 21, 2016 9:25 PM, Jan Beulich <JBeulich@xxxxxxxx> wrote: > >>> On 17.06.16 at 05:37, <quan.xu@xxxxxxxxx> wrote: > > @@ -546,17 +550,37 @@ static int __must_check iommu_flush_all(void) > > struct acpi_drhd_unit *drhd; > > struct iommu *iommu; > > int flush_dev_iotlb; > > + int rc = 0; > > > > flush_all_cache(); > > for_each_drhd_unit ( drhd ) > > { > > + int context_rc, iotlb_rc; > > + > > iommu = drhd->iommu; > > - iommu_flush_context_global(iommu, 0); > > + context_rc = iommu_flush_context_global(iommu, 0); > > flush_dev_iotlb = find_ats_dev_drhd(iommu) ? 1 : 0; > > - iommu_flush_iotlb_global(iommu, 0, flush_dev_iotlb); > > + iotlb_rc = iommu_flush_iotlb_global(iommu, 0, > > + flush_dev_iotlb); > > + > > + /* > > + * The current logic for returns: > > + * - positive invoke iommu_flush_write_buffer to flush cache. > > + * - zero on success. > > + * - negative on failure. Continue to flush IOMMU IOTLB on a > > + * best effort basis. > > + */ > > + if ( context_rc > 0 || iotlb_rc > 0 ) > > + iommu_flush_write_buffer(iommu); > > + if ( context_rc >= 0 ) > > Wasn't this meant to be just "rc"? (I can't, btw, imagine Kevin's ack to be > rightfully retained with a change like this.) > SORRY, it is 'rc'. It is really my mistake here, but Kevin's ack is right as the previous v8 was: + if ( rc >= 0 ) + rc = iommu_rc; + if ( rc >= 0 ) + rc = iommu_ret; ,, I will send it out again with this fix. Quan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |