Received: from eggs.gnu.org ([209.51.188.92]:43231) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hEUNY-00029w-Hx for qemu-devel@nongnu.org; Thu, 11 Apr 2019 03:44:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hEUNX-0002S9-KJ for qemu-devel@nongnu.org; Thu, 11 Apr 2019 03:44:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37422) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hEUNX-0002Ri-9j for qemu-devel@nongnu.org; Thu, 11 Apr 2019 03:44:11 -0400 References: <5CADFEB7.01C57B.25694@m12-14.163.com> From: Paolo Bonzini Message-ID: Date: Thu, 11 Apr 2019 09:44:03 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] =?utf-8?q?Questions_about_acpi_interrupt_link_devic?= =?utf-8?b?ZSdzIOKAmF9QUlMnIGZpZWxk?= List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Li Qiang Cc: Li Qiang , "mst@redhat.com" , "qemu-devel@nongnu.org" On 11/04/19 02:57, Li Qiang wrote: >=20 >=20 > Paolo Bonzini > =E4=BA= =8E2019 > =E5=B9=B44=E6=9C=8810=E6=97=A5=E5=91=A8=E4=B8=89 =E4=B8=8B=E5=8D=8811:5= 5=E5=86=99=E9=81=93=EF=BC=9A >=20 > On 10/04/19 16:33, Li Qiang wrote: > > Hi all, > > > > =C2=A0 > > > > I see the link device =E2=80=98_PRS=E2=80=99=C2=A0 uses irq line = 5, 10, 11 in > > =E2=80=98build_link_dev=E2=80=99 function. > > > > But I never see the 5 lines uses in the guest, just uses 10 and 1= 1. > > > > Why this happen?=C2=A0 Maybe related with the guest? >=20 > Because the MADT table tells the guest to only use lines 10 and 11.= =C2=A0 The > BIOS configures the chipset that way. >=20 >=20 > Hi Paolo, >=20 > I read the MADT spec, and found that it may related with 'Entry Type 2 = : > Interrupt Source Override'. > However, in build_madt function, I found following code when fill > interrupt source overide. >=20 > #define ACPI_BUILD_PCI_IRQS ((1<<5) | (1<<9) | (1<<10) | (1<<11)) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (!(ACPI_BUILD_PCI_IRQS & (1 << i))) { > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* No need for a INT source o= verride structure. */ > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 continue; > =C2=A0 =C2=A0 =C2=A0 =C2=A0 } >=20 > Seems the madt doesn't play a role? >=20 > Also in the seabios code, I see the pci interrupt linking device is > routed hard-coded by pci_irqs. > So this means the seabios doesn't use the madt/dsdt table to configure > PCI interrupt routing? Yeah, the MADT doesn't matter, I got confused. It's just the firmware's definition of pci_irqs that affects the behavior you're seeing. Paolo