From: Alexander Graf <agraf@suse.de>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] PPC: Sync CPU state for KVM
Date: Tue, 24 Nov 2009 09:01:51 +0100 [thread overview]
Message-ID: <1259049712-8165-1-git-send-email-agraf@suse.de> (raw)
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>
---
hw/ppc_newworld.c | 4 ++++
hw/ppc_oldworld.c | 4 ++++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/hw/ppc_newworld.c b/hw/ppc_newworld.c
index da868d3..2f2f091 100644
--- a/hw/ppc_newworld.c
+++ b/hw/ppc_newworld.c
@@ -38,6 +38,7 @@
#include "ide.h"
#include "loader.h"
#include "elf.h"
+#include "kvm.h"
#define MAX_IDE_BUS 2
#define VGA_BIOS_SIZE 65536
@@ -134,6 +135,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);
diff --git a/hw/ppc_oldworld.c b/hw/ppc_oldworld.c
index 9b49a3d..4d89805 100644
--- a/hw/ppc_oldworld.c
+++ b/hw/ppc_oldworld.c
@@ -38,6 +38,7 @@
#include "ide.h"
#include "loader.h"
#include "elf.h"
+#include "kvm.h"
#define MAX_IDE_BUS 2
#define VGA_BIOS_SIZE 65536
@@ -162,6 +163,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,
--
1.6.0.2
next reply other threads:[~2009-11-24 8:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-24 8:01 Alexander Graf [this message]
2009-11-24 8:01 ` [Qemu-devel] [PATCH] PPC: Get MMU state on register sync Alexander Graf
2009-11-24 18:01 ` [Qemu-devel] " Jan Kiszka
2009-11-24 18:04 ` Alexander Graf
2009-11-24 18:12 ` Jan Kiszka
2009-11-24 18:14 ` Alexander Graf
2009-11-24 18:33 ` Jan Kiszka
2009-11-24 18:46 ` Alexander Graf
2009-11-24 18:49 ` Jan Kiszka
2009-11-24 18:53 ` Alexander Graf
2009-11-24 19:03 ` Jan Kiszka
2009-11-24 19:10 ` Alexander Graf
-- strict thread matches above, loose matches on Subject: below --
2009-12-02 22:20 [Qemu-devel] [PATCH] PPC: Sync CPU state for KVM Alexander Graf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1259049712-8165-1-git-send-email-agraf@suse.de \
--to=agraf@suse.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).