>>> On 06.05.16 at 10:54, <quan...@intel.com> wrote: > --- a/xen/drivers/passthrough/iommu.c > +++ b/xen/drivers/passthrough/iommu.c > @@ -240,21 +240,47 @@ int iommu_map_page(struct domain *d, unsigned long gfn, > unsigned long mfn, > unsigned int flags) > { > const struct domain_iommu *hd = dom_iommu(d); > + int rc; > > if ( !iommu_enabled || !hd->platform_ops ) > return 0; > > - return hd->platform_ops->map_page(d, gfn, mfn, flags); > + rc = hd->platform_ops->map_page(d, gfn, mfn, flags); > + > + if ( unlikely(rc) ) > + { > + printk(XENLOG_ERR > + "iommu_map_page: IOMMU mapping gfn %#lx mfn %#lx failed for > dom%d.", > + gfn, mfn, d->domain_id); > + > + if ( !is_hardware_domain(d) ) > + domain_crash(d); > + }
This still may spam the console in at least the case of Dom0. For DomU I'd really expect you to state in the commit message why no spamming can occur (of course assuming it really can't, which I'm not convinced of). Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel