From f1f25eed03308f9f85770e0b6b911b6caf83c268 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alex=20Benn=C3=A9e?= Date: Fri, 25 Jul 2025 16:45:08 +0100 Subject: [PATCH] docs/user: expand section on threading MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Potentially too many weasel words when describing atomic and memory order issues. Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-ID: <20250725154517.3523095-6-alex.bennee@linaro.org> --- docs/user/main.rst | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/user/main.rst b/docs/user/main.rst index 05de904225..347bdfabf8 100644 --- a/docs/user/main.rst +++ b/docs/user/main.rst @@ -46,9 +46,15 @@ Threading On Linux, QEMU can emulate the ``clone`` syscall and create a real host thread (with a separate virtual CPU) for each emulated thread. -Note that not all targets currently emulate atomic operations -correctly. x86 and Arm use a global lock in order to preserve their -semantics. +However as QEMU relies on the system libc to call ``clone`` on its +behalf we limit the flags accepted to those it uses. Specifically this +means flags affecting namespaces (e.g. container runtimes) are not +supported. QEMU user-mode processes can still be run inside containers +though. + +While QEMU does its best to emulate atomic operations properly +differences between the host and guest memory models can cause issues +for software that makes assumptions about the memory model. QEMU was conceived so that ultimately it can emulate itself. Although it is not very useful, it is an important test to show the power of the -- 2.47.2