All of lore.kernel.org
 help / color / mirror / Atom feed
* changes for illumos in public headers
@ 2013-12-12  9:15 Igor Kozhukhov
  2013-12-12  9:50 ` Ian Campbell
  2013-12-12 11:02 ` Andrew Cooper
  0 siblings, 2 replies; 7+ messages in thread
From: Igor Kozhukhov @ 2013-12-12  9:15 UTC (permalink / raw)
  To: xen-devel

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
+ */
+#if !defined(_ASM)
+#define TRAP_INSTR "int $0x82"
+#else
+#define TRAP_INSTR int $0x82
+#endif
+#endif
+
 /*
  * These flat segments are in the Xen-private section of every GDT. Since these
  * are also present in the initial GDT, many OSes will be able to avoid
diff -r 9640d9c4b223 xen/include/public/arch-x86/xen-x86_64.h
--- a/xen/include/public/arch-x86/xen-x86_64.h  Tue Dec 10 16:21:57 2013 +0100
+++ b/xen/include/public/arch-x86/xen-x86_64.h  Thu Dec 12 13:07:50 2013 +0400
@@ -36,6 +36,20 @@
  * Clobbered: argument registers (e.g., 2-arg hypercall clobbers %rdi,%rsi)
  */
 
+#if defined(__sun)
+/*
+ * Direct hypercall interface:
+ * As above, except the entry sequence to the hypervisor is:
+ *  mov $hypercall-number*32,%eax ; syscall
+ * Clobbered: %rcx, %r11, argument registers (as above)
+ */
+#if !defined(_ASM)
+#define TRAP_INSTR "syscall"
+#else
+#define TRAP_INSTR syscall
+#endif
+#endif
+  
 /*
  * 64-bit segment selectors
  * These flat segments are in the Xen-private section of every GDT. Since these
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
+
 #if defined(__i386__) || defined(__x86_64__)
 #include "arch-x86/xen.h"
 #elif defined(__ia64__)

Signed-off-by: Igor Kozhukhov <ikozhukhov@gmail.com>

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.

please let me know about first changes in public headers - can integrate it to xen mainstream ?
or it is not applicable to xen ?

--
Best regards,
Igor Kozhukhov

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-12-16 11:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-12  9:15 changes for illumos in public headers Igor Kozhukhov
2013-12-12  9:50 ` Ian Campbell
2013-12-12 11:02 ` Andrew Cooper
2013-12-12 11:15   ` Igor Kozhukhov
2013-12-12 11:25     ` Ian Campbell
2013-12-13 15:41       ` Igor Kozhukhov
2013-12-16 11:26         ` Ian Campbell

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.