qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] user emulation status?


From: Paul Brook
Subject: Re: [Qemu-devel] user emulation status?
Date: Tue, 9 Sep 2008 21:01:59 +0100
User-agent: KMail/1.9.9

> > AFAIK NPTL only works fine only on ARM ATM.
>
> The guys porting BSD user mode told us that was astonished that syscall
> handling in linux does not use common code. Now I am a bit stonished
> too. Are things like syscalls and even more nptl not handled in common
> code? Or is the non common code just not implemented?

The kenrel/userspace interface for NPTL is actually very small.  There's a few 
extra arguments to clone, TLS register handling and synchronization 
primitives.

The clone arguments are pretty much the same on all architectures. Variations 
tend to be minor tweaks to do with passing a large number of arguments to a 
syscall.

Pretty much every architecture has its own mechanism for providing a TLS 
register. Some have dedicated hardware registers for this purpose, others use 
a variety of tricks to provide the value.  qemu needs to support this before 
even single threaded NPTL applications will work.

Synchronisation primitives operations come in two halves. futex syscalls which 
are the same on all targets, and atomic operations which are different for 
each architecture.  To make multithreaded applications work you need to 
ensure these atomic operations actually appear atomic.

Paul




reply via email to

[Prev in Thread] Current Thread [Next in Thread]