From 4a1e40b5091bcff5f8ea3fe9963eaa8e76b16389 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Mon, 17 Dec 2012 19:39:30 +0100 Subject: xen: Simplify halting of first CPU MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the global first_cpu variable to halt the CPU rather than using a local first_cpu initialized from qemu_get_cpu(0). This will allow to change qemu_get_cpu() return type to CPUState despite use of the CPU_COMMON halted field in the reset handler. Signed-off-by: Andreas Färber --- xen-all.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'xen-all.c') diff --git a/xen-all.c b/xen-all.c index 19bcfd1510..110f958a53 100644 --- a/xen-all.c +++ b/xen-all.c @@ -585,9 +585,7 @@ static void xen_reset_vcpu(void *opaque) void xen_vcpu_init(void) { - CPUArchState *first_cpu; - - if ((first_cpu = qemu_get_cpu(0))) { + if (first_cpu != NULL) { qemu_register_reset(xen_reset_vcpu, first_cpu); xen_reset_vcpu(first_cpu); } -- cgit v1.2.1