SHA256
1
0
forked from pool/qemu
qemu/0041-kvm-ppc-halt-secondary-cpus-when-guest-reset.patch
Alexander Graf f0bf933e69 - qemu-user: add fix for deadloop with ulimit constraints
- qemu-user: add device mapper and loopback ioctls, enabling kpatkx

OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=40
2012-01-31 23:10:40 +00:00

46 lines
1.3 KiB
Diff

From 0ae672e84c7f722aebdcca35f1573e7b6f83fddd Mon Sep 17 00:00:00 2001
From: Liu Yu-B13201 <Yu.Liu@freescale.com>
Date: Mon, 28 Nov 2011 20:41:18 +0000
Subject: [PATCH] kvm-ppc: halt secondary cpus when guest reset
When guest reset, we need to halt secondary cpus until guest kick them.
This already works for tcg. The patch add the support for kvm.
Signed-off-by: Liu Yu <yu.liu@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
[agraf: remove in-kernel irqchip code]
(cherry picked from commit 157feeadbaec09fe4dca539a24f6f6d327d6eeb6)
---
hw/ppce500_spin.c | 1 +
target-ppc/kvm.c | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/hw/ppce500_spin.c b/hw/ppce500_spin.c
index cccd940..2b52728 100644
--- a/hw/ppce500_spin.c
+++ b/hw/ppce500_spin.c
@@ -112,6 +112,7 @@ static void spin_kick(void *data)
env->halted = 0;
env->exception_index = -1;
+ env->stopped = 0;
qemu_cpu_kick(env);
}
diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c
index 923677c..9541626 100644
--- a/target-ppc/kvm.c
+++ b/target-ppc/kvm.c
@@ -504,7 +504,7 @@ void kvm_arch_post_run(CPUState *env, struct kvm_run *run)
int kvm_arch_process_async_events(CPUState *env)
{
- return 0;
+ return env->halted;
}
static int kvmppc_handle_halt(CPUState *env)
--
1.6.0.2