From patchwork Tue Jan 15 09:27:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 212090 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id F22372C00A6 for ; Tue, 15 Jan 2013 21:55:31 +1100 (EST) Received: from localhost ([::1]:43919 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tv2ok-0002mH-2l for incoming@patchwork.ozlabs.org; Tue, 15 Jan 2013 04:28:26 -0500 Received: from eggs.gnu.org ([208.118.235.92]:57868) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tv2oL-0002GU-Gq for qemu-devel@nongnu.org; Tue, 15 Jan 2013 04:28:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tv2oK-0000bb-CN for qemu-devel@nongnu.org; Tue, 15 Jan 2013 04:28:01 -0500 Received: from cantor2.suse.de ([195.135.220.15]:41022 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tv2oK-0000bW-6Q for qemu-devel@nongnu.org; Tue, 15 Jan 2013 04:28:00 -0500 Received: from relay2.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 8714CA51FF; Tue, 15 Jan 2013 10:27:59 +0100 (CET) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Tue, 15 Jan 2013 10:27:24 +0100 Message-Id: <1358242058-1404-7-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1358242058-1404-1-git-send-email-afaerber@suse.de> References: <1358242058-1404-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 195.135.220.15 Cc: "open list:X86" , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Stefano Stabellini Subject: [Qemu-devel] [PATCH 06/20] xen: Simplify halting of first CPU X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 Acked-by: Stefano Stabellini --- xen-all.c | 4 +--- 1 Datei geändert, 1 Zeile hinzugefügt(+), 3 Zeilen entfernt(-) diff --git a/xen-all.c b/xen-all.c index 19bcfd1..110f958 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); }