From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 13/15] Add NMI injection support to SVM. Date: Sun, 19 Apr 2009 17:57:56 +0300 Message-ID: <49EB3BF4.50003@redhat.com> References: <20090419131735.GG10126@redhat.com> <49EB26BA.9020200@web.de> <20090419133222.GK10126@redhat.com> <49EB29E3.5030901@redhat.com> <20090419134143.GM10126@redhat.com> <49EB2A70.5020200@redhat.com> <20090419134433.GN10126@redhat.com> <87r5zoenyf.fsf@tabernacle.lan> <20090419141305.GP10126@redhat.com> <49EB3335.6030607@redhat.com> <20090419142915.GR10126@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Julian Stecklina , kvm@vger.kernel.org To: Gleb Natapov Return-path: Received: from mx2.redhat.com ([66.187.237.31]:52995 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757979AbZDSO61 (ORCPT ); Sun, 19 Apr 2009 10:58:27 -0400 In-Reply-To: <20090419142915.GR10126@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Gleb Natapov wrote: > On Sun, Apr 19, 2009 at 05:20:37PM +0300, Avi Kivity wrote: > >> Gleb Natapov wrote: >> >>>> Could you elaborate on that? How/why does it use NMIs for task >>>> switching? >>>> >>>> >>>> >>> During WHQL testing (or if you just enable verifier on windows 2003) >>> windows changes hibernate to not power down a PC, but resume >>> immediately. During this immediate resume it sends NMI to non-boot CPUs >>> while IDT for nmi is configured as a task gate. I am not sure it >>> actually calls IRET after that. >>> >>> >> If it doesn't call IRET, it will never see another NMI. >> >> But of course it will execute IRET, as part of normal execution. You >> can't do anything without it. >> >> > Boot CPU can send INIT after task switch (and I think this is what > happens). > But eventually it will execute IRET. (We need to fix INIT to clear the NMI blocking flag, not that it matters so much) -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.