[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [RFC 13/19] xen/iommu: arm: Wire iommu DOMCTL for ARM



>>> On 16.06.14 at 18:18, <julien.grall@xxxxxxxxxx> wrote:
> --- a/xen/arch/x86/domctl.c
> +++ b/xen/arch/x86/domctl.c
> @@ -1320,7 +1320,7 @@ long arch_do_domctl(
>      break;
>  
>      default:
> -        ret = iommu_do_domctl(domctl, d, u_domctl);
> +        ret = -ENOSYS;
>          break;
>      }
>  
> diff --git a/xen/common/domctl.c b/xen/common/domctl.c
> index 5d3ac87..85866b7 100644
> --- a/xen/common/domctl.c
> +++ b/xen/common/domctl.c
> @@ -1028,6 +1028,10 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) 
> u_domctl)
>  
>      default:
>          ret = arch_do_domctl(op, d, u_domctl);
> +#ifdef HAS_PASSTHROUGH
> +        if ( ret == -ENOSYS )
> +            ret = iommu_do_domctl(op, d, u_domctl);
> +#endif
>          break;
>      }
>  

To be honest I'm not convinced of this approach. I'd prefer ARM's
arch_do_domctl() to invoke iommu_do_domctl() just like x86's does.
In particular I'm neither in favor of checking for specific error codes
before chaining, nor do I think that - despite there being a number
of such cases in the tree - ENOSYS is the right error value for not
implemented sub-hypercalls (to me only top level hypercalls may
produce this).

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.