[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/7] target-ppc/linux-user: NPTL support
From: |
malc |
Subject: |
Re: [Qemu-devel] [PATCH 0/7] target-ppc/linux-user: NPTL support |
Date: |
Sat, 6 Jun 2009 03:04:38 +0400 (MSD) |
On Thu, 4 Jun 2009, Nathan Froyd wrote:
> This patch series adds NPTL support in Linux user-mode emulation to
> 32-bit PowerPC targets.
>
> The main complication comes from implementing atomic instructions
> properly. We chose to implement a simplistic model:
>
> - reserved loads record the value loaded;
>
> - conditional stores check that the memory at the effective address
> contains the value loaded by the previous reserved load, in addition
> to all other checks. if so, the store succeeds; otherwise, it fails.
I think this will break code that relies on the fact that ll/sc is not
affected by the ABA problem.
>
> It is possible to implement something more sophisticated using mprotect:
>
> - reserved loads write-protect the page from which the value is loaded;
>
> - regular stores to the page (through SIGSEGV handling) remove the write
> protection (which is roughly how the architecture really works);
>
> - conditional stores fail if the page was not write-protected, in
> addition to all other checks. If the store succeeds, then the page is
> unprotected.
>
> but the simple scheme works well enough and should be somewhat faster.
> The simple scheme is what's already done for system mode, too; it's even
> slightly dumber in system mode because we don't check for equality of
> values.
[..snip..]
--
mailto:address@hidden
- [Qemu-devel] [PATCH 0/7] target-ppc/linux-user: NPTL support, Nathan Froyd, 2009/06/04
- [Qemu-devel] [PATCH 7/7] enable NPTL for ppc-linux-user targets in configure, Nathan Froyd, 2009/06/04
- [Qemu-devel] [PATCH 2/7] target-ppc: fix cpu_clone_regs, Nathan Froyd, 2009/06/04
- [Qemu-devel] [PATCH 1/7] linux-user: initialize mmap_mutex properly, Nathan Froyd, 2009/06/04
- [Qemu-devel] [PATCH 5/7] target-ppc: add exceptions for conditional stores, Nathan Froyd, 2009/06/04
- [Qemu-devel] [PATCH 3/7] target-ppc: add cpu_set_tls, Nathan Froyd, 2009/06/04
- [Qemu-devel] [PATCH 6/7] linux-user: handle POWERPC_EXCP_STCX, Nathan Froyd, 2009/06/04
- [Qemu-devel] [PATCH 4/7] target-ppc: retain l{w,d}arx loaded value, Nathan Froyd, 2009/06/04
- Re: [Qemu-devel] [PATCH 0/7] target-ppc/linux-user: NPTL support,
malc <=
- Re: [Qemu-devel] [PATCH 0/7] target-ppc/linux-user: NPTL support, Miklos Vajna, 2009/06/09
- Re: [Qemu-devel] [PATCH 0/7] target-ppc/linux-user: NPTL support, Laurent Vivier, 2009/06/09