qemu/include/exec
Avi Kivity 86a8623692 memory: limit sections in the radix tree to the actual address space size
The radix tree is statically sized to fit TARGET_PHYS_ADDR_SPACE_BITS.
If a larger memory region is registered, it will overflow.

Fix by limiting any section in the radix tree to the supported size.

This problem was not observed earlier since artificial regions (containers
and aliases) are eliminated by the memory core, leaving only device regions
which have reasonable sizes.  An IOMMU however cannot be eliminated by the
memory core, and may have an artificial size.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Avi Kivity <avi.kivity@gmail.com>
[ Fail the build if TARGET_PHYS_ADDR_SPACE_BITS is too large - Paolo ]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-05-24 18:43:35 +02:00
..
user elfload: use abi_llong/ullong instead of target_llong/ullong 2013-04-18 14:12:31 +02:00
address-spaces.h exec: move include files to include/exec/ 2012-12-19 08:31:31 +01:00
cpu-all.h cpu: Pass CPUState to cpu_interrupt() 2013-03-12 10:35:55 +01:00
cpu-common.h exec: eliminate stq_phys_notdirty 2013-05-24 18:42:27 +02:00
cpu-defs.h elfload: use abi_llong/ullong instead of target_llong/ullong 2013-04-18 14:12:31 +02:00
cputlb.h exec: move include files to include/exec/ 2012-12-19 08:31:31 +01:00
def-helper.h exec: move include files to include/exec/ 2012-12-19 08:31:31 +01:00
exec-all.h tcg-arm: Convert to CONFIG_QEMU_LDST_OPTIMIZATION 2013-04-27 02:16:45 +02:00
gdbstub.h cpu: Move host_tid field to CPUState 2013-02-16 14:50:59 +01:00
gen-icount.h tcg: Don't make exitreq flag a local temporary 2013-03-09 18:16:43 +01:00
hwaddr.h exec: move include files to include/exec/ 2012-12-19 08:31:31 +01:00
ioport.h exec: move include files to include/exec/ 2012-12-19 08:31:31 +01:00
iorange.h exec: move include files to include/exec/ 2012-12-19 08:31:31 +01:00
memory-internal.h exec: make qemu_get_ram_ptr private 2013-05-24 18:42:21 +02:00
memory.h memory: limit sections in the radix tree to the actual address space size 2013-05-24 18:43:35 +02:00
poison.h exec: eliminate stq_phys_notdirty 2013-05-24 18:42:27 +02:00
softmmu_defs.h exec: move include files to include/exec/ 2012-12-19 08:31:31 +01:00
softmmu_exec.h exec: move include files to include/exec/ 2012-12-19 08:31:31 +01:00
softmmu_header.h exec: move include files to include/exec/ 2012-12-19 08:31:31 +01:00
softmmu_template.h misc: move include files to include/qemu/ 2012-12-19 08:32:39 +01:00
softmmu-semi.h exec: move include files to include/exec/ 2012-12-19 08:31:31 +01:00
spinlock.h exec: move include files to include/exec/ 2012-12-19 08:31:31 +01:00