All of lore.kernel.org
 help / color / mirror / Atom feed
From: Goswin von Brederlow <goswin-v-b@web.de>
To: Daniel Stodden <stodden@cs.tum.edu>
Cc: xen-devel@lists.xensource.com, Goswin von Brederlow <goswin-v-b@web.de>
Subject: Re: Using SYSCALL/SYSRET with a minios kernel
Date: Mon, 25 Feb 2008 02:55:09 +0100	[thread overview]
Message-ID: <87hcfx3ima.fsf@web.de> (raw)
In-Reply-To: <1203897714.9103.6.camel@thinkpad.localdomain> (Daniel Stodden's message of "Mon, 25 Feb 2008 01:01:54 +0100")

Daniel Stodden <stodden@cs.tum.edu> writes:

> Hi.
>
> On Mon, 2008-02-25 at 00:22 +0100, Goswin von Brederlow wrote: 
>> Hi,
>> 
>> I'm trying to use the SYSCALL/SYSRET opcodes with a minios kernel
>> without much success.
>...
> The PV interface simply does not support STAR/LSTAR. It's that
> simple. :) I suppose you want to implement system calls? Check the
> HYPERVISOR_set_callbacks() call. The syscall_address parameter presently
> remains entirely unused in mini-os. But as far as I could tell
> immediately from the source, syscall/sysret appears to be supported by
> the general callback mechanism the same way sysenter/sysleave presently
> is.
>
> regards,
> daniel

Ok, here is what I did for the callbacks:

--- x86_64.S ---
ENTRY(syscall_callback)
	int $80
	zeroentry do_syscall

--- kernel.c ---
  HYPERVISOR_set_callbacks((unsigned long)hypervisor_callback,
			   (unsigned long)failsafe_callback,
			   (unsigned long)syscall_callback);

  __asm__ __volatile__("syscall");

If I understood you right that should set the RIP to syscall_callback
and execute from there. But still, the syscall opcode does nothing.
In case you wonder. The "int $80" is there to crash the domain and
tell me it reached that point.

MfG
        Goswin

  reply	other threads:[~2008-02-25  1:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-24 23:22 Using SYSCALL/SYSRET with a minios kernel Goswin von Brederlow
2008-02-25  0:01 ` Daniel Stodden
2008-02-25  1:55   ` Goswin von Brederlow [this message]
2008-02-25  2:26     ` Daniel Stodden
2008-02-25 10:04       ` Goswin von Brederlow
2008-02-25 11:08         ` Daniel Stodden
2008-02-25 13:14           ` Goswin von Brederlow
2008-02-25 13:50             ` Daniel Stodden

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=87hcfx3ima.fsf@web.de \
    --to=goswin-v-b@web.de \
    --cc=stodden@cs.tum.edu \
    --cc=xen-devel@lists.xensource.com \
    /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.