On Wed, Feb 17, 2016 at 8:22 PM, Konrad Rzeszutek Wilk <konrad.w...@oracle.com> wrote: >> + { >> + *gfn = bfn; >> + return 0; >> + } >> + >> + if ( !iommu_enabled || !hd->platform_ops || >> + !hd->platform_ops->lookup_page ) >> + return -ENOMEM; > > -ENOMEM ? ENXIO ? Or maybe -ENOSYS for the case when hd->platform_ops > is not set nor ->lookup_page?
I think ENOTSUPP, perhaps? ENOMEM means a memory allocation failed (which it hasn't); ENOSYS means this is an invalid system call (which it isn't). ESRCH could be close too, but it seems like that would be more appropriate when you try to lookup a non-existent BFN. -George _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel