From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:59443) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QO7iQ-0006CM-3p for qemu-devel@nongnu.org; Sun, 22 May 2011 08:25:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QO7iO-0006ZO-QK for qemu-devel@nongnu.org; Sun, 22 May 2011 08:25:02 -0400 Received: from moutng.kundenserver.de ([212.227.126.187]:53459) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QO7iO-0006Z1-By for qemu-devel@nongnu.org; Sun, 22 May 2011 08:25:00 -0400 Message-ID: <4DD9008D.7080204@mail.berlios.de> Date: Sun, 22 May 2011 14:24:45 +0200 From: Stefan Weil MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v7 3/4] piix_pci: optimize set irq path List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Isaku Yamahata Cc: qemu-devel@nongnu.org, mst@redhat.com Am 01.04.2011 13:43, schrieb Isaku Yamahata: > optimize irq routing in piix_pic.c which has been a TODO. > So far piix3 tracks each pirq level and checks whether a given pic pins is > asserted by seeing if each pirq is mapped into the pic pin. > This is independent on irq routing, but data path is on slow path. > > Given that irq routing is rarely changed and asserting pic pins is on > data path, the path that asserts pic pins should be optimized and > chainging irq routing should be on slow path. > The new behavior with this patch series is to use bitmap which is > addressed > by pirq and pic pins with a given irq routing. > When pirq is asserted, the bitmap is set and see if the pic pins is > asserted by checking the bitmaps. > When irq routing is changed, rebuild the bitmap and re-assert pic pins. > > test: > - create VM with 4 e1000 nics in different pci slots > (i.e. fn=0 for each e1000) > Thus those e1000's INTA are connected to each PIRQ[A-D]. > - run linux as guest and saw each devices triggers interrupt > by seeing /proc/interrupts. And then confirmed that each PIRQ[A-D] > surely asserted interrupts. > Because irq 10 and 11 are shared by 4 e1000's, it only one NIC is > activated > with ifconfig ethN up/down when counting interrupts. > > Cc: Michael S. Tsirkin > Signed-off-by: Isaku Yamahata > --- > Changes v4 -> v5: > - fix piix_set_irq_pic() > > Changes v3 -> v4: > - replace irq_num with pirq or pci_intx > > Changes v1 -> v2: > - some minor clean ups > - commit log message > --- > hw/piix_pci.c | 101 > +++++++++++++++++++++++++++++++++++++++++++++++--------- > 1 files changed, 84 insertions(+), 17 deletions(-) > > diff --git a/hw/piix_pci.c b/hw/piix_pci.c > index 35e420c..7ffb821 100644 > --- a/hw/piix_pci.c > +++ b/hw/piix_pci.c ... Hi, I got a regression report which was obviously caused by this commit: $ git bisect bad ab431c283e7055bcd6fb622f212bb29e84a6a134 is the first bad commit commit ab431c283e7055bcd6fb622f212bb29e84a6a134 Author: Isaku Yamahata Date: Fri Apr 1 20:43:23 2011 +0900 My test scenario: i386-softmmu/qemu -L pc-bios -cdrom tinycore_3.5.1.iso -m 256 -boot d -net nic -net user -net dump * Boot the default configuration (tinycore, or tinycore debug). * Wait until X Windows is up. * Check the size of qemu*.pcap. If it is only a few bytes, the test failed. Emulated networking then does not work, Tinycore does not get an IP address via DHCP. The original report used tinycore_3.6.iso and the latest w32 binaries from qemu.weilnetz.de with the same result. It also says that other Linux distributions show the same problem (Fedora-14-i686-Live-Desktop.iso). Regards Stefan W.