qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Paul Brook <paul@codesourcery.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH]ish NPTL support.
Date: Wed, 13 Dec 2006 17:50:56 +0000	[thread overview]
Message-ID: <1166032256.5253.766.camel@pmac.infradead.org> (raw)
In-Reply-To: <200612131742.12393.paul@codesourcery.com>

On Wed, 2006-12-13 at 17:42 +0000, Paul Brook wrote:
> Qemu doesn't currently have any real thread support. It has a few hacks that 
> work for simple linuxthreads cases, but I doubt real multithreaded 
> applications will work.
> 
> My point was that instead of blindly passing the threading syscalls through to 
> the host we should consider using the host libc/libpthread thread support. 

Well, let's break things down individually.

- sys_set_thread_area():
- sys_get_thread_area():
- clone(CLONE_SETTLS)

This _is_ handled in qemu, since it's just a case of loading new stuff
into the emulated GDT. (Well, I didn't do get_thread_area but it's
simple).

- sys_futex():

We have to translate these into calls to the host's sys_futex() anyway.
I need to go through the rest of the futex operations and see how many
we can emulate cross-endian, and perhaps add some kernel support to make
the answer "all of them".

- sys_set_tid_address():
- clone(CLONE_CHILD_CLEARTID):

We _could_ manage to do this in qemu for controlled thread exit -- it
would be hard for uncontrolled exit though. But I don't see any harm in
just letting the kernel do it either. I don't mind too much, but if we
can let the kernel do it I'm happier that way.

- clone(CLONE_PARENT_SETTID):
- clone(CLONE_CHILD_SETTID):

We need endianness-mangling on these so we have to get involved somehow.
But I think we do need to use the kernel's support and then marshal the
result back to the guest's memory.

-- 
dwmw2

  reply	other threads:[~2006-12-13 17:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-09 22:38 [Qemu-devel] [PATCH]ish NPTL support David Woodhouse
2006-12-13 16:02 ` Mulyadi Santosa
2006-12-13 17:01   ` David Woodhouse
2006-12-13 17:22     ` Paul Brook
2006-12-13 17:32       ` David Woodhouse
2006-12-13 17:42         ` Paul Brook
2006-12-13 17:50           ` David Woodhouse [this message]
2006-12-13 18:07             ` Paul Brook
2006-12-13 18:44               ` Fabrice Bellard
2006-12-14  2:16             ` Jamie Lokier
2006-12-16 13:26               ` David Woodhouse
2006-12-16 15:17                 ` Paul Brook
2006-12-16 18:48                 ` Jamie Lokier
2006-12-13 17:35     ` Thiemo Seufer

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=1166032256.5253.766.camel@pmac.infradead.org \
    --to=dwmw2@infradead.org \
    --cc=paul@codesourcery.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).