From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH uq/master 2/2] kvm: forward INIT signals coming from the chipset Date: Sun, 10 Mar 2013 17:24:06 +0200 Message-ID: <20130310152406.GK24444@redhat.com> References: <1362811730-6716-1-git-send-email-pbonzini@redhat.com> <1362811730-6716-3-git-send-email-pbonzini@redhat.com> <20130310115439.GN11223@redhat.com> <513C9876.6090708@redhat.com> <20130310145524.GJ24444@redhat.com> <513CA107.5030602@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: jan.kiszka@siemens.com, mtosatti@redhat.com, qemu-devel@nongnu.org, kvm@vger.kernel.org To: Paolo Bonzini Return-path: Received: from mx1.redhat.com ([209.132.183.28]:64635 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752802Ab3CJPYM (ORCPT ); Sun, 10 Mar 2013 11:24:12 -0400 Content-Disposition: inline In-Reply-To: <513CA107.5030602@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, Mar 10, 2013 at 04:04:39PM +0100, Paolo Bonzini wrote: > Il 10/03/2013 15:55, Gleb Natapov ha scritto: > > > > Why not move INIT case from below as is? Vcpu is reset to correct sate > > > > by QEMU just like during system_reset. > > > > > > APs would not be able to receive SIPIs after executing do_cpu_init, > > > because they would stay in KVM_MP_STATE_RUNNABLE state. > > > > If APs are in runnable state after reset with in kernel irq chip we > > have a bug somewhere. > > Here is where we are resetting the processor. After clearing > CPU_INTERRUPT_INIT, no matter what else we do (such as resetting the > APIC and CPU), we need to set the mp_state to KVM_MP_STATE_INIT_RECEIVED. > > Or if we go with your simpler hypervisor patch, we need to go to either > KVM_MP_STATE_INIT_RECEIVED for APs (wait for SIPI) or > KVM_MP_STATE_SIPI_RECEIVED for the BSP (restart running from the reset > vector). > No need for KVM_MP_STATE_SIPI_RECEIVED. Just make it RUNNING. This is similar to system_reset path, not? UNINIT for AP, RUNNING for BSP. > > Should AP be able to get SIPI without INIT after trigger of INIT# line? > > Yes, the effect is the same for an INIT interrupt and the triggering of > INIT#. > Can you give me SDM pointer? -- Gleb.