[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Xen/ia64

Has anyone made any thoughts as to how hypercalls should be implemented in 

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 K. F. Bjerke

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.
Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.