[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Question on pointers in the qemu user space emulation
From: |
Erik de Castro Lopo |
Subject: |
Re: [Qemu-devel] Question on pointers in the qemu user space emulation |
Date: |
Sat, 18 Jan 2014 06:20:44 +1100 |
Peter Maydell wrote:
> On 17 January 2014 06:33, Erik de Castro Lopo <address@hidden> 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/