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) -- yamahata