piix_pci: fix piix3_set_irq_pic()
PATCH 1/1 piix_pci: fix piix3_set_irq_pic()
If pic_irq is greater than 7, the irq level is always 0 on 32bits.
--- hw/piix_pci.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
hw/piix_pci.c +0 -0
@@ -312,7 +312,7 @@ static void piix3_set_irq_pic(PIIX3State *piix3,
int pic_irq)
{
qemu_set_irq(piix3->pic[pic_irq],
!!(piix3->pic_levels &
- (((1UL << PIIX_NUM_PIRQS) - 1) <<
+ (((1ULL << PIIX_NUM_PIRQS) - 1) <<
(pic_irq * PIIX_NUM_PIRQS))));}
Signature · 3 lines
1.7.3.1.msysgit.0 -- SUN OF A BEACH
Stefan Hajnoczi
AppliedQuoted 6 lines · TeLeMan
If
pic_irqis greater than 7, the irq level is always 0 on 32bits.Signed-off-by TeLeMan <[email protected]>---
hw/piix_pci.c | 2 +-1 files changed, 1 insertions(+), 1 deletions(-)
Thanks, applied to the trivial-patches tree:
http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/trivial-patches
Your patch is line-wrapped. I have manually applied it, please make sure future submissions are not line-wrapped. GMail's web interface always line wraps, you must use their SMTP server directly (e.g. with git-send-email(1)).
Stefan
Quoted 3 lines · TeLeMan
If
pic_irqis greater than 7, the irq level is always 0 on 32bits.Signed-off-by TeLeMan <[email protected]>
Good catch
Quoted 22 lines
--- hw/piix_pci.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)hw/piix_pci.c +1
-1@@ -312,7 +312,7 @@ static void piix3_set_irq_pic(PIIX3State *piix3, int pic_irq) {qemu_set_irq (piix3->pic[pic_irq], !!(piix3->pic_levels & - (((1UL <<PIIX_NUM_PIRQS ) -1 ) << + (((1ULL <<PIIX_NUM_PIRQS ) -1 ) << (pic_irq *PIIX_NUM_PIRQS )))); }Signature · 4 lines
-- 1.7.3.1.msysgit.0 -- SUN OF A BEACH
Stefan Weil
Tested-byAm 22.05.2011 21:06, schrieb Michael S. Tsirkin:
Quoted 10 lines · TeLeMan
Quoted 3 lines
If
pic_irqis greater than 7, the irq level is always 0 on 32bits.Signed-off-by TeLeMan <[email protected]>Good catch
The patch fixes the regression in Linux networking with 32 bit hosts. Tested with w32 and linux 32 bit hosts.
Thank you.
Quoted 26 lines · TeLeMan
If
pic_irqis greater than 7, the irq level is always 0 on 32bits.Signed-off-by TeLeMan <[email protected]>--- hw/piix_pci.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)hw/piix_pci.c +1
-1@@ -312,7 +312,7 @@ static void piix3_set_irq_pic(PIIX3State *piix3, int pic_irq) {qemu_set_irq (piix3->pic[pic_irq], !!(piix3->pic_levels & - (((1UL <<PIIX_NUM_PIRQS ) -1 ) << + (((1ULL <<PIIX_NUM_PIRQS ) -1 ) << (pic_irq *PIIX_NUM_PIRQS )))); }Signature · 4 lines
-- 1.7.3.1.msysgit.0 -- SUN OF A BEACH
Signature · 1 line
yamahata