Patchwork virtio-blk/qdev failure in the current git tree

login
register
mail settings
Submitter Gerd Hoffmann
Date Aug. 13, 2009, 12:07 p.m.
Message ID <4A840205.1030806@redhat.com>
Download mbox | patch
Permalink /patch/31293/
State Superseded
Headers show

Comments

Gerd Hoffmann - Aug. 13, 2009, 12:07 p.m.
On 08/13/09 11:00, Avi Kivity wrote:
> On 08/13/2009 01:01 AM, Anthony Liguori wrote:
>> Christoph Hellwig wrote:
>>> On Wed, Aug 12, 2009 at 01:00:59PM +0300, Avi Kivity wrote:
>>>>> 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.

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

Patch

--- ./acpi-dsdt.dsl	2009-08-13 13:43:04.000000000 +0200
+++ /home/kraxel/tmp/kvm/kvm/bios/acpi-dsdt.dsl	2009-08-12 12:12:22.000000000 +0200
@@ -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)
         }
     }
-
 }