Skip to contentSkip to conversation

Xen/ia64

DISCUSSION H�vard Bjerke 1 participant 1 message Feb 18, 2005

lore
Share & tools
lore
#0 lore raw

Has anyone made any thoughts as to how hypercalls should be implemented in Xen/ia64?

In Xen/x86 they are basically syscalls, only with interrupt vector 0x82 instead of 0x80. So it's a matter of pushing the registers into the stack, loading the hypercall number (long) and arguments (5x long) into the registers, and interrupting with 'int 0x82':

        __asm__ __volatile__ (
            "pushl %%ebx; pushl %%ecx; pushl %%edx; pushl %%esi; pushl %%edi; "
            "movl  4(%%eax),%%ebx ;"
            "movl  8(%%eax),%%ecx ;"
            "movl 12(%%eax),%%edx ;"
            "movl 16(%%eax),%%esi ;"
            "movl 20(%%eax),%%edi ;"
            "movl   (%%eax),%%eax ;"
            TRAP_INSTR "; "		// = int 0x82
            "popl %%edi; popl %%esi; popl %%edx; popl %%ecx; popl %%ebx"
            : "=a" (ret) : "0" (&hypercall) : "memory" );

However, in Linux/ia64 a syscall is called with a break instruction:

	mov r15 = NR   // the syscall number. r15 is a scratch register.
	break 0x100000
	[...]

What's the ideal way to do a hypercall in Xen/ia64? Simply use 'break 0x100001'? Or is 0x100001 reserved for something else in Linux/ia64?

H�vard

Signature · 9 lines
H�vard K. F. Bjerke
http://www.idi.ntnu.no/~havarbj/


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click