On 29/04/16 17:16, Roger Pau Monne wrote: > > It has also been suggested that the privcmd driver simply doesn't translate > error codes at all, and then let the applications figure out if the error > code comes from Xen or from the OS. IMHO, this is impossible to achieve, > because the ioctl syscall can return an error code that's been forwarded > by Xen or a native one, and the application has no way of knowing where is > it coming from.
The privcmd driver could return the hypercall error in a parameter and the ioctl return value is for driver errors. For example: IOCTL_PRIVCMD_HYPERCALL_V2 takes a struct xen_privcmd_hypercall_v2 { uint64_t op uint64_t arg[5] int64_t ret; }; This moves all the error code translation into userspace. David _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel