aboutsummaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2010-03-04 09:14:24 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2010-03-04 09:14:24 -0600
commitf374e826e340ea1e2de2e9b006b3ac5dbde1324f (patch)
treeb671d3bee2582bb9de531eaeb4724dfc8ddf8881 /hw
parent78728c92a4137a96f1d0c49496d02dd9aa9d71b6 (diff)
parent6cb2996cef5e273ef370e690e84b5e1403f5c391 (diff)
Merge remote branch 'qemu-kvm/uq/master' into pulls
Diffstat (limited to 'hw')
-rw-r--r--hw/apic.c2
-rw-r--r--hw/pc.c14
-rw-r--r--hw/ppc_newworld.c3
-rw-r--r--hw/ppc_oldworld.c3
-rw-r--r--hw/s390-virtio.c1
5 files changed, 4 insertions, 19 deletions
diff --git a/hw/apic.c b/hw/apic.c
index 87e7dc0ba..3c90f4c84 100644
--- a/hw/apic.c
+++ b/hw/apic.c
@@ -938,8 +938,6 @@ static void apic_reset(void *opaque)
APICState *s = opaque;
int bsp;
- cpu_synchronize_state(s->cpu_env);
-
bsp = cpu_is_bsp(s->cpu_env);
s->apicbase = 0xfee00000 |
(bsp ? MSR_IA32_APICBASE_BSP : 0) | MSR_IA32_APICBASE_ENABLE;
diff --git a/hw/pc.c b/hw/pc.c
index 4f6a5228f..e50a48848 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -760,7 +760,8 @@ static void pc_init_ne2k_isa(NICInfo *nd)
int cpu_is_bsp(CPUState *env)
{
- return env->cpuid_apic_id == 0;
+ /* We hard-wire the BSP to the first CPU. */
+ return env->cpu_index == 0;
}
static CPUState *pc_new_cpu(const char *cpu_model)
@@ -833,18 +834,11 @@ static void pc_init1(ram_addr_t ram_size,
vmport_init();
/* allocate RAM */
- ram_addr = qemu_ram_alloc(0xa0000);
+ ram_addr = qemu_ram_alloc(below_4g_mem_size);
cpu_register_physical_memory(0, 0xa0000, ram_addr);
-
- /* Allocate, even though we won't register, so we don't break the
- * phys_ram_base + PA assumption. This range includes vga (0xa0000 - 0xc0000),
- * and some bios areas, which will be registered later
- */
- ram_addr = qemu_ram_alloc(0x100000 - 0xa0000);
- ram_addr = qemu_ram_alloc(below_4g_mem_size - 0x100000);
cpu_register_physical_memory(0x100000,
below_4g_mem_size - 0x100000,
- ram_addr);
+ ram_addr + 0x100000);
/* above 4giga memory allocation */
if (above_4g_mem_size > 0) {
diff --git a/hw/ppc_newworld.c b/hw/ppc_newworld.c
index bc86c851e..d4f9013fe 100644
--- a/hw/ppc_newworld.c
+++ b/hw/ppc_newworld.c
@@ -167,9 +167,6 @@ static void ppc_core99_init (ram_addr_t ram_size,
envs[i] = env;
}
- /* Make sure all register sets take effect */
- cpu_synchronize_state(env);
-
/* allocate RAM */
ram_offset = qemu_ram_alloc(ram_size);
cpu_register_physical_memory(0, ram_size, ram_offset);
diff --git a/hw/ppc_oldworld.c b/hw/ppc_oldworld.c
index 04a78358d..93c95ba65 100644
--- a/hw/ppc_oldworld.c
+++ b/hw/ppc_oldworld.c
@@ -165,9 +165,6 @@ static void ppc_heathrow_init (ram_addr_t ram_size,
envs[i] = env;
}
- /* Make sure all register sets take effect */
- cpu_synchronize_state(env);
-
/* allocate RAM */
if (ram_size > (2047 << 20)) {
fprintf(stderr,
diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c
index 358272837..ad3386f60 100644
--- a/hw/s390-virtio.c
+++ b/hw/s390-virtio.c
@@ -185,7 +185,6 @@ static void s390_init(ram_addr_t ram_size,
exit(1);
}
- cpu_synchronize_state(env);
env->psw.addr = KERN_IMAGE_START;
env->psw.mask = 0x0000000180000000ULL;
}