qemu-e2k/include/exec
Peter Crosthwaite f0c02d15b5 memory: Add address_space_init_shareable()
This will either create a new AS or return a pointer to an
already existing equivalent one, if we have already created
an AS for the specified root memory region.

The motivation is to reuse address spaces as much as possible.
It's going to be quite common that bus masters out in device land
have pointers to the same memory region for their mastering yet
each will need to create its own address space. Let the memory
API implement sharing for them.

Aside from the perf optimisations, this should reduce the amount
of redundant output on info mtree as well.

Thee returned value will be malloced, but the malloc will be
automatically freed when the AS runs out of refs.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
[PMM: dropped check for NULL root as unused; added doc-comment;
 squashed Peter C's reference-counting patch into this one;
 don't compare name string when deciding if we can share ASes;
 read as->malloced before the unref of as->root to avoid possible
 read-after-free if as->root was the owner of as]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
2016-01-21 14:15:06 +00:00
..
user linux-user: Allocate thunk size dynamically 2015-06-15 11:36:58 +03:00
address-spaces.h
cpu_ldst_template.h softmmu: add helper function to pass through retaddr 2015-09-11 08:15:32 -07:00
cpu_ldst_useronly_template.h softmmu: add helper function to pass through retaddr 2015-09-11 08:15:32 -07:00
cpu_ldst.h softmmu: remove now unused functions 2015-09-11 08:16:05 -07:00
cpu-all.h translate-all: ensure host page mask is always extended with 1's 2015-12-02 13:12:30 +01:00
cpu-common.h qemu_ram_block_by_name 2015-11-10 14:51:48 +01:00
cpu-defs.h cpu_defs: Simplify CPUTLB padding logic 2015-08-06 12:04:08 +02:00
cputlb.h include/exec: Move cputlb exec.c defs out 2015-09-16 17:33:33 +02:00
exec-all.h exec.c: Add cpu_get_address_space() 2016-01-21 14:15:05 +00:00
gdbstub.h gdbstub: Implement gdb_do_syscallv() 2015-09-07 10:39:27 +01:00
gen-icount.h
helper-gen.h
helper-head.h
helper-proto.h
helper-tcg.h
hwaddr.h
ioport.h
memattrs.h hw/pci: Introduce pci_requester_id() 2015-10-19 10:13:07 +02:00
memory-internal.h
memory.h memory: Add address_space_init_shareable() 2016-01-21 14:15:06 +00:00
poison.h
ram_addr.h ivshmem: Store file descriptor for vhost-user negotiation 2016-01-09 23:20:20 +02:00
semihost.h semihosting: add --semihosting-config arg sub-argument 2015-06-19 14:17:45 +01:00
softmmu-semi.h include/exec/softmmu-semi.h: Add support for 64-bit values 2015-09-07 10:39:27 +01:00
tb-hash.h cpu-defs: Move out TB_JMP defines 2015-06-26 16:00:51 +02:00