changes for illumos in public headers
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:
xen/include/public/arch-x86/xen-x86_32.h Thu Dec 12 13:07:50 2013 +0400 renamed from xen/include/public/arch-x86/xen-x86_32.h Tue Dec 10 16:21:57 2013 +0100 +13 -0
@@ -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
xen/include/public/arch-x86/xen-x86_64.h Thu Dec 12 13:07:50 2013 +0400 renamed from xen/include/public/arch-x86/xen-x86_64.h Tue Dec 10 16:21:57 2013 +0100 +14 -0
@@ -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
xen/include/public/xen.h Thu Dec 12 13:07:50 2013 +0400 renamed from xen/include/public/xen.h Tue Dec 10 16:21:57 2013 +0100 +14 -0
@@ -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__)
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
Quoted 13 lines · Igor Kozhukhov
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
9640d9c4b223xen/include/public/arch-x86/xen-x86_32.h
xen/include/public/arch-x86/xen-x86_32.h Thu Dec 12 13:07:50 2013 +0400 line 43
Quoted 8 lines
xen/include/public/arch-x86/xen-x86_32.h Thu Dec 12 13:07:50 2013 +0400 renamed from xen/include/public/arch-x86/xen-x86_32.h Tue Dec 10 16:21:57 2013 +0100 +5
-0@@ -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).
[...]
Quoted 11 lines
diff -r
9640d9c4b223xen/include/public/xen.hxen/include/public/xen.h Thu Dec 12 13:07:50 2013 +0400 renamed from xen/include/public/xen.h Tue Dec 10 16:21:57 2013 +0100 +4
-0@@ -29,6 +29,20 @@ #include "xen-compat.h" +#if defined(__sun) +#if defined(__i386) && !defined(__i386__) +#define __i386__ /* foo */ +#endif
xen/include/public/xen.h Thu Dec 12 13:07:50 2013 +0400 line 45
Quoted 10 lines
xen/include/public/xen.h Thu Dec 12 13:07:50 2013 +0400 renamed from xen/include/public/xen.h Tue Dec 10 16:21:57 2013 +0100 +10
-0+ +#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?
Quoted 7 lines
also in xen\include\public\trace.h
we have structure: structt_infoit have conflict with another structure with the same name in illumos sources.
Question: can we rename structure name in xen to: structt_info_xenif 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.
Quoted 12 lines · Igor Kozhukhov
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
9640d9c4b223xen/include/public/arch-x86/xen-x86_32.h
xen/include/public/arch-x86/xen-x86_32.h Thu Dec 12 13:07:50 2013 +0400 line 43
Quoted 8 lines
xen/include/public/arch-x86/xen-x86_32.h Thu Dec 12 13:07:50 2013 +0400 renamed from xen/include/public/arch-x86/xen-x86_32.h Tue Dec 10 16:21:57 2013 +0100 +5
-0@@ -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
Have you done substantial hacking to the Xen entry points? If not, this comment appears wrong.
Furthermore, why are you not using a hypercall page?
~Andrew
Quoted 85 lines
xen/include/public/arch-x86/xen-x86_32.h Thu Dec 12 13:07:50 2013 +0400 renamed from xen/include/public/arch-x86/xen-x86_32.h Tue Dec 10 16:21:57 2013 +0100 +8
-0+ */ +#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 avoiddiff -r
9640d9c4b223xen/include/public/arch-x86/xen-x86_64.hxen/include/public/arch-x86/xen-x86_64.h Thu Dec 12 13:07:50 2013 +0400 renamed from xen/include/public/arch-x86/xen-x86_64.h Tue Dec 10 16:21:57 2013 +0100 +14
-0@@ -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 thesediff -r
9640d9c4b223xen/include/public/xen.hxen/include/public/xen.h Thu Dec 12 13:07:50 2013 +0400 renamed from xen/include/public/xen.h Tue Dec 10 16:21:57 2013 +0100 +14
-0@@ -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 <[email protected]>also in xen\include\public\trace.h
we have structure: structt_infoit have conflict with another structure with the same name in illumos sources.
Question: can we rename structure name in xen to: structt_info_xenif 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_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 25 lines · Andrew Cooper
Quoted 12 lines · Igor Kozhukhov
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
9640d9c4b223xen/include/public/arch-x86/xen-x86_32.hxen/include/public/arch-x86/xen-x86_32.h Thu Dec 12 13:07:50 2013 +0400 line 43
Quoted 8 lines
xen/include/public/arch-x86/xen-x86_32.h Thu Dec 12 13:07:50 2013 +0400 renamed from xen/include/public/arch-x86/xen-x86_32.h Tue Dec 10 16:21:57 2013 +0100 +5
-0@@ -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 $0x82Have you done substantial hacking to the Xen entry points? If not, this comment appears wrong.
Quoted 1 line
Furthermore, why are you not using a hypercall page?
At this moment i'm using xen-3.4 implementation in illumos based on Sun Xen ports. I'm learning how to port xen-4.2.
-Igor
Quoted 1 line
~Andrew
Quoted 27 lines · Igor Kozhukhov
Quoted 25 lines · Andrew Cooper
Quoted 12 lines · Igor Kozhukhov
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
9640d9c4b223xen/include/public/arch-x86/xen-x86_32.hxen/include/public/arch-x86/xen-x86_32.h Thu Dec 12 13:07:50 2013 +0400 line 43
Quoted 8 lines
xen/include/public/arch-x86/xen-x86_32.h Thu Dec 12 13:07:50 2013 +0400 renamed from xen/include/public/arch-x86/xen-x86_32.h Tue Dec 10 16:21:57 2013 +0100 +5
-0@@ -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 $0x82Have you done substantial hacking to the Xen entry points? If not, this comment appears wrong.
Quoted 4 lines
Quoted 1 line
Furthermore, why are you not using a hypercall page?
At this moment i'm using xen-3.4 implementation in illumos based on Sun Xen ports. I'm learning how to port xen-4.2.
The hypercall page support has been present since at least Xen 3.0.4, actually before, but I can't be bothered to search further back than d87addffb118.
Ian.
Hi Ian,
can i use extras/mini-os/* as example for hypercalls implementations ?
--
Best regards,
Igor Kozhukhov
Quoted 39 lines · Ian Campbell
Quoted 27 lines · Igor Kozhukhov
Quoted 25 lines · Andrew Cooper
Quoted 12 lines · Igor Kozhukhov
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
9640d9c4b223xen/include/public/arch-x86/xen-x86_32.hxen/include/public/arch-x86/xen-x86_32.h Thu Dec 12 13:07:50 2013 +0400 line 43
Quoted 8 lines
xen/include/public/arch-x86/xen-x86_32.h Thu Dec 12 13:07:50 2013 +0400 renamed from xen/include/public/arch-x86/xen-x86_32.h Tue Dec 10 16:21:57 2013 +0100 +5
-0@@ -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 $0x82Have you done substantial hacking to the Xen entry points? If not, this comment appears wrong.
Quoted 4 lines
Quoted 1 line
Furthermore, why are you not using a hypercall page?
At this moment i'm using xen-3.4 implementation in illumos based on Sun Xen ports. I'm learning how to port xen-4.2.
The hypercall page support has been present since at least Xen 3.0.4, actually before, but I can't be bothered to search further back than
d87addffb118.Ian.
Quoted 1 line · Igor Kozhukhov
can i use extras/mini-os/* as example for hypercalls implementations ?
It's BSD licensed, so if that is compatible I don't see why not.