diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-01-21 14:15:04 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-01-21 14:15:04 +0000 |
commit | 12ebc9a76dd7702aef0a3618717a826c19c34ef4 (patch) | |
tree | 70d0166f73708d8efd64936cfe60a90476b1cd87 /target-i386 | |
parent | 56943e8cc14b7eeeab67d1942fa5d8bcafe3e53f (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 'target-i386')
-rw-r--r-- | target-i386/cpu.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 36fae2dc26..4430494085 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -2878,6 +2878,7 @@ static void x86_cpu_realizefn(DeviceState *dev, Error **errp) memory_region_add_subregion_overlap(cpu->cpu_as_root, 0, cpu->cpu_as_mem, 0); memory_region_set_enabled(cpu->cpu_as_mem, true); address_space_init(newas, cpu->cpu_as_root, "CPU"); + cs->num_ases = 1; cpu_address_space_init(cs, newas, 0); /* ... SMRAM with higher priority, linked from /machine/smram. */ |