提交 dc702288 编写于 作者: A Alexander Graf 提交者: Aurelien Jarno

targe-ppc: Sync CPU state for KVM

Some recent change made PPC guests always start at address 0x0 because env
isn't synced to kvm_state on first bootup.

I'm not sure if this is the correct bugfix, but at least it makes PPC boot
again with KVM enabled.
Signed-off-by: NAlexander Graf <agraf@suse.de>
Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
上级 ba5e5090
......@@ -39,6 +39,7 @@
#include "ide.h"
#include "loader.h"
#include "elf.h"
#include "kvm.h"
#define MAX_IDE_BUS 2
#define VGA_BIOS_SIZE 65536
......@@ -135,6 +136,9 @@ 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);
......
......@@ -39,6 +39,7 @@
#include "ide.h"
#include "loader.h"
#include "elf.h"
#include "kvm.h"
#define MAX_IDE_BUS 2
#define VGA_BIOS_SIZE 65536
......@@ -163,6 +164,9 @@ 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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册