All of lore.kernel.org
 help / color / mirror / Atom feed
From: Håvard Bjerke <Havard.Bjerke@idi.ntnu.no>
To: dan.magenheimer@hp.com
Cc: xen-devel@lists.sourceforge.net
Subject: Xen/ia64
Date: Fri, 18 Feb 2005 11:14:45 +0100	[thread overview]
Message-ID: <20050218101445.GC9173@idi.ntnu.no> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=unknown-8bit, Size: 1554 bytes --]

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

-- 
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_id\x14396&op=click

             reply	other threads:[~2005-02-18 10:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-18 10:14 Håvard Bjerke [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-03-03 19:46 Xen/ia64 Magenheimer, Dan (HP Labs Fort Collins)
2005-02-18 19:13 Xen/ia64 Magenheimer, Dan (HP Labs Fort Collins)
2005-01-09 10:55 Xen/ia64 Håvard Bjerke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050218101445.GC9173@idi.ntnu.no \
    --to=havard.bjerke@idi.ntnu.no \
    --cc=dan.magenheimer@hp.com \
    --cc=xen-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.