From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [PATCH qom-cpu 6/7] xen: Simplify halting of first CPU Date: Wed, 19 Dec 2012 16:31:10 +0100 Message-ID: <1355931071-22100-7-git-send-email-afaerber@suse.de> References: <1355931071-22100-1-git-send-email-afaerber@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <1355931071-22100-1-git-send-email-afaerber@suse.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org To: qemu-devel@nongnu.org Cc: "open list:X86" , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Stefano Stabellini List-Id: xen-devel@lists.xenproject.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=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 daf43b9..e87ed7a 100644 --- a/xen-all.c +++ b/xen-all.c @@ -584,9 +584,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