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

Re: [Xen-devel] Returning errno values inside of hypercall structs (was: Re: [PATCH for-4.7 3/4] tools/xsplice: fix mixing system)



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@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®.