aboutsummaryrefslogtreecommitdiff
path: root/cpus.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-01-21 14:15:04 +0000
committerPeter Maydell <peter.maydell@linaro.org>2016-01-21 14:15:04 +0000
commit12ebc9a76dd7702aef0a3618717a826c19c34ef4 (patch)
tree70d0166f73708d8efd64936cfe60a90476b1cd87 /cpus.c
parent56943e8cc14b7eeeab67d1942fa5d8bcafe3e53f (diff)
exec.c: Allow target CPUs to define multiple AddressSpaces
Allow multiple calls to cpu_address_space_init(); each call adds an entry to the cpu->ases array at the specified index. It is up to the target-specific CPU code to actually use these extra address spaces. Since this multiple AddressSpace support won't work with KVM, add an assertion to avoid confusing failures. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Diffstat (limited to 'cpus.c')
-rw-r--r--cpus.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/cpus.c b/cpus.c
index 787877aa24..725a51dac9 100644
--- a/cpus.c
+++ b/cpus.c
@@ -1375,6 +1375,7 @@ void qemu_init_vcpu(CPUState *cpu)
/* If the target cpu hasn't set up any address spaces itself,
* give it the default one.
*/
+ cpu->num_ases = 1;
cpu_address_space_init(cpu, &address_space_memory, 0);
}