[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1/2] IOMMU/MMU: Adjust top level functions for VT-d Device-TLB flush error.
>>> On 24.03.16 at 15:12, <quan.xu@xxxxxxxxx> wrote: > On March 24, 2016 5:59pm, <JBeulich@xxxxxxxx> wrote: >> >>> On 24.03.16 at 10:02, <quan.xu@xxxxxxxxx> wrote: >> > On March 18, 2016 5:49pm, <JBeulich@xxxxxxxx> wrote: > > >> > 3. For iommu_{,un}map_page(), we'd better fix it as a normal error, >> > as the error is not only from iommu flush, .e.g, '-ENOMEM'. >> > So, we need to {,un}map from the IOMMU, return an error, and roll >> > back the failed operation( .e.g, unmap EPT). >> >> Well, if that possible in a provably correct way, then sure. But be clear - >> when >> the failure occurs while unmapping, unmapping the EPT entry obviously can't >> be >> the solution, > > I hope we discuss about the same point as bellow?: > ept_set_entry() > { > .... > if ( iommu_flags ) > for ( i = 0; i < (1 << order); i++ ) > iommu_map_page(d, gfn + i, mfn_x(mfn) + i, iommu_flags); > else > for ( i = 0; i < (1 << order); i++ ) > iommu_unmap_page(d, gfn + i); > .... > } > > >> you'd need a true roll back. > > Does it refer to as: > If the old entry is present, we need to write back the old entry? Yes, but that's not as simple as it sounds: You also need to take care of the splitting of super pages which may have occurred. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |