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

Re: [Xen-devel] [PATCH for-4.6 2/3] libxl/psr: use Xen error codes when checking hypercall return values

On 21/07/15 12:36, Ian Jackson wrote:
> Ian Jackson writes ("Re: [PATCH for-4.6 2/3] libxl/psr: use Xen error codes 
> when checking hypercall return values"):
>> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
> Actually, I withdraw that.  I was confused about how things worked.
> To summarise an irc discussion:
>  * On NetBSD, hypercall numbers are translated by the privcmd driver.
>    This is probably correct.  (Not sure if FreeBSD does the same.)
>  * So the libxc API is that errno values are OS errno values.  Roger's
>    patch is wrong.
>  * A corrollary is that the hypervisor may not use errno values which
>    are not in the toolstack OS.  Since the hypervisor is supposed to
>    be fairly portable to different toolstacks, that means we shouldn't
>    be using errno values which are not in POSIX.
>  * Re EBADSLT in particular:
>      - There is one return site in 4.5, which is in hvm_save_one,
>        which is toolstack-onloy functionality.  We can therefore
>        change it for 4.6.
>      - The other sites where EBADSLT are generated in staging must
>        also be fixed.
> So the correct approach is:
>  - Patch to change EBADSLT to something else, everywhere.
>  - Patch to remove EBADSLT from hypervisor errno list (if it's not
>    just been renamed/renumbered).
>  - If FreeBSD privcmd does not translate errno numbers, make it do so.

EBADSLT isn't the only example here.  I believe ENODATA is a similar

If we are going to do this, we should prune all non-posix errnos out of
the hypervisor errno list.


Xen-devel mailing list



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