[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC PATCH 2/7] iommu: add iommu_lookup_page to lookup guest gfn for a particular IOMMU mapping
On 24/02/16 15:08, George Dunlap wrote: > On Wed, Feb 17, 2016 at 8:22 PM, Konrad Rzeszutek Wilk > <konrad.wilk@xxxxxxxxxx> 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. Xen (fairly) consistently uses ESRCH for "domain not found". I would recommend -ENOTSUPP here. ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |