From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Subject: Re: [PATCH XEN v5 09/23] tools: Refactor hypercall calling wrappers into libxencall. Date: Fri, 13 Nov 2015 18:16:00 +0100 Message-ID: <56461AD0.60402@citrix.com> References: <1447070397.27774.11.camel@citrix.com> <1447070458-31104-1-git-send-email-ian.campbell@citrix.com> <1447070458-31104-10-git-send-email-ian.campbell@citrix.com> <22083.23005.583089.172481@mariner.uk.xensource.com> <1447427813.18450.184.camel@citrix.com> <1447433824.18450.200.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1447433824.18450.200.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell , Ian Jackson Cc: wei.liu2@citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org El 13/11/15 a les 17.57, Ian Campbell ha escrit: > On Fri, 2015-11-13 at 15:16 +0000, Ian Campbell wrote: >> >> On FreeBSD hypercall->retval is in the XEN_ERRNO_* space. But I think we >> probably want to map onto the FreeBSD ERRNO space, IIRC we decided on this >> approach, rather than converting all our callers to the XEN_ERRNO_* space, >> in a previous discussion. > > Roger, can you confirm whether or not something on FreeBSD translated the > XEN_ERRNO errors into the BSD errno space? If so, then where is it? I > looked in FreeBSD's privcmd.c and in libxc and failed to find it... Yes, the translation is done in the privcmd driver: https://github.com/freebsd/freebsd/blob/master/sys/dev/xen/privcmd/privcmd.c#L242 So errors returned from the ioctl (in errno) are in the BSD space. I still have to implement the error codes distributed from the Xen public headers, right now we have a custom Xen error translation: https://github.com/freebsd/freebsd/blob/master/sys/xen/error.h Roger.