From: Ian Campbell Subject: Re: changes for illumos in public headers Date: Thu, 12 Dec 2013 09:50:26 +0000 Message-ID: <1386841826.12610.36.camel@kazak.uk.xensource.com> References: <9CAE0927-1426-447B-B9D1-21E75B5161EB@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <9CAE0927-1426-447B-B9D1-21E75B5161EB@gmail.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: Igor Kozhukhov Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Thu, 2013-12-12 at 13:15 +0400, Igor Kozhukhov wrote: > Hello All, > > i'm working on port xen-4.2 to DilOS - illumos based platform. > > I have a questions about changes in public headers. > > for build i need changes: > > diff -r 9640d9c4b223 xen/include/public/arch-x86/xen-x86_32.h > --- a/xen/include/public/arch-x86/xen-x86_32.h Tue Dec 10 16:21:57 2013 +0100 > +++ b/xen/include/public/arch-x86/xen-x86_32.h Thu Dec 12 13:07:50 2013 +0400 > @@ -36,6 +36,19 @@ > * Clobbered: Argument registers (e.g., 2-arg hypercall clobbers %ebx,%ecx) > */ > > +#if defined(__sun) > +/* > + * Direct hypercall interface: > + * As above, except the entry sequence to the hypervisor is: > + * mov $hypercall-number*32,%eax ; int $0x82 The direct trap has been deprecated for years now (like nearly a decade...). Illumos should really switch the hypercall page based mechanism (which is described just above the context of this patch). [...] > diff -r 9640d9c4b223 xen/include/public/xen.h > --- a/xen/include/public/xen.h Tue Dec 10 16:21:57 2013 +0100 > +++ b/xen/include/public/xen.h Thu Dec 12 13:07:50 2013 +0400 > @@ -29,6 +29,20 @@ > > #include "xen-compat.h" > > +#if defined(__sun) > +#if defined(__i386) && !defined(__i386__) > +#define __i386__ /* foo */ > +#endif > + > +#if defined(__amd64) && !defined(__x86_64__) > +#define __x86_64__ > +#endif > + > +#if defined(_ASM) && !defined(__ASSEMBLY__) > +#define __ASSEMBLY__ > +#endif > +#endif > + Not sure what these are for but they seem odd to me. Are these symbols really not defined by your compiler? > also in xen\include\public\trace.h > we have structure: struct t_info > > it have conflict with another structure with the same name in illumos sources. > Question: can we rename structure name in xen to: struct t_info_xen > > if yes - i can try to update xen code with it and send RTI. For quite a while now I think we have been encouraging guest OSes to take a copy of the Xen headers and modify them to suit their needs e..g Linux and I think the *BSDs do this. This avoids a build dependency from the guest OSes on Xen. Ian.