From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35809) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RYEkh-0005E7-QL for qemu-devel@nongnu.org; Wed, 07 Dec 2011 05:29:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RYEkd-0002Jm-4X for qemu-devel@nongnu.org; Wed, 07 Dec 2011 05:29:27 -0500 Received: from mx1.redhat.com ([209.132.183.28]:11205) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RYEkc-0002Jh-Rg for qemu-devel@nongnu.org; Wed, 07 Dec 2011 05:29:23 -0500 Message-ID: <4EDF3FF7.3030603@redhat.com> Date: Wed, 07 Dec 2011 12:29:11 +0200 From: Avi Kivity MIME-Version: 1.0 References: <20110913093835.GB4265@localhost.localdomain> <20110914093441.e2bb305c.kamezawa.hiroyu@jp.fujitsu.com> <4E705BC3.5000508@cn.fujitsu.com> <20110915164704.9cacd407.kamezawa.hiroyu@jp.fujitsu.com> <4E71B28F.7030201@cn.fujitsu.com> <4E72F3BA.2000603@jp.fujitsu.com> <4E73200A.7040908@jp.fujitsu.com> <4E76C6AA.9080403@cn.fujitsu.com> <4E7B04DC.1030407@cn.fujitsu.com> <4E7B4B8F.507@siemens.com> <4E7C51E4.2000503@cn.fujitsu.com> <4E7F3585.40108@redhat.com> <4E7F635E.6080009@web.de> <4E8035F9.9080908@redhat.com> <4E928B54.1070707@cn.fujitsu.com> <4E92958E.9000509@web.de> <4E9476E2.1070804@cn.fujitsu.com> <4E948842.4030406@web.de> <4E978827.6070008@cn.fujitsu.com> <4E97CE42.9020102@web.de> <4E97D85C.7070107@cn.fujitsu.com> <4E97DB62.9020605@web.de> <4E97FAC7.6080007@cn.fujitsu.com> <4E9AA657.1050503@redhat.com> <4E9BF821.2070805@cn.fujitsu.com> <4E9BFA40.5070806@redhat.com> <4E9C5106.5070506@cn.fujitsu.com> In-Reply-To: <4E9C5106.5070506@cn.fujitsu.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/1 V6] qemu-kvm: fix improper nmi emulation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Lai Jiangshan Cc: "kvm@vger.kernel.org" , "qemu-devel@nongnu.org" , Jan Kiszka , Sasha Levin , Kenji Kaneshige , KAMEZAWA Hiroyuki On 10/17/2011 06:00 PM, Lai Jiangshan wrote: > From: Lai Jiangshan > > Currently, NMI interrupt is blindly sent to all the vCPUs when NMI > button event happens. This doesn't properly emulate real hardware on > which NMI button event triggers LINT1. Because of this, NMI is sent to > the processor even when LINT1 is maskied in LVT. For example, this > causes the problem that kdump initiated by NMI sometimes doesn't work > on KVM, because kdump assumes NMI is masked on CPUs other than CPU0. > > With this patch, inject-nmi request is handled as follows. > > - When in-kernel irqchip is disabled, deliver LINT1 instead of NMI > interrupt. > - When in-kernel irqchip is enabled, get the in-kernel LAPIC states > and test the APIC_LVT_MASKED, if LINT1 is unmasked, and then > delivering the NMI directly. (Suggested by Jan Kiszka) > > Changed from old version: > re-implement it by the Jan's suggestion. > fix the race found by Jan. This patch fell through the cracks, sorry. Now applied. Sasha, this patch highlights the issues with KVM_NMI. -- error compiling committee.c: too many arguments to function