qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] NPTL user mode fixes


From: Richard Henderson
Subject: Re: [Qemu-devel] NPTL user mode fixes
Date: Wed, 28 Apr 2010 11:56:44 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Thunderbird/3.0.4

On 04/26/2010 04:00 PM, David Munday wrote:
> I starting to work with qemu to enable NPTL dependent binaries to run in
> user mode. I see that currently NPTL is not supported for SPARC or x86.
> 
> What is still left to do for NPTL support?

The thing that's missing to enable the compile with NPTL is cpu_set_tls.
For Sparc I believe this is merely an assignment to %g7.  For x86, you
need to arrange for a call to do_set_thread_area, which is currently
private to linux-user/syscall.c.

However, the other thing that will need to be fixed is that neither port
implements its atomic operations atomically -- the implementations merely
assume that only one thread is active.  See do_store_exclusive in
linux-user/main.c for how several ports handle their atomic operations.
It'll be a bit different for Sparc singe it has LDSTUB and SWAP as well
as CAS.  It'll be lots different for x86, since quite a few read-modify-write
operations can be made atomic by use of the LOCK prefix (this could be 
quite an undertaking, actually).


r~




reply via email to

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