From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kip4l-00010k-9f for qemu-devel@nongnu.org; Thu, 25 Sep 2008 07:32:03 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kip4j-00010Y-LB for qemu-devel@nongnu.org; Thu, 25 Sep 2008 07:32:01 -0400 Received: from [199.232.76.173] (port=37557 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kip4j-00010R-En for qemu-devel@nongnu.org; Thu, 25 Sep 2008 07:32:01 -0400 Received: from il.qumranet.com ([212.179.150.194]:11316) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kip4j-0004g9-07 for qemu-devel@nongnu.org; Thu, 25 Sep 2008 07:32:01 -0400 Received: from gleb-debian.qumranet.com (gleb-debian.qumranet.com.qumranet.com [172.16.15.143]) by il.qumranet.com (Postfix) with ESMTP id 652E4250A43 for ; Thu, 25 Sep 2008 14:31:54 +0300 (IDT) Date: Thu, 25 Sep 2008 14:31:53 +0300 From: Gleb Natapov Message-ID: <20080925113153.GB7754@minantech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] Reset CPU on INIT IPI Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org INIT IPI should reset CPU. Also non boot CPU should be halted. It will be un-halted by SIPI. Signed-off-by: Gleb Natapov diff --git a/hw/apic.c b/hw/apic.c index 64e75ad..1a44c3a 100644 --- a/hw/apic.c +++ b/hw/apic.c @@ -458,6 +458,11 @@ static void apic_init_ipi(APICState *s) s->initial_count = 0; s->initial_count_load_time = 0; s->next_time = 0; + + cpu_reset(s->cpu_env); + + if (!(s->apicbase & MSR_IA32_APICBASE_BSP)) + s->cpu_env->halted = 1; } /* send a SIPI message to the CPU to start it */ -- Gleb.