From mboxrd@z Thu Jan 1 00:00:00 1970 From: Muli Ben-Yehuda Subject: Re: [PATCH 3/6] qemu: piix: Introduce functions to get pin number from irq and vice versa Date: Tue, 28 Oct 2008 12:12:52 +0200 Message-ID: <20081028101252.GG7102@il.ibm.com> References: <1224861988-22781-1-git-send-email-amit.shah@redhat.com> <1224861988-22781-2-git-send-email-amit.shah@redhat.com> <1224861988-22781-3-git-send-email-amit.shah@redhat.com> <1224861988-22781-4-git-send-email-amit.shah@redhat.com> <4904712C.1080307@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Amit Shah , kvm@vger.kernel.org, anthony@codemonkey.ws, weidong.han@intel.com, allen.m.kay@intel.com, Ben-Ami Yassour1 To: Avi Kivity Return-path: Received: from mtagate1.uk.ibm.com ([194.196.100.161]:58654 "EHLO mtagate1.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752277AbYJ1KNl (ORCPT ); Tue, 28 Oct 2008 06:13:41 -0400 Received: from d06nrmr1407.portsmouth.uk.ibm.com (d06nrmr1407.portsmouth.uk.ibm.com [9.149.38.185]) by mtagate1.uk.ibm.com (8.13.1/8.13.1) with ESMTP id m9SADbsp013908 for ; Tue, 28 Oct 2008 10:13:40 GMT Received: from d06av04.portsmouth.uk.ibm.com (d06av04.portsmouth.uk.ibm.com [9.149.37.216]) by d06nrmr1407.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id m9SADZ9D3883078 for ; Tue, 28 Oct 2008 10:13:35 GMT Received: from d06av04.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av04.portsmouth.uk.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m9SADYkG003292 for ; Tue, 28 Oct 2008 10:13:35 GMT Content-Disposition: inline In-Reply-To: <4904712C.1080307@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, Oct 26, 2008 at 03:31:24PM +0200, Avi Kivity wrote: > Amit Shah wrote: >> +int piix3_get_pin(int pic_irq) >> +{ >> + int i; >> + for (i = 0; i < 4; i++) >> + if (piix3_dev->config[0x60+i] == pic_irq) >> + return i; >> + return -1; >> +} >> > > What happens if two pci interrupts are routed to one irq line? This one I'm still thinking about. Cheers, Muli -- The First Workshop on I/O Virtualization (WIOV '08) Dec 2008, San Diego, CA, http://www.usenix.org/wiov08/ <-> SYSTOR 2009---The Israeli Experimental Systems Conference http://www.haifa.il.ibm.com/conferences/systor2009/