From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48279) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8QmP-0007Qp-U8 for qemu-devel@nongnu.org; Mon, 03 Sep 2012 03:09:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T8QmO-0003G5-NU for qemu-devel@nongnu.org; Mon, 03 Sep 2012 03:09:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59297) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8QmO-0003G0-F3 for qemu-devel@nongnu.org; Mon, 03 Sep 2012 03:09:04 -0400 Message-ID: <5044578A.1080104@redhat.com> Date: Mon, 03 Sep 2012 09:08:58 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1346640974-30974-1-git-send-email-mmogilvi_qemu@miniinfo.net> <1346640974-30974-6-git-send-email-mmogilvi_qemu@miniinfo.net> In-Reply-To: <1346640974-30974-6-git-send-email-mmogilvi_qemu@miniinfo.net> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 5/5] i8259: fix dynamically masking slave IRQs with IMR register List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Matthew Ogilvie Cc: Jan Kiszka , qemu-devel@nongnu.org Il 03/09/2012 04:56, Matthew Ogilvie ha scritto: > Although I haven't found any specs that say so, on real hardware > I have a test program that shows if you mask off the slave > interrupt (say IRQ14) in the IMR after it has already been raised, > the master (IRQ2) gets canceled (that is, IRQ2 acts like it is level > triggered). Without this patch, qemu delivers a > spurious interrupt (IRQ15) instead when running the test program. > > Signed-off-by: Matthew Ogilvie Nice testing, thanks! KVM's i8259 emulation can be patched at arch/x86/kvm/i8259.c in the Linux tree. You can write a test for kvm-unit-tests. These tests can be written in C, including interrupt handlers (see lib/x86/isr.h). The git tree is at git://git.kernel.org/pub/scm/virt/kvm/kvm-unit-tests.git. Paolo