[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH RFC] make error codes a formal part of the ABI
On 14/01/15 11:24, Ian Campbell wrote: > On Wed, 2015-01-14 at 10:52 +0000, Julien Grall wrote: >> Hi Ian, >> >> On 14/01/2015 10:28, Ian Campbell wrote: >>>>> (I suppose someone needs to patch libxc et al to actually use this) >>>> The primary consumer, as said in the description, is meant to be >>>> hvmloader. But yes, other tools parts may also want to follow >>>> that. >>> /me wonders how libxc has been getting away with out this until now, >>> especially on non-Linux platforms. >> On FreeBSD, we translate the XEN errno to the guest one in the privcmd >> drivers. > Ah, I looked in tools/libxc/*bsd* but didn't think to look in the kernel > itself. > >> See >> http://xenbits.xen.org/gitweb/?p=people/royger/freebsd.git;a=patch;h=f09eeed01bc884b37e978f6ec6e3e7a86778ef4b > OK, so essentially the requirement is that libxc should see the guest's > own ERRNO numbers and changing libxc to use xen's numbers would just be > wrong. > > Which is good, because making that change would be a nightmare! It is not so simple. Currently, the hypercall ioctl overloads errno from both the kernel and Xen. This makes it impossible for libxc to programmaticly distinguish an kernel error from a Xen error (e.g. where did an EFAULT come from). Ideally, the correct solution would be for the ioctl to return -1/errno for a kernel failure alone, and then have the top level stub inspect args[0] for the Xen error. This would require libxc to know about both the local errnos and Xen errnos. ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |