From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=59486 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q7uiX-00068D-17 for qemu-devel@nongnu.org; Thu, 07 Apr 2011 15:18:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q7uiV-0000O9-IK for qemu-devel@nongnu.org; Thu, 07 Apr 2011 15:18:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:23772) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q7uiV-0000O3-7b for qemu-devel@nongnu.org; Thu, 07 Apr 2011 15:18:07 -0400 Date: Thu, 7 Apr 2011 22:17:59 +0300 From: Gleb Natapov Subject: Re: [Qemu-devel] [PATCH 2/2 V7] qemu,qmp: add inject-nmi qmp command Message-ID: <20110407191759.GG7100@redhat.com> References: <4D9CAAF9.7000509@codemonkey.ws> <20110406150818.56707b9b@doriath> <4D9CAE4B.7080305@siemens.com> <20110406160020.373cb5a2@doriath> <4D9CC044.2000705@codemonkey.ws> <4D9E0352.2050204@codemonkey.ws> <20110407185108.GE7100@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Peter Maydell , Lai Jiangshan , Jiangshan , kvm@vger.kernel.org, Jan Kiszka , qemu-devel@nongnu.org, Markus Armbruster , Avi Kivity , Luiz Capitulino On Thu, Apr 07, 2011 at 10:04:00PM +0300, Blue Swirl wrote: > On Thu, Apr 7, 2011 at 9:51 PM, Gleb Natapov wrote: > > On Thu, Apr 07, 2011 at 01:32:50PM -0500, Anthony Liguori wrote: > >> On 04/07/2011 01:10 PM, Peter Maydell wrote: > >> >On 6 April 2011 20:34, Anthony Liguori =9Awrot= e: > >> >>http://publib.boulder.ibm.com/infocenter/lnxinfo/v3r0m0/index.jsp?to= pic=3D/liaai/crashdump/liaaicrashdumpnmiipmi.htm > >> >> > >> >>If an OS is totally hosed (spinning with interrupts disabled), and N= MI can > >> >>be used to generate a crash dump. > >> >> > >> >>It's a debug feature and modelling it exactly the way we are probabl= y makes > >> >>sense for other architectures too. =9AThe real semantics are basical= ly force > >> >>guest crash dump. > >> >Ah, right. (There isn't really an equivalent to this on ARM since > >> >we don't have a real NMI equivalent. So any implementation for ARM > >> >qemu would be board dependent since you could wire a watchdog up to > >> >any interrupt.) > >> > > >> >Should we try to pick a command name that says what it's supposed to > >> >do rather than how it happens to be implemented on x86 ? > >> > >> Yup, I was thinking the same thing after I sent the note above. =9AIf > >> we call it 'force-crash-dump', we can implement it as an NMI on > >> target-i386 and potentially as something else on a different target. > >> > > NMI does not have to generate crash dump on every guest we support. > > Actually even for windows guest it does not generate one without > > tweaking registry. For all I know there is a guest that checks mail when > > NMI arrives. Lets give meaningful name, like inject-nmi, for nmi > > injection command. >=20 > I'd prefer something more generic like these: > raise /apic@fee00000:l1int > lower /i44FX-pcihost/e1000@03.0/pinD >=20 > The clumsier syntax shouldn't be a problem, since this would be a > system developer tool. >=20 > Some kind of IRQ registration would be needed for this to work without > lots of changes. True. The ability to trigger any interrupt line is very useful for debugging. I often re-implement it during debug. -- Gleb.