qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Erik de Castro Lopo <mle+tools@mega-nerd.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Question on pointers in the qemu user space emulation
Date: Sat, 18 Jan 2014 06:20:44 +1100	[thread overview]
Message-ID: <20140118062044.dc6e92d3183e3ddc65fd31a3@mega-nerd.com> (raw)
In-Reply-To: <CAFEAcA9xCO1Sk2e=t=S8dgcd-8t0xLbfbQWoZw-PkYoM=qJu_g@mail.gmail.com>

Peter Maydell wrote:

> On 17 January 2014 06:33, Erik de Castro Lopo <mle+tools@mega-nerd.com> wrote:
> > I'm currently working on implementing a missing part of a linux-user
> > syscall. This syscall includes a function pointer for a callback.
> 
> Which syscall? Callbacks from the kernel are pretty tricky.
> Basically you need to register a host function as the callback
> with the host kernel, and stash the guest function pointer somewhere
> so that when the callback comes in from the host kernel you can
> arrange to interrupt the guest and restart it at the desired
> location.
> 
> Pretty much the only situation we support this for is the special
> case of signal handlers. In fact I wasn't even aware there was
> any other kind of kernel-to-userspace callback...

The syscall is kind of signal related.

When I implemented the POSIX timer syscalls a little while ago I got
them working for my specific use case. Since then someone pointed
out that the implementation was not complete and I'd like to fix
that. The ticket is here:

    https://bugs.launchpad.net/qemu/+bug/1042388#27

and the guest user space test case here:

    https://bugs.launchpad.net/qemu/+bug/1042388/+attachment/3948443/+files/timer_test.c

Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/

  reply	other threads:[~2014-01-17 19:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-17  6:33 [Qemu-devel] Question on pointers in the qemu user space emulation Erik de Castro Lopo
2014-01-17 14:17 ` Christopher Covington
2014-01-17 15:16 ` Peter Maydell
2014-01-17 19:20   ` Erik de Castro Lopo [this message]
2014-01-18 10:11     ` Peter Maydell

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=20140118062044.dc6e92d3183e3ddc65fd31a3@mega-nerd.com \
    --to=mle+tools@mega-nerd.com \
    --cc=qemu-devel@nongnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).