]> xenbits.xensource.com Git - qemu-upstream-4.6-testing.git/commitdiff
targe-ppc: Sync CPU state for KVM
authorAlexander Graf <agraf@suse.de>
Wed, 2 Dec 2009 22:20:29 +0000 (23:20 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Thu, 3 Dec 2009 19:20:43 +0000 (20:20 +0100)
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: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
hw/ppc_newworld.c
hw/ppc_oldworld.c

index 7579ddd3402087cc173f876987a8203ccdb9e6de..b29a7bc103ad9a7a39889c0f5da3b23a8313abb3 100644 (file)
@@ -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);
index 32fd03a900bcdfaca8c1f3f2bdfdeaacb683c153..c90b1514870024cc99b12e587be4b611b2bb452e 100644 (file)
@@ -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,