On May 11, 2016 4:46 PM, George Dunlap <george.dun...@eu.citrix.com> wrote: > On Wed, May 11, 2016 at 3:26 AM, Xu, Quan <quan...@intel.com> wrote: > > Agreed. Thanks for your careful checking. > > > > Check it again -- > > 1. then I am no need to check 'rc' as below: > > > > if ( rc == 0 && p2m_is_hostp2m(p2m) && need_iommu(d) && > > need_modify_vtd_table ) > > { > > + if ( !rc ) > > + rc = ret; > > ... > > > > + if ( !rc && unlikely(ret) ) > > + rc = ret; > > } > > Actually, in the case of iommu_map_page(), you can just use rc directly and > not bother using ret at all. (In the case of iommu_unmap_page(), you still > need to use ret and check that rc != 0 to make sure you get the first error.) > > Something like applying the attached patch (not built or nitpicked for style, > just for clarity). >
Got it, thanks. Quan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel