Skip to contentSkip to conversation

virtio-blk/qdev failure in the current git tree

Qemu-devel Christoph Hellwig 5 participants 21 messages Aug 10, 2009 – Aug 13, 2009

lore
Share & tools
lore
#0 lore raw

Since today's merges I can't boot my virtio test setup anymore, but get an error from the qdev code:

property "virtio-blk-pci.drive" has no parser can't set property "drive" to "virtio0" for "virtio-blk-pci"

The qemu command line is:

/opt/qemu/bin/qemu-system-x86_64 \
	-m 1000 -enable-kvm \
	-kernel arch/x86/boot/bzImage \
	-drive file=/dev/vg00/qemu-root,if=virtio,media=disk,cache=writeback \
	-drive file=/dev/vg00/qemu-data,if=virtio,media=disk,cache=none \
	-append "root=/dev/vda console=tty0 console=ttyS0,38400n8"
#1 lore raw
Quoted 6 lines · Christoph Hellwig

Since today's merges I can't boot my virtio test setup anymore, but get an error from the qdev code:

property "virtio-blk-pci.drive" has no parser can't set property "drive" to "virtio0" for "virtio-blk-pci"

I'll push a fix. I'm sure it's my fault, although I'm not exactly sure what happened. Thanks.

Regards,

Anthony Liguori

Quoted 11 lines

The qemu command line is:

/opt/qemu/bin/qemu-system-x86_64 \
	-m 1000 -enable-kvm \
	-kernel arch/x86/boot/bzImage \
	-drive file=/dev/vg00/qemu-root,if=virtio,media=disk,cache=writeback \
	-drive file=/dev/vg00/qemu-data,if=virtio,media=disk,cache=none \
	-append "root=/dev/vda console=tty0 console=ttyS0,38400n8"
#2 lore raw
Quoted 10 lines · Anthony Liguori
Quoted 6 lines · Christoph Hellwig

Since today's merges I can't boot my virtio test setup anymore, but get an error from the qdev code:

property "virtio-blk-pci.drive" has no parser can't set property "drive" to "virtio0" for "virtio-blk-pci"

I'll push a fix. I'm sure it's my fault, although I'm not exactly sure what happened. Thanks.

With the fix pulled it the guest kernel now hangs after

	input: ImExPS/2 Generic Explorer Mouse as /class/input/input2
	Clocksource tsc unstable (delta = -782142631 ms)

when reducing the config to just one virtio-blk device it books, but with a longish break at the point where the original config hangs.

#3 lore raw
Quoted 7 lines · Christoph Hellwig

With the fix pulled it the guest kernel now hangs after

	input: ImExPS/2 Generic Explorer Mouse as /class/input/input2
	Clocksource tsc unstable (delta = -782142631 ms)

when reducing the config to just one virtio-blk device it books, but with a longish break at the point where the original config hangs.

The culprit is commit d176c495b6664b72dc1e595f6e89dc5648aa248b

qdev-ify virtio-blk.

reverting it (needs some manual work due to the macrofication of the qdev attributes) fixes the boot again.

Quoted 1 line

---end quoted text---

#4 lore raw
Quoted 11 lines · Christoph Hellwig
Quoted 8 lines · Christoph Hellwig

With the fix pulled it the guest kernel now hangs after

	input: ImExPS/2 Generic Explorer Mouse as /class/input/input2
	Clocksource tsc unstable (delta = -782142631 ms)

when reducing the config to just one virtio-blk device it books, but with a longish break at the point where the original config hangs.

Quoted 7 lines

The culprit is commit d176c495b6664b72dc1e595f6e89dc5648aa248b

qdev-ify virtio-blk.

reverting it (needs some manual work due to the macrofication of the qdev attributes) fixes the boot again.

It should be fixed in the latest git.

Regards,

Anthony Liguori

Quoted 2 lines

---end quoted text---

#5 lore raw
In reply to Christoph Hellwig
Quoted 9 lines · Christoph Hellwig
Quoted 7 lines · Christoph Hellwig

With the fix pulled it the guest kernel now hangs after

	input: ImExPS/2 Generic Explorer Mouse as /class/input/input2
	Clocksource tsc unstable (delta = -782142631 ms)

when reducing the config to just one virtio-blk device it books, but with a longish break at the point where the original config hangs.

Quoted 6 lines

The culprit is commit d176c495b6664b72dc1e595f6e89dc5648aa248b

qdev-ify virtio-blk.

reverting it (needs some manual work due to the macrofication of the qdev attributes) fixes the boot again.

Hmm. I suspect this is not related to qdev and virtio-blk at all. I've noticed now and then that some pci devices don't work if you have many of them. Didn't try (yet) to root-cause that one.

The commit changes the initialization order of the virtio-blk devices, which probably makes them being placed in other PCI slots, which in turn might uncover the bug mentioned above in your setup.

How are the pci devices assigned to slots with and without the patch?

Does removing the balloon device (-balloon none) change the behavior? Does removing the nic (-net none) too change the behavior?

cheers,
Gerd

#6 lore raw
Quoted 3 lines · Gerd Hoffmann

Hmm. I suspect this is not related to qdev and virtio-blk at all. I've noticed now and then that some pci devices don't work if you have many of them. Didn't try (yet) to root-cause that one.

More testing: Bare virtual box with just piix+vga. Then place a virtio disk into different slots using addr=. 3,4,5 work fine. 6 gives me:

ACPI: Unable to derive IRQ for device 0000:00:06.0
ACPI: PCI Interrupt 0000:00:06.0[A]: no GSI - using IRQ 9
vda: <hangs here>

Looks like a irq routing issue ...

cheers,
Gerd

#7 lore raw
Quoted 5 lines · Gerd Hoffmann
Quoted 3 lines · Gerd Hoffmann

Hmm. I suspect this is not related to qdev and virtio-blk at all. I've noticed now and then that some pci devices don't work if you have many of them. Didn't try (yet) to root-cause that one.

Quoted 7 lines

More testing: Bare virtual box with just piix+vga. Then place a virtio disk into different slots using addr=. 3,4,5 work fine. 6 gives me:

ACPI: Unable to derive IRQ for device 0000:00:06.0
ACPI: PCI Interrupt 0000:00:06.0[A]: no GSI - using IRQ 9
vda: <hangs here>

Looks like a irq routing issue ...

What about qemu-kvm.git (and its bios)? There was a lot of irq routing work there, maybe not all of it made it into qemu.git.

Signature · 1 line
error compiling committee.c: too many arguments to function
#8 lore raw
Quoted 9 lines · Avi Kivity
Quoted 8 lines · Gerd Hoffmann
Quoted 3 lines · Gerd Hoffmann

Hmm. I suspect this is not related to qdev and virtio-blk at all. I've noticed now and then that some pci devices don't work if you have many of them. Didn't try (yet) to root-cause that one.

More testing: Bare virtual box with just piix+vga. Then place a virtio disk into different slots using addr=. 3,4,5 work fine. 6 gives me:

Quoted 7 lines
Quoted 5 lines

ACPI: Unable to derive IRQ for device 0000:00:06.0
ACPI: PCI Interrupt 0000:00:06.0[A]: no GSI - using IRQ 9
vda: <hangs here>

Looks like a irq routing issue ...

What about qemu-kvm.git (and its bios)?

Works:

ACPI: PCI Interrupt 0000:00:06.0[A] -> Link [LNKB] -> GSI 10 (level, high) -> IRQ 10

cheers,
Gerd

#9 lore raw
Quoted 7 lines · Gerd Hoffmann
Quoted 1 line · Avi Kivity

What about qemu-kvm.git (and its bios)?

Works:

ACPI: PCI Interrupt 0000:00:06.0[A] -> Link [LNKB] -> GSI 10 (level, high) -> IRQ 10

From boot log diff:

kvm.log 2009-08-12 12:20:22.000000000 +0200 renamed from qemu.log 2009-08-12 12:26:30.000000000 +0200 +1 -1
@@ -26,21 +26,43 @@
 ACPI: PM-Timer IO Port: 0xb008
 ACPI: Local APIC address 0xfee00000
 ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
-Processor #0 6:2 APIC version 17
+Processor #0 6:2 APIC version 20
 

Where does this come from? kernel vs. userspace apic?

+ACPI: LAPIC (acpi_id[0x01] lapic_id[0x01] disabled) +ACPI: LAPIC (acpi_id[0x02] lapic_id[0x02] disabled) [ more of these ]

For hotplug cpus I guess?

ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
+ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level) +ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level) +ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level) +ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 high level)
ACPI: IRQ0 used by override.
ACPI: IRQ2 used by override.
+ACPI: IRQ5 used by override.
ACPI: IRQ9 used by override.
+ACPI: IRQ10 used by override.
+ACPI: IRQ11 used by override.

!!!

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
-ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 9 10 *11 12) -ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 *9 10 11 12) -ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 7 9 10 *11 12) -ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 7 *9 10 11 12) +ACPI: PCI Interrupt Link [LNKA] (IRQs 5 *10 11) +ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11) +ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11) +ACPI: PCI Interrupt Link [LNKD] (IRQs 5 10 *11)

!!!

That indeed looks like a bunch of changes and/or fixes did not find the way to upstream qemu ...

cheers,
Gerd

#10 lore raw
Quoted 20 lines · Gerd Hoffmann
Quoted 7 lines · Gerd Hoffmann
Quoted 1 line · Avi Kivity

What about qemu-kvm.git (and its bios)?

Works:

ACPI: PCI Interrupt 0000:00:06.0[A] -> Link [LNKB] -> GSI 10 (level, high) -> IRQ 10

From boot log diff:

kvm.log 2009-08-12 12:20:22.000000000 +0200 renamed from qemu.log 2009-08-12 12:26:30.000000000 +0200 +1 -1
@@ -26,21 +26,43 @@
 ACPI: PM-Timer IO Port: 0xb008
 ACPI: Local APIC address 0xfee00000
 ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
-Processor #0 6:2 APIC version 17
+Processor #0 6:2 APIC version 20
 
Quoted 1 line

Where does this come from? kernel vs. userspace apic?

Likely.

Quoted 6 lines
kvm.log 2009-08-12 12:20:22.000000000 +0200 renamed from qemu.log 2009-08-12 12:26:30.000000000 +0200 +2 -0
+ACPI: LAPIC (acpi_id[0x01] lapic_id[0x01] disabled)
+ACPI: LAPIC (acpi_id[0x02] lapic_id[0x02] disabled)

[ more of these ]

For hotplug cpus I guess?

Yes.

Quoted 13 lines

ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)

kvm.log 2009-08-12 12:20:22.000000000 +0200 renamed from qemu.log 2009-08-12 12:26:30.000000000 +0200 +7 -0
+ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level)
+ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
+ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level)
+ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 high level)
 ACPI: IRQ0 used by override.
 ACPI: IRQ2 used by override.
+ACPI: IRQ5 used by override.
 ACPI: IRQ9 used by override.
+ACPI: IRQ10 used by override.
+ACPI: IRQ11 used by override.
Quoted 1 line

!!!

The qemu ioapic doesn't implement polarity, so it happily boots with the lines inverted.

Quoted 10 lines

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]

kvm.log 2009-08-12 12:20:22.000000000 +0200 renamed from qemu.log 2009-08-12 12:26:30.000000000 +0200 +4 -4
-ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 9 10 *11 12)
-ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 *9 10 11 12)
-ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 7 9 10 *11 12)
-ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 7 *9 10 11 12)
+ACPI: PCI Interrupt Link [LNKA] (IRQs 5 *10 11)
+ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11)
+ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11)
+ACPI: PCI Interrupt Link [LNKD] (IRQs 5 10 *11)
Quoted 3 lines

!!!

That indeed looks like a bunch of changes and/or fixes did not find the way to upstream qemu ...

Yeah.

Signature · 1 line
error compiling committee.c: too many arguments to function
#11 lore raw
Quoted 28 lines · Avi Kivity
Quoted 12 lines · Gerd Hoffmann

ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)

(quoted diff) +7 -0
+ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level)
+ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
+ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level)
+ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 high level)
 ACPI: IRQ0 used by override.
 ACPI: IRQ2 used by override.
+ACPI: IRQ5 used by override.
 ACPI: IRQ9 used by override.
+ACPI: IRQ10 used by override.
+ACPI: IRQ11 used by override.
Quoted 1 line

!!!

The qemu ioapic doesn't implement polarity, so it happily boots with the lines inverted.

Quoted 10 lines

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]

(quoted diff) +4 -4
-ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 9 10 *11 12)
-ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 *9 10 11 12)
-ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 7 9 10 *11 12)
-ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 7 *9 10 11 12)
+ACPI: PCI Interrupt Link [LNKA] (IRQs 5 *10 11)
+ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11)
+ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11)
+ACPI: PCI Interrupt Link [LNKD] (IRQs 5 10 *11)
Quoted 6 lines
Quoted 4 lines

!!!

That indeed looks like a bunch of changes and/or fixes did not find the way to upstream qemu ...

Yeah.

I don't have much of a clue, but I in case it matters can say that with qemu-kvm latest git I had quite a few issues with the eepro100 interrupts never being processed (that was Mac OS X though), probably getting lost somewhere. So I'd be very careful about some of those changes (I was too lazy to investigate, since qemu --enable-kvm just worked ;-) )...

#12 lore raw
In reply to Avi Kivity
Quoted 4 lines · Avi Kivity
Quoted 1 line

Looks like a irq routing issue ...

What about qemu-kvm.git (and its bios)? There was a lot of irq routing work there, maybe not all of it made it into qemu.git.

Yeah, qemu-kvm works just fine. The amount of irq routing trouble I see with virtio and upstream qemu is getting really annoying :P

#13 lore raw
Quoted 10 lines · Christoph Hellwig
Quoted 4 lines · Avi Kivity
Quoted 2 lines

Looks like a irq routing issue ...

What about qemu-kvm.git (and its bios)? There was a lot of irq routing work there, maybe not all of it made it into qemu.git.

Yeah, qemu-kvm works just fine. The amount of irq routing trouble I see with virtio and upstream qemu is getting really annoying :P

Where were the irq routing trouble fixes in qemu-kvm? Was it fixes in the BIOS?

Regards,

Anthony Liguori

#14 lore raw
Quoted 10 lines · Anthony Liguori
Quoted 6 lines · Christoph Hellwig
Quoted 2 lines · Avi Kivity
Quoted 1 line

Looks like a irq routing issue ...

What about qemu-kvm.git (and its bios)? There was a lot of irq routing work there, maybe not all of it made it into qemu.git.

Yeah, qemu-kvm works just fine. The amount of irq routing trouble I see with virtio and upstream qemu is getting really annoying :P

Where were the irq routing trouble fixes in qemu-kvm? Was it fixes in the BIOS?

I think so, but not 100% sure.

Signature · 1 line
error compiling committee.c: too many arguments to function
#15 lore raw
Quoted 7 lines · Avi Kivity
Quoted 6 lines · Anthony Liguori
Quoted 5 lines · Christoph Hellwig
Quoted 3 lines · Avi Kivity
Quoted 1 line

Looks like a irq routing issue ...

What about qemu-kvm.git (and its bios)? There was a lot of irq routing work there, maybe not all of it made it into qemu.git.

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Yeah, qemu-kvm works just fine. The amount of irq routing trouble I see with virtio and upstream qemu is getting really annoying :P

Where were the irq routing trouble fixes in qemu-kvm? Was it fixes in the BIOS?

I think so, but not 100% sure.

Diffing acpi-dsdt.dsl gives a number of irq related differences which look like we wanna have them in upstream qemu.

Complete diff attached.

cheers,
Gerd

home/kraxel/tmp/kvm/kvm/bios/acpi-dsdt.dsl renamed from acpi-dsdt.dsl +36 -41
@@ -47,6 +47,7 @@ DefinitionBlock (
                    section 6.2.8.1 */
                 /* Note: we provide the same info as the PCI routing
                    table of the Bochs BIOS */
+
 #define prt_slot(nr, lnk0, lnk1, lnk2, lnk3) \
        Package() { nr##ffff, 0, lnk0, 0 }, \
        Package() { nr##ffff, 1, lnk1, 0 }, \
@@ -57,6 +58,7 @@ DefinitionBlock (
 #define prt_slot1(nr) prt_slot(nr, LNKA, LNKB, LNKC, LNKD)
 #define prt_slot2(nr) prt_slot(nr, LNKB, LNKC, LNKD, LNKA)
 #define prt_slot3(nr) prt_slot(nr, LNKC, LNKD, LNKA, LNKB)
+
                prt_slot0(0x0000),
                prt_slot1(0x0001),
                prt_slot2(0x0002),
@@ -441,8 +443,8 @@ DefinitionBlock (
                 Name(_HID, EISAID("PNP0C0F"))     // PCI interrupt link
                 Name(_UID, 1)
                 Name(_PRS, ResourceTemplate(){
-                    IRQ (Level, ActiveLow, Shared)
-                        {3,4,5,6,7,9,10,11,12}
+                    Interrupt (, Level, ActiveHigh, Shared)
+                        { 5, 10, 11 }
                 })
                 Method (_STA, 0, NotSerialized)
                 {
@@ -461,14 +463,14 @@ DefinitionBlock (
                 {
                     Name (PRR0, ResourceTemplate ()
                     {
-                        IRQ (Level, ActiveLow, Shared)
+                        Interrupt (, Level, ActiveHigh, Shared)
                             {1}
                     })
-                    CreateWordField (PRR0, 0x01, TMP)
+                    CreateDWordField (PRR0, 0x05, TMP)
                     Store (PRQ0, Local0)
                     If (LLess (Local0, 0x80))
                     {
-                        ShiftLeft (One, Local0, TMP)
+                        Store (Local0, TMP)
                     }
                     Else
                     {
@@ -478,18 +480,16 @@ DefinitionBlock (
                 }
                 Method (_SRS, 1, NotSerialized)
                 {
-                    CreateWordField (Arg0, 0x01, TMP)
-                    FindSetRightBit (TMP, Local0)
-                    Decrement (Local0)
-                    Store (Local0, PRQ0)
+                    CreateDWordField (Arg0, 0x05, TMP)
+                    Store (TMP, PRQ0)
                 }
         }
         Device(LNKB){
                 Name(_HID, EISAID("PNP0C0F"))     // PCI interrupt link
                 Name(_UID, 2)
                 Name(_PRS, ResourceTemplate(){
-                    IRQ (Level, ActiveLow, Shared)
-                        {3,4,5,6,7,9,10,11,12}
+                    Interrupt (, Level, ActiveHigh, Shared)
+                        { 5, 10, 11 }
                 })
                 Method (_STA, 0, NotSerialized)
                 {
@@ -508,14 +508,14 @@ DefinitionBlock (
                 {
                     Name (PRR0, ResourceTemplate ()
                     {
-                        IRQ (Level, ActiveLow, Shared)
+                        Interrupt (, Level, ActiveHigh, Shared)
                             {1}
                     })
-                    CreateWordField (PRR0, 0x01, TMP)
+                    CreateDWordField (PRR0, 0x05, TMP)
                     Store (PRQ1, Local0)
                     If (LLess (Local0, 0x80))
                     {
-                        ShiftLeft (One, Local0, TMP)
+                        Store (Local0, TMP)
                     }
                     Else
                     {
@@ -525,18 +525,16 @@ DefinitionBlock (
                 }
                 Method (_SRS, 1, NotSerialized)
                 {
-                    CreateWordField (Arg0, 0x01, TMP)
-                    FindSetRightBit (TMP, Local0)
-                    Decrement (Local0)
-                    Store (Local0, PRQ1)
+                    CreateDWordField (Arg0, 0x05, TMP)
+                    Store (TMP, PRQ1)
                 }
         }
         Device(LNKC){
                 Name(_HID, EISAID("PNP0C0F"))     // PCI interrupt link
                 Name(_UID, 3)
                 Name(_PRS, ResourceTemplate(){
-                    IRQ (Level, ActiveLow, Shared)
-                        {3,4,5,6,7,9,10,11,12}
+                    Interrupt (, Level, ActiveHigh, Shared)
+                        { 5, 10, 11 }
                 })
                 Method (_STA, 0, NotSerialized)
                 {
@@ -555,14 +553,14 @@ DefinitionBlock (
                 {
                     Name (PRR0, ResourceTemplate ()
                     {
-                        IRQ (Level, ActiveLow, Shared)
+                        Interrupt (, Level, ActiveHigh, Shared)
                             {1}
                     })
-                    CreateWordField (PRR0, 0x01, TMP)
+                    CreateDWordField (PRR0, 0x05, TMP)
                     Store (PRQ2, Local0)
                     If (LLess (Local0, 0x80))
                     {
-                        ShiftLeft (One, Local0, TMP)
+                        Store (Local0, TMP)
                     }
                     Else
                     {
@@ -572,18 +570,16 @@ DefinitionBlock (
                 }
                 Method (_SRS, 1, NotSerialized)
                 {
-                    CreateWordField (Arg0, 0x01, TMP)
-                    FindSetRightBit (TMP, Local0)
-                    Decrement (Local0)
-                    Store (Local0, PRQ2)
+                    CreateDWordField (Arg0, 0x05, TMP)
+                    Store (TMP, PRQ2)
                 }
         }
         Device(LNKD){
                 Name(_HID, EISAID("PNP0C0F"))     // PCI interrupt link
                 Name(_UID, 4)
                 Name(_PRS, ResourceTemplate(){
-                    IRQ (Level, ActiveLow, Shared)
-                        {3,4,5,6,7,9,10,11,12}
+                    Interrupt (, Level, ActiveHigh, Shared)
+                        { 5, 10, 11 }
                 })
                 Method (_STA, 0, NotSerialized)
                 {
@@ -602,14 +598,14 @@ DefinitionBlock (
                 {
                     Name (PRR0, ResourceTemplate ()
                     {
-                        IRQ (Level, ActiveLow, Shared)
+                        Interrupt (, Level, ActiveHigh, Shared)
                             {1}
                     })
-                    CreateWordField (PRR0, 0x01, TMP)
+                    CreateDWordField (PRR0, 0x05, TMP)
                     Store (PRQ3, Local0)
                     If (LLess (Local0, 0x80))
                     {
-                        ShiftLeft (One, Local0, TMP)
+                        Store (Local0, TMP)
                     }
                     Else
                     {
@@ -619,10 +615,8 @@ DefinitionBlock (
                 }
                 Method (_SRS, 1, NotSerialized)
                 {
-                    CreateWordField (Arg0, 0x01, TMP)
-                    FindSetRightBit (TMP, Local0)
-                    Decrement (Local0)
-                    Store (Local0, PRQ3)
+                    CreateDWordField (Arg0, 0x05, TMP)
+                    Store (TMP, PRQ3)
                 }
         }
     }
@@ -703,11 +697,13 @@ DefinitionBlock (
             gen_pci_hotplug(31)
 
             Return (0x01)
-
-        }
-        Method(_L02) {
-            Return(0x01)
         }
+
+	/*
+         * Method _02 will be provided by the SSDT as it needs to call
+         * into the Processor methods (_PR.PRSC()).
+         */
+
         Method(_L03) {
             Return(0x01)
         }
@@ -748,5 +744,4 @@ DefinitionBlock (
             Return(0x01)
         }
     }
-
 }
#16 lore raw
In reply to Avi Kivity
Quoted 4 lines · Avi Kivity
Quoted 2 lines

Where were the irq routing trouble fixes in qemu-kvm? Was it fixes in the BIOS?

I think so, but not 100% sure.

Lets start with the attached fix. bochs build system doesn't compile the dsdt. Which implies that the patches in pc-bios/bios-pq/ which change the dsdt have no effect at all.

cheers,
Gerd

Quoted 1 line

From 6f50c206451bd8454ba0c1ec72728257946de65c Mon Sep 17 00:00:00 2001

From: Gerd Hoffmann <[email protected]>
Date: Thu, 13 Aug 2009 14:33:11 +0200
Subject: [PATCH 2/2] actually compile dsdt

---
 bios/Makefile.in |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
bios/Makefile.in +0 -2
index 28ada75..7d8a65a 100644
@@ -103,13 +103,11 @@ rombios32.out: rombios32start.o rombios32.o rombios32.ld
 rombios32.o: rombios32.c acpi-dsdt.hex
 	$(GCC32) -O2 -Wall -c -o $@ $<
 
-ifeq ("1", "0")
 acpi-dsdt.hex: acpi-dsdt.dsl
 	cpp -P $< $<.i
 	iasl -tc -p $@ $<.i
 	rm $<.i
 	sed -i -e's/^unsigned/const unsigned/' $@
-endif
 
 rombios32start.o: rombios32start.S
 	$(GCC32) -c -o $@ $<
Signature · 1 line
1.6.2.5
#17 lore raw
Quoted 7 lines · Gerd Hoffmann
Quoted 4 lines · Avi Kivity
Quoted 2 lines

Where were the irq routing trouble fixes in qemu-kvm? Was it fixes in the BIOS?

I think so, but not 100% sure.

Lets start with the attached fix. bochs build system doesn't compile the dsdt. Which implies that the patches in pc-bios/bios-pq/ which change the dsdt have no effect at all.

When I rebuild the bios locally, I manually change this in the generated Makefile.

But I'm going to merge a git submodule for bochs bios today into the tree. The Makefile in that tree already has this bit removed.

Regards,

Anthony Liguori

#18 lore raw
Quoted 5 lines · Anthony Liguori
Quoted 4 lines · Gerd Hoffmann
Quoted 3 lines · Avi Kivity
Quoted 2 lines

Where were the irq routing trouble fixes in qemu-kvm? Was it fixes in the BIOS?

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

I think so, but not 100% sure.

Lets start with the attached fix. bochs build system doesn't compile the dsdt. Which implies that the patches in pc-bios/bios-pq/ which change the dsdt have no effect at all.

When I rebuild the bios locally, I manually change this in the generated Makefile.

Hmm, strange. With the patch applied on top of the others I get a working bios when building according to the instructions in pc-bios/README. The prebuild bios.bin doesn't work for me though.

cheers,
Gerd

#19 lore raw
In reply to Gerd Hoffmann
Quoted 5 lines · Gerd Hoffmann
Quoted 3 lines · Gerd Hoffmann

Hmm. I suspect this is not related to qdev and virtio-blk at all. I've noticed now and then that some pci devices don't work if you have many of them. Didn't try (yet) to root-cause that one.

Quoted 8 lines

More testing: Bare virtual box with just piix+vga. Then place a virtio disk into different slots using addr=. 3,4,5 work fine. 6 gives me:

ACPI: Unable to derive IRQ for device 0000:00:06.0
ACPI: PCI Interrupt 0000:00:06.0[A]: no GSI - using IRQ 9
vda: <hangs here>

Looks like a irq routing issue ...

With acpi=off the box boots just fine for me with the virtio disk in slot #6.

Also note there is pc-bios/bios-pq/0007_bios-add-26-pci-slots,-bringing-the-total-to-32.patch which adds slots 6 .. 32 to the acpi tables. Maybe that one is incomplete?

cheers,
Gerd

#20 lore raw
Quoted 2 lines · Gerd Hoffmann

With acpi=off the box boots just fine for me with the virtio disk in slot #6.

Yes, acpi=off fixes it for me too, and I also see the changes in the interrupt routing.