qemu-e2k/include/exec
Alex Bennée b0706b7167 cputlb: atomically update tlb fields used by tlb_reset_dirty
The main use case for tlb_reset_dirty is to set the TLB_NOTDIRTY flags
in TLB entries to force the slow-path on writes. This is used to mark
page ranges containing code which has been translated so it can be
invalidated if written to. To do this safely we need to ensure the TLB
entries in question for all vCPUs are updated before we attempt to run
the code otherwise a race could be introduced.

To achieve this we atomically set the flag in tlb_reset_dirty_range and
take care when setting it when the TLB entry is filled.

On 32 bit systems attempting to emulate 64 bit guests we don't even
bother as we might not have the atomic primitives available. MTTCG is
disabled in this case and can't be forced on. The copy_tlb_helper
function helps keep the atomic semantics in one place to avoid
confusion.

The dirty helper function is made static as it isn't used outside of
cputlb.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
2017-02-24 10:32:46 +00:00
..
user linux-user: Use correct alignment for long long on i386 guests 2016-08-04 16:34:59 +03:00
address-spaces.h Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
cpu-all.h exec: introduce MemoryRegionCache 2016-12-22 16:00:23 +01:00
cpu-common.h exec: introduce memory_ldst.inc.c 2016-12-22 16:00:23 +01:00
cpu-defs.h qemu-common: stop including qemu/host-utils.h from qemu-common.h 2016-05-19 16:42:28 +02:00
cpu_ldst.h cpu_ldst.h: use correct guest address parameter 2016-11-22 23:26:51 +01:00
cpu_ldst_template.h trace: switch to modular code generation for sub-directories 2017-01-31 17:11:18 +00:00
cpu_ldst_useronly_template.h trace: switch to modular code generation for sub-directories 2017-01-31 17:11:18 +00:00
cputlb.h cputlb: atomically update tlb fields used by tlb_reset_dirty 2017-02-24 10:32:46 +00:00
exec-all.h cputlb and arm/sparc targets: convert mmuidx flushes from varg to bitmap 2017-02-24 10:32:46 +00:00
gdbstub.h linux-user: Remove redundant gdb_queuesig() 2016-06-07 16:39:07 +03:00
gen-icount.h tcg: Reorg TCGOp chaining 2016-08-05 21:44:18 +05:30
helper-gen.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
helper-head.h Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
helper-proto.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
helper-tcg.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
hwaddr.h hw: Clean up includes 2016-06-07 18:19:23 +03:00
ioport.h hw: clean up hw/hw.h includes 2016-05-19 16:42:30 +02:00
log.h log: do not unnecessarily include qom/cpu.h 2016-02-03 09:19:10 +00:00
memattrs.h hw/pci: Introduce pci_requester_id() 2015-10-19 10:13:07 +02:00
memory-internal.h memory: unregister AddressSpace MemoryListener within BQL 2015-02-10 10:25:44 -07:00
memory.h virtio: use MemoryRegionCache to access descriptors 2017-02-17 21:52:30 +02:00
poison.h cpu: move endian-dependent load/store functions to cpu-all.h 2016-05-19 16:42:28 +02:00
ram_addr.h ramblock-notifier: new 2017-01-16 17:52:35 +01:00
ramlist.h ramblock-notifier: new 2017-01-16 17:52:35 +01:00
semihost.h semihosting: add --semihosting-config arg sub-argument 2015-06-19 14:17:45 +01:00
softmmu-semi.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
tb-context.h tcg: Make tb_flush() thread safe 2016-09-27 11:57:30 +02:00
tb-hash-xx.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
tb-hash.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00