From mboxrd@z Thu Jan 1 00:00:00 1970 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 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Tue, 15 Jan 2013 10:27:24 +0100 Message-Id: <1358242058-1404-7-git-send-email-afaerber@suse.de> 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 06/20] xen: Simplify halting of first CPU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: "open list:X86" , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Stefano Stabellini 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=C3=A4rber --- xen-all.c | 4 +--- 1 Datei ge=C3=A4ndert, 1 Zeile hinzugef=C3=BCgt(+), 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) =20 void xen_vcpu_init(void) { - CPUArchState *first_cpu; - - if ((first_cpu =3D qemu_get_cpu(0))) { + if (first_cpu !=3D NULL) { qemu_register_reset(xen_reset_vcpu, first_cpu); xen_reset_vcpu(first_cpu); } --=20 1.7.10.4