From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyrill Gorcunov Subject: Re: [PATCH] kvm tools: Add 'kvm nmi' command Date: Wed, 7 Dec 2011 14:31:11 +0400 Message-ID: <20111207103111.GC21678@moon> References: <1323204175-17234-1-git-send-email-levinsasha928@gmail.com> <20111207102152.GP12507@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Sasha Levin , penberg@kernel.org, mingo@elte.hu, asias.hejun@gmail.com, kvm@vger.kernel.org To: Gleb Natapov Return-path: Received: from mail-ee0-f46.google.com ([74.125.83.46]:64919 "EHLO mail-ee0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753825Ab1LGKbP (ORCPT ); Wed, 7 Dec 2011 05:31:15 -0500 Received: by eekd41 with SMTP id d41so307995eek.19 for ; Wed, 07 Dec 2011 02:31:14 -0800 (PST) Content-Disposition: inline In-Reply-To: <20111207102152.GP12507@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Dec 07, 2011 at 12:21:52PM +0200, Gleb Natapov wrote: > On Tue, Dec 06, 2011 at 10:42:55PM +0200, Sasha Levin wrote: > > +static void handle_nmi(int fd, u32 type, u32 len, u8 *msg) > > +{ > > + u32 vcpu = *(u32 *)msg; > > + > > + ioctl(kvm_cpus[vcpu]->vcpu_fd, KVM_NMI); > > You need to check that vcpu apic's LINT1 is configured to receive > NMI (and not masked obviously) before injecting NMI. > I've been configuring mptable to have lint1 as nmi receiver, so it should remain so I suppose (if only we've not masked it somewhere else ;) Cyrill