qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Cc: Martin Mohring <martin.mohring@5etech.eu>
Subject: Re: [Qemu-devel] user emulation status?
Date: Tue, 9 Sep 2008 21:01:59 +0100	[thread overview]
Message-ID: <200809092102.00238.paul@codesourcery.com> (raw)
In-Reply-To: <48C6D16C.1080102@5etech.eu>

> > 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	other threads:[~2008-09-09 20:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-07 20:28 [Qemu-devel] user emulation status? Tomasz Chmielewski
2008-09-08  6:16 ` Kirill A. Shutemov
2008-09-08 11:09 ` Thiemo Seufer
2008-09-08 14:31 ` Riku Voipio
2008-09-08 14:49   ` Tomasz Chmielewski
2008-09-08 15:04   ` Stuart Anderson
     [not found]   ` <48C64643.7050808@5etech.eu>
2008-09-09 17:07     ` Martin Mohring
2008-09-09 18:34 ` Miklos Vajna
2008-09-09 19:41   ` Martin Mohring
2008-09-09 20:01     ` Paul Brook [this message]
2008-09-09 21:16       ` michael
2008-09-09 21:19       ` Martin Mohring

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=200809092102.00238.paul@codesourcery.com \
    --to=paul@codesourcery.com \
    --cc=martin.mohring@5etech.eu \
    --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).