From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH 1/1] Disable GUEST_INTR_STATE_STI flag before injecting NMI to guest on VMX Date: Fri, 27 Aug 2010 13:23:06 +0200 Message-ID: <4C77A01A.70702@siemens.com> References: <1282853162-16925-1-git-send-email-Jes.Sorensen@redhat.com> <1282853162-16925-2-git-send-email-Jes.Sorensen@redhat.com> <4C7776F9.4070306@siemens.com> <4C778909.2030509@redhat.com> <20100827111650.GB21909@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Avi Kivity , "Jes.Sorensen@redhat.com" , "kvm@vger.kernel.org" To: Gleb Natapov Return-path: Received: from goliath.siemens.de ([192.35.17.28]:15387 "EHLO goliath.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753626Ab0H0LXU (ORCPT ); Fri, 27 Aug 2010 07:23:20 -0400 In-Reply-To: <20100827111650.GB21909@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Gleb Natapov wrote: > On Fri, Aug 27, 2010 at 12:44:41PM +0300, Avi Kivity wrote: >>> Thinking about the implications: Independent of virtualization, this >>> means that no code code can in any way rely on the STI shadow if there >>> are NMIs present that could "consume" it. Because after return from >>> those NMIs, interrupts could then be injected on the instruction that >>> was originally under the shadow. >>> >> Wow. Maybe we should request an interrupt window instead when >> blocked-by-STI is active instead of clearing it. >> > Wow indeed. We can remember blocked by sti state before injecting NMI > and request nmi window open exit. When we get nmi window open exit we > can restore blocked by sti flag. For sure we could. But I still wonder what happens to the shadow in such a scenario on real HW. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux