From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v2] KVM: Fix simultaneous NMIs Date: Tue, 20 Sep 2011 20:28:03 +0300 Message-ID: <4E78CD23.5000705@redhat.com> References: <1316515394-24762-1-git-send-email-avi@redhat.com> <20110920132537.GA27075@amt.cnet> <4E789B72.2050904@redhat.com> <20110920145946.GA28219@amt.cnet> <4E78BE21.4070508@redhat.com> <20110920163021.GA29618@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Jan Kiszka To: Marcelo Tosatti Return-path: Received: from mx1.redhat.com ([209.132.183.28]:20010 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751050Ab1ITR2I (ORCPT ); Tue, 20 Sep 2011 13:28:08 -0400 In-Reply-To: <20110920163021.GA29618@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: On 09/20/2011 07:30 PM, Marcelo Tosatti wrote: > > > > > >> We do have a small issue. If we exit during NMI-blocked-by-STI and > > >> nmi_pending == 2, then we lose the second interrupt. Should rarely > > >> happen, since external interrupts never exit in that condition, but > > >> it's a wart. > > > > > >And the above system reset case, you should be able to handle it by > > >saving/restoring nmi_queued (so that QEMU can zero it in vcpu_reset). > > > > We could just add a KVM_CAP (and flag) that extends nmi_pending from > > a bool to a counter. > > Or just add a new field to the pad. > Okay; I'll address this in a follow-on patch (my preference is making nmi_pending a counter). -- error compiling committee.c: too many arguments to function