From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sasha Levin Subject: Re: [PATCH 2/2] kvm tools: Add ability to assert/deassert IRQs using 'kvm debug' Date: Tue, 13 Dec 2011 07:37:29 +0200 Message-ID: <1323754649.3269.13.camel@lappy> References: <1323681590-9812-1-git-send-email-levinsasha928@gmail.com> <1323681590-9812-2-git-send-email-levinsasha928@gmail.com> <1323725635.1428.300.camel@jaguar> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: mingo@elte.hu, gorcunov@gmail.com, asias.hejun@gmail.com, kvm@vger.kernel.org To: Pekka Enberg Return-path: Received: from mail-ee0-f46.google.com ([74.125.83.46]:48493 "EHLO mail-ee0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750711Ab1LMFhe (ORCPT ); Tue, 13 Dec 2011 00:37:34 -0500 Received: by eekc4 with SMTP id c4so1941818eek.19 for ; Mon, 12 Dec 2011 21:37:33 -0800 (PST) In-Reply-To: <1323725635.1428.300.camel@jaguar> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, 2011-12-12 at 23:33 +0200, Pekka Enberg wrote: > On Mon, 2011-12-12 at 11:19 +0200, Sasha Levin wrote: > > Add options to assert and deassert IRQs using 'kvm debug'. For example, to > > assert IRQ4 in guest 'my_instance': > > > > vm debug -n my_instance --assert_irq 4 > > > > Signed-off-by: Sasha Levin > > Why is this useful? How does it protect against random users asserting > IRQs in the guest? Mostly useful to debug hangs as it lets the user trigger an irq which wasn't triggered the way it was supposed to be triggered. We discussed doing this feature in when we were working on the virtio code and had random hangs which we believed were caused by our code not asserting IRQs the way it should be doing. This way we can do it manually to debug such issues. It doesn't prevent a user to shoot himself in the leg. -- Sasha.