From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 1/1 V3] kernel/kvm: fix improper nmi emulation Date: Sun, 16 Oct 2011 10:54:13 +0200 Message-ID: <4E9A9BB5.60008@redhat.com> 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> <4E928B4E.2080207@cn.fujitsu.com> <4E92C86D.9000701@redhat.com> <4E947628.6020105@cn.fujitsu.com> <4E94858C.7060307@web.de> <4E978857.1080106@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: "qemu-devel@nongnu.org" , Jan Kiszka , "kvm@vger.kernel.org" , KAMEZAWA Hiroyuki , Kenji Kaneshige To: Lai Jiangshan Return-path: In-Reply-To: <4E978857.1080106@cn.fujitsu.com> 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 List-Id: kvm.vger.kernel.org On 10/14/2011 02:54 AM, Lai Jiangshan wrote: > From: Kenji Kaneshige > > 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, KVM_NMI ioctl is handled as follows. > > - When in-kernel irqchip is enabled, KVM_NMI ioctl is handled as a > request of triggering LINT1 on the processor. LINT1 is emulated in > in-kernel irqchip. > > - When in-kernel irqchip is disabled, KVM_NMI ioctl is handled as a > request of injecting NMI to the processor. This assumes LINT1 is > already emulated in userland. > > (laijs) Add KVM_NMI API document > > Signed-off-by: Kenji Kaneshige > Tested-by: Lai Jiangshan > Patch looks good, but please add your own sign-off (it needs to be added even if you just forward the patch, and even more if you modify it). -- error compiling committee.c: too many arguments to function