From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MbZ5y-0005zs-Hz for qemu-devel@nongnu.org; Thu, 13 Aug 2009 08:07:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MbZ5s-0005x3-JP for qemu-devel@nongnu.org; Thu, 13 Aug 2009 08:07:49 -0400 Received: from [199.232.76.173] (port=36130 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MbZ5s-0005wY-5j for qemu-devel@nongnu.org; Thu, 13 Aug 2009 08:07:44 -0400 Received: from mx2.redhat.com ([66.187.237.31]:34418) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MbZ5q-0007HB-Tq for qemu-devel@nongnu.org; Thu, 13 Aug 2009 08:07:43 -0400 Message-ID: <4A840205.1030806@redhat.com> Date: Thu, 13 Aug 2009 14:07:33 +0200 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] virtio-blk/qdev failure in the current git tree References: <20090810235646.GA12872@lst.de> <4A80BB6B.3020001@codemonkey.ws> <20090811161302.GA2053@lst.de> <20090811163638.GA4891@lst.de> <4A81C669.8070300@redhat.com> <4A828ABF.1040306@redhat.com> <4A8292DB.9000609@redhat.com> <20090812215032.GA28376@lst.de> <4A833B9C.6000803@codemonkey.ws> <4A83D613.5070408@redhat.com> In-Reply-To: <4A83D613.5070408@redhat.com> Content-Type: multipart/mixed; boundary="------------070405020306040901060902" List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Christoph Hellwig , qemu-devel@nongnu.org This is a multi-part message in MIME format. --------------070405020306040901060902 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 --------------070405020306040901060902 Content-Type: text/plain; name="fix" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fix" --- ./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) } } - } --------------070405020306040901060902--