summaryrefslogtreecommitdiffstats
path: root/include/exec
diff options
context:
space:
mode:
authorRichard Henderson2018-10-20 21:04:57 +0200
committerRichard Henderson2018-10-31 13:16:35 +0100
commit3d1523ced6060cdfe9e768a814d064067ccabfe5 (patch)
treec12e077ca5bfe491fae423394861d0bb813e24e8 /include/exec
parentcputlb: Count "partial" and "elided" tlb flushes (diff)
downloadqemu-3d1523ced6060cdfe9e768a814d064067ccabfe5.tar.gz
qemu-3d1523ced6060cdfe9e768a814d064067ccabfe5.tar.xz
qemu-3d1523ced6060cdfe9e768a814d064067ccabfe5.zip
cputlb: Filter flushes on already clean tlbs
Especially for guests with large numbers of tlbs, like ARM or PPC, we may well not use all of them in between flush operations. Remember which tlbs have been used since the last flush, and avoid any useless flushing. Tested-by: Emilio G. Cota <cota@braap.org> Reviewed-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include/exec')
-rw-r--r--include/exec/cpu-defs.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/exec/cpu-defs.h b/include/exec/cpu-defs.h
index c7b501d627..ca0fea8b27 100644
--- a/include/exec/cpu-defs.h
+++ b/include/exec/cpu-defs.h
@@ -166,7 +166,12 @@ typedef struct CPUTLBCommon {
* mmu_idx may be discarded. Protected by tlb_c.lock.
*/
uint16_t pending_flush;
-
+ /*
+ * Within dirty, for each bit N, modifications have been made to
+ * mmu_idx N since the last time that mmu_idx was flushed.
+ * Protected by tlb_c.lock.
+ */
+ uint16_t dirty;
/*
* Statistics. These are not lock protected, but are read and
* written atomically. This allows the monitor to print a snapshot