aboutsummaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorAlexey Kardashevskiy <aik@ozlabs.ru>2017-09-21 18:51:08 +1000
committerPaolo Bonzini <pbonzini@redhat.com>2017-09-22 01:06:51 +0200
commitb516572f31c0ea0937cd9d11d9bd72dd83809886 (patch)
treed056ca608f5ebee44b3aad58fc1e7695de14a6f4 /target
parent5e8fd947e2670c3c18f139de6a83fafcb56abbcc (diff)
downloadqemu-b516572f31c0ea0937cd9d11d9bd72dd83809886.zip
qemu-b516572f31c0ea0937cd9d11d9bd72dd83809886.tar.gz
qemu-b516572f31c0ea0937cd9d11d9bd72dd83809886.tar.bz2
memory: Get rid of address_space_init_shareable
Since FlatViews are shared now and ASes not, this gets rid of address_space_init_shareable(). This should cause no behavioural change. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Message-Id: <20170921085110.25598-17-aik@ozlabs.ru> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target')
-rw-r--r--target/arm/cpu.c16
-rw-r--r--target/i386/cpu.c5
2 files changed, 11 insertions, 10 deletions
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index 20a3445..f61ca66 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -684,6 +684,9 @@ static void arm_cpu_realizefn(DeviceState *dev, Error **errp)
CPUARMState *env = &cpu->env;
int pagebits;
Error *local_err = NULL;
+#ifndef CONFIG_USER_ONLY
+ AddressSpace *as;
+#endif
cpu_exec_realizefn(cs, &local_err);
if (local_err != NULL) {
@@ -874,24 +877,21 @@ static void arm_cpu_realizefn(DeviceState *dev, Error **errp)
#ifndef CONFIG_USER_ONLY
if (cpu->has_el3 || arm_feature(env, ARM_FEATURE_M_SECURITY)) {
- AddressSpace *as;
+ as = g_new0(AddressSpace, 1);
cs->num_ases = 2;
if (!cpu->secure_memory) {
cpu->secure_memory = cs->memory;
}
- as = address_space_init_shareable(cpu->secure_memory,
- "cpu-secure-memory");
+ address_space_init(as, cpu->secure_memory, "cpu-secure-memory");
cpu_address_space_init(cs, as, ARMASIdx_S);
} else {
cs->num_ases = 1;
}
-
- cpu_address_space_init(cs,
- address_space_init_shareable(cs->memory,
- "cpu-memory"),
- ARMASIdx_NS);
+ as = g_new0(AddressSpace, 1);
+ address_space_init(as, cs->memory, "cpu-memory");
+ cpu_address_space_init(cs, as, ARMASIdx_NS);
#endif
qemu_init_vcpu(cs);
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 0aa28fc..98732cd 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -3738,10 +3738,11 @@ static void x86_cpu_realizefn(DeviceState *dev, Error **errp)
#ifndef CONFIG_USER_ONLY
if (tcg_enabled()) {
- AddressSpace *as_normal = address_space_init_shareable(cs->memory,
- "cpu-memory");
+ AddressSpace *as_normal = g_new0(AddressSpace, 1);
AddressSpace *as_smm = g_new(AddressSpace, 1);
+ address_space_init(as_normal, cs->memory, "cpu-memory");
+
cpu->cpu_as_mem = g_new(MemoryRegion, 1);
cpu->cpu_as_root = g_new(MemoryRegion, 1);