From patchwork Mon Mar 28 11:19:56 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Isaku Yamahata X-Patchwork-Id: 88592 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E65B21007D1 for ; Mon, 28 Mar 2011 22:21:25 +1100 (EST) Received: from localhost ([127.0.0.1]:58819 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4AVd-0006v1-2g for incoming@patchwork.ozlabs.org; Mon, 28 Mar 2011 07:21:21 -0400 Received: from [140.186.70.92] (port=50974 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4AUN-0006rK-1h for qemu-devel@nongnu.org; Mon, 28 Mar 2011 07:20:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q4AUJ-0000GT-Pz for qemu-devel@nongnu.org; Mon, 28 Mar 2011 07:20:02 -0400 Received: from mail.valinux.co.jp ([210.128.90.3]:49366) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q4AUJ-0000Fe-Ba for qemu-devel@nongnu.org; Mon, 28 Mar 2011 07:19:59 -0400 Received: from ps.local.valinux.co.jp (vagw.valinux.co.jp [210.128.90.14]) by mail.valinux.co.jp (Postfix) with SMTP id F2F8218918; Mon, 28 Mar 2011 20:19:56 +0900 (JST) Received: (nullmailer pid 17657 invoked by uid 1000); Mon, 28 Mar 2011 11:19:56 -0000 Date: Mon, 28 Mar 2011 20:19:56 +0900 From: Isaku Yamahata To: "Michael S\. Tsirkin" Message-ID: <20110328111956.GF16639@valinux.co.jp> References: <20110327145629.GA7913@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20110327145629.GA7913@redhat.com> User-Agent: Mutt/1.5.19 (2009-01-05) X-Virus-Scanned: clamav-milter 0.95.2 at va-mail.local.valinux.co.jp X-Virus-Status: Clean X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 210.128.90.3 Cc: qemu-devel@nongnu.org Subject: [Qemu-devel] Re: [PATCH v5 0/4] piix_pci: optimize irq data path X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org On Sun, Mar 27, 2011 at 04:56:29PM +0200, Michael S. Tsirkin wrote: > On Wed, Mar 23, 2011 at 11:17:19AM +0900, Isaku Yamahata wrote: > > v4 has minor typo. I sent it too early. Here's fixed one. > > > > v3 -> v4 Main changes are > > - use pirq, pci_intx instead of irq_num in piix_pci.c > > - patch 4/4 cleans the code a bit > > With this applied e1000 fails to work for me. > Command line: > > qemu-system-x86_64 -enable-kvm -m 1G -drive > if=virtio,file=/home/mst/rhel6.qcow2 -netdev user,id=bar -net > nic,netdev=bar,model=e1000,macaddr=52:54:00:12:34:57 -redir > tcp:8022::22 -net nic,model=e1000,netdev=foo,macaddr=52:54:00:12:34:56 > -netdev > tap,id=foo,ifname=msttap0,script=/home/mst/ifup,downscript=no > -nographic > > Could you try that please? Does the following patch help? If so, I'll prepare v6. diff --git a/hw/piix_pci.c b/hw/piix_pci.c index c019793..5f0d92f 100644 --- a/hw/piix_pci.c +++ b/hw/piix_pci.c @@ -277,7 +277,8 @@ static void piix3_set_irq_pic(PIIX3State *piix3, int pic_irq) { qemu_set_irq(piix3->pic[pic_irq], !!(piix3->pic_levels & - ((PIIX_NUM_PIRQS - 1) << (pic_irq * PIIX_NUM_PIRQS)))); + (((1UL << PIIX_NUM_PIRQS) - 1) << + (pic_irq * PIIX_NUM_PIRQS)))); } static void piix3_set_irq_level(PIIX3State *piix3, int pirq, int level)