summaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2012-01-17 13:23:13 +0000
committerAnthony Liguori <aliguori@us.ibm.com>2012-02-01 14:45:01 -0600
commit771124e1a61f73886ab16b4c9ce01eeffb74ce2b (patch)
treef9edef66846b86ed19c394166e951701002f6123 /exec.c
parent23704102ba9e24ad5eb913f240fdcf1bd45d38b1 (diff)
downloadqemu-771124e1a61f73886ab16b4c9ce01eeffb74ce2b.tar.gz
exec.c: Clarify comment about tlb_flush() flush_global parameter
Clarify the comment about tlb_flush()'s flush_global parameter, so it is clearer what it does and why it is OK that the implementation currently ignores it. Reviewed-by: Andreas F=C3=A4rber <afaerber@suse.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/exec.c b/exec.c
index 5b9eb9aa19..b81677ade9 100644
--- a/exec.c
+++ b/exec.c
@@ -1876,8 +1876,18 @@ static CPUTLBEntry s_cputlb_empty_entry = {
.addend = -1,
};
-/* NOTE: if flush_global is true, also flush global entries (not
- implemented yet) */
+/* NOTE:
+ * If flush_global is true (the usual case), flush all tlb entries.
+ * If flush_global is false, flush (at least) all tlb entries not
+ * marked global.
+ *
+ * Since QEMU doesn't currently implement a global/not-global flag
+ * for tlb entries, at the moment tlb_flush() will also flush all
+ * tlb entries in the flush_global == false case. This is OK because
+ * CPU architectures generally permit an implementation to drop
+ * entries from the TLB at any time, so flushing more entries than
+ * required is only an efficiency issue, not a correctness issue.
+ */
void tlb_flush(CPUState *env, int flush_global)
{
int i;