aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2018-10-20 12:04:57 -0700
committerRichard Henderson <richard.henderson@linaro.org>2018-10-31 12:16:35 +0000
commit3d1523ced6060cdfe9e768a814d064067ccabfe5 (patch)
treec12e077ca5bfe491fae423394861d0bb813e24e8 /include
parente09de0a20d42e5e76e91ffc7f9f4787e225e1ec2 (diff)
downloadqemu-3d1523ced6060cdfe9e768a814d064067ccabfe5.zip
qemu-3d1523ced6060cdfe9e768a814d064067ccabfe5.tar.gz
qemu-3d1523ced6060cdfe9e768a814d064067ccabfe5.tar.bz2
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')
-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 c7b501d..ca0fea8 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