From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: KVM: x86: better fix for race between nmi injection and enabling nmi window Date: Thu, 31 Mar 2011 06:40:24 -0300 Message-ID: <20110331094024.GB7259@amt.cnet> References: <20110330163028.GA27365@amt.cnet> <4D936572.3060801@redhat.com> <20110330184703.GC7741@redhat.com> <4D944810.3070702@redhat.com> <20110331092445.GA1964@redhat.com> <4D94489A.9060705@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Gleb Natapov , kvm To: Avi Kivity Return-path: Received: from mx1.redhat.com ([209.132.183.28]:7684 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752743Ab1CaJkj (ORCPT ); Thu, 31 Mar 2011 05:40:39 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p2V9ed9E017495 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 31 Mar 2011 05:40:39 -0400 Content-Disposition: inline In-Reply-To: <4D94489A.9060705@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Mar 31, 2011 at 11:25:46AM +0200, Avi Kivity wrote: > >> >> > else if (kvm_cpu_has_interrupt(vcpu) || req_int_win) > >> >> > kvm_x86_ops->enable_irq_window(vcpu); > >> >> > > >> >> > >> >> What about the check in inject_pending_events()? > >> >> > >> >Didn't we decide that this check is not a problem? Worst that can happen > >> >is NMI injection will be delayed till next exit. > >> > >> Could be very far in the future. > >> > >Next host interrupt. But with tickles host and guest yeah. > > > > esp. important with NMI, which may be used in a situation where your > tick (and everything else) are dead. Well the host must be alive. So eventually NMI will be delivered to the guest, but not closely matching guest visible clocks. What is the problem with that? The race should be rare enough to not interfere with NMI watchdog-like things?