All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Roger Pau Monne <roger.pau@citrix.com>,
	xen-devel@lists.xenproject.org,
	Ian Campbell <ian.campbell@citrix.com>,
	Wei Liu <wei.liu2@citrix.com>
Subject: Re: [PATCH for-4.6 2/3] libxl/psr: use Xen error codes when checking hypercall return values
Date: Tue, 21 Jul 2015 12:43:57 +0100	[thread overview]
Message-ID: <55AE307D.5080307@citrix.com> (raw)
In-Reply-To: <21934.11949.408734.564467@mariner.uk.xensource.com>

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@eu.citrix.com>
> 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
example.

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

~Andrew

  reply	other threads:[~2015-07-21 11:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-20 14:54 [PATCH for-4.6 0/3] FreeBSD fixes Roger Pau Monne
2015-07-20 14:55 ` [PATCH for-4.6 1/3] libxl: include sys/endian.h for FreeBSD Roger Pau Monne
2015-07-21  9:36   ` Wei Liu
2015-07-21 14:49     ` Ian Campbell
2015-07-20 14:55 ` [PATCH for-4.6 2/3] libxl/psr: use Xen error codes when checking hypercall return values Roger Pau Monne
2015-07-21 11:15   ` Ian Jackson
2015-07-21 11:36     ` Ian Jackson
2015-07-21 11:43       ` Andrew Cooper [this message]
2015-07-21 12:40         ` Ian Jackson
2015-07-21 12:47           ` Ian Campbell
2015-07-21 13:14             ` Jan Beulich
2015-07-21 13:30               ` Ian Campbell
2015-07-20 14:55 ` [PATCH for-4.6 3/3] hotplug/FreeBSD: fix xendriverdomain rc.d script Roger Pau Monne
2015-07-21 11:03   ` Wei Liu
2015-07-21 14:49     ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55AE307D.5080307@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.