xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: David Vrabel <david.vrabel@citrix.com>
To: Roger Pau Monne <roger.pau@citrix.com>, Wei Liu <wei.liu2@citrix.com>
Cc: andrew.cooper3@citrix.com,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	xen-devel@lists.xenproject.org, JBeulich@suse.com,
	Ross Lagerwall <ross.lagerwall@citrix.com>
Subject: Re: Returning errno values inside of hypercall structs (was: Re: [PATCH for-4.7 3/4] tools/xsplice: fix mixing system)
Date: Tue, 3 May 2016 11:49:19 +0100	[thread overview]
Message-ID: <5728822F.5010209@citrix.com> (raw)
In-Reply-To: <20160429161619.hy57yirgq7xzwdhd@mac>

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

      parent reply	other threads:[~2016-05-03 10:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-29 16:16 Returning errno values inside of hypercall structs (was: Re: [PATCH for-4.7 3/4] tools/xsplice: fix mixing system) Roger Pau Monne
2016-04-29 16:22 ` Konrad Rzeszutek Wilk
2016-04-29 16:31   ` Roger Pau Monne
2016-04-29 16:59     ` Konrad Rzeszutek Wilk
2016-04-29 17:07       ` Roger Pau Monne
2016-04-29 17:25         ` Konrad Rzeszutek Wilk
2016-04-29 16:26 ` Jan Beulich
2016-05-03 10:49 ` David Vrabel [this message]

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=5728822F.5010209@citrix.com \
    --to=david.vrabel@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=ross.lagerwall@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).