From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH] kvm tools: Add 'kvm nmi' command Date: Wed, 7 Dec 2011 12:21:52 +0200 Message-ID: <20111207102152.GP12507@redhat.com> References: <1323204175-17234-1-git-send-email-levinsasha928@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: penberg@kernel.org, mingo@elte.hu, gorcunov@gmail.com, asias.hejun@gmail.com, kvm@vger.kernel.org To: Sasha Levin Return-path: Received: from mx1.redhat.com ([209.132.183.28]:28817 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753825Ab1LGKWJ (ORCPT ); Wed, 7 Dec 2011 05:22:09 -0500 Content-Disposition: inline In-Reply-To: <1323204175-17234-1-git-send-email-levinsasha928@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: 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. -- Gleb.