From: "Alex Bennée" <alex.bennee@linaro.org>
To: qemu-devel@nongnu.org
Cc: fam@euphon.net, berrange@redhat.com, stefanb@linux.vnet.ibm.com,
"Alex Bennée" <alex.bennee@linaro.org>,
richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org,
stefanha@redhat.com, marcandre.lureau@redhat.com,
pbonzini@redhat.com, aurelien@aurel32.net
Subject: [PATCH v1 4/5] docs/devel: convert multi-thread-tcg to a .rst document
Date: Wed, 13 Nov 2019 11:59:51 +0000 [thread overview]
Message-ID: <20191113115952.775-5-alex.bennee@linaro.org> (raw)
In-Reply-To: <20191113115952.775-1-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
docs/devel/index.rst | 1 +
...ti-thread-tcg.txt => multi-thread-tcg.rst} | 28 ++++++++++++-------
2 files changed, 19 insertions(+), 10 deletions(-)
rename docs/devel/{multi-thread-tcg.txt => multi-thread-tcg.rst} (96%)
diff --git a/docs/devel/index.rst b/docs/devel/index.rst
index c86a3cdff2f..3e6624ec604 100644
--- a/docs/devel/index.rst
+++ b/docs/devel/index.rst
@@ -22,4 +22,5 @@ Contents:
decodetree
secure-coding-practices
tcg
+ multi-thread-tcg
tcg-plugins
diff --git a/docs/devel/multi-thread-tcg.txt b/docs/devel/multi-thread-tcg.rst
similarity index 96%
rename from docs/devel/multi-thread-tcg.txt
rename to docs/devel/multi-thread-tcg.rst
index 782bebc28b4..4e914bacc0c 100644
--- a/docs/devel/multi-thread-tcg.txt
+++ b/docs/devel/multi-thread-tcg.rst
@@ -1,7 +1,10 @@
-Copyright (c) 2015-2016 Linaro Ltd.
+.. Copyright (c) 2015-2016 Linaro Ltd.
+.. This work is licensed under the terms of the GNU GPL, version 2 or
+.. later. See the COPYING file in the top-level directory.
-This work is licensed under the terms of the GNU GPL, version 2 or
-later. See the COPYING file in the top-level directory.
+==================
+Multi-threaded TCG
+==================
Introduction
============
@@ -40,7 +43,7 @@ Main Run Loop
Even when there is no code being generated there are a number of
structures associated with the hot-path through the main run-loop.
These are associated with looking up the next translation block to
-execute. These include:
+execute. These include::
tb_jmp_cache (per-vCPU, cache of recent jumps)
tb_ctx.htable (global hash table, phys address->tb lookup)
@@ -61,7 +64,9 @@ have their block-to-block jumps patched.
Global TCG State
----------------
-### User-mode emulation
+User-mode emulation
+~~~~~~~~~~~~~~~~~~~
+
We need to protect the entire code generation cycle including any post
generation patching of the translated code. This also implies a shared
translation buffer which contains code running on all cores. Any
@@ -78,7 +83,9 @@ patching.
Code generation is serialised with mmap_lock().
-### !User-mode emulation
+System emulation
+~~~~~~~~~~~~~~~~
+
Each vCPU has its own TCG context and associated TCG region, thereby
requiring no locking.
@@ -125,10 +132,11 @@ linked list of all Translation Blocks in that page (see page_next).
Both the jump patching and the page cache involve linked lists that
the invalidated TranslationBlock needs to be removed from.
-DESIGN REQUIREMENT: Safely handle invalidation of TBs
- - safely patch/revert direct jumps
- - remove central PageDesc lookup entries
- - ensure lookup caches/hashes are safely updated
+DESIGN REQUIREMENTS:
+ - Safely handle invalidation of TBs
+ - safely patch/revert direct jumps
+ - remove central PageDesc lookup entries
+ - ensure lookup caches/hashes are safely updated
(Current solution)
--
2.20.1
next prev parent reply other threads:[~2019-11-13 12:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-13 11:59 [PATCH for 4.2-rc2 v1 0/5] misc doc and testing fixes Alex Bennée
2019-11-13 11:59 ` [PATCH v1 1/5] tests/vm: make --interactive (and therefore DEBUG=1) unconditional Alex Bennée
2019-11-13 13:31 ` Thomas Huth
2019-11-13 11:59 ` [PATCH v1 2/5] docs/devel: rename plugins.rst to tcg-plugins.rst Alex Bennée
2019-11-13 16:23 ` Philippe Mathieu-Daudé
2019-11-13 16:39 ` Paolo Bonzini
2019-11-13 11:59 ` [PATCH v1 3/5] docs/devel: update tcg-plugins.rst with API versioning details Alex Bennée
[not found] ` <SN6PR13MB2272B60021982C8C7F680CAA80760@SN6PR13MB2272.namprd13.prod.outlook.com>
2019-11-13 14:40 ` FW: " Robert Foley
2019-11-13 11:59 ` Alex Bennée [this message]
2019-11-13 11:59 ` [PATCH v1 5/5] .travis.yml: drop 32 bit systems from MAIN_SOFTMMU_TARGETS Alex Bennée
2019-11-13 13:30 ` Thomas Huth
2019-11-19 12:13 ` Thomas Huth
2019-11-13 16:29 ` Philippe Mathieu-Daudé
2019-11-13 17:38 ` [EXTERNAL]Re: " Aleksandar Markovic
2019-11-13 18:44 ` Philippe Mathieu-Daudé
2019-11-13 19:01 ` Alex Bennée
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=20191113115952.775-5-alex.bennee@linaro.org \
--to=alex.bennee@linaro.org \
--cc=aurelien@aurel32.net \
--cc=berrange@redhat.com \
--cc=cota@braap.org \
--cc=f4bug@amsat.org \
--cc=fam@euphon.net \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=stefanb@linux.vnet.ibm.com \
--cc=stefanha@redhat.com \
/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).