diff mbox

[Bugfix,0/3] Xen IRQ related hotfixes for v3.19

Message ID 54D8823F.9080900@canonical.com (mailing list archive)
State New, archived
Delegated to: Bjorn Helgaas
Headers show

Commit Message

Stefan Bader Feb. 9, 2015, 9:47 a.m. UTC
On 05.02.2015 21:07, Sander Eikelenboom wrote:
> 
> Tuesday, January 20, 2015, 3:21:04 AM, you wrote:
> 
>> Hi Thomas,
>>         This patch set includes three hotfixes related Xen IRQ for v3.19.
>> Sorry for the long delay to get these two regressions fixed, it really
>> cost me some time to read and understand Xen IRQ code.
> 
>> Patch 1 fixes the failure to register ACPI SCI interrupt on Xen
>> domain0 by reworking acpi_gsi_to_irq(). I will backport it to v3.18
>> too once it reaches the mainstream kernel.
> 
>> Patch 2 fixes the regression in Xen PCI device passthrough(pciback).
>> It's a temporary solution, I will send the formal fix for v3.20 and
>> it has passed tests too.
> 
>> Patch 3 fixes an issue found when reading code. There's no real bug
>> reports related to this issue yet.
> 
>> Great thanks to Konrad and Sander for testing fixes for these regressions.
> 
>> Regards,
>> Gerry
> 
> Hi Gerry,
> 
> Since these patches now are: tested, reviewed and have landed into mainline,
> could you also provide the backports for 3.17 and 3.18 where required ?

This would be my attempt of backporting those to 3.18 (I have not tried whether
they would apply to 3.17 as well). Those seem to work when test-booting and
Sander said he will give them a try as well. But better check yourself I did not
mess anything up while backporting. One of the three patches seemed not to be
required at all.

-Stefan

> 
> The number of people running into these (subtle) issues with these stable
> kernels seems to be steadily increasing.
> 
> --
> Sander
> 
>> Jiang Liu (3):
>>   xen/pci: Kill function xen_setup_acpi_sci()
>>   xen/irq, ACPI: Fix regression in xen PCI passthrough caused by
>>     cffe0a2b5a34
>>   xen/irq: Override ACPI IRQ management callback __acpi_unregister_gsi
> 
>>  arch/x86/include/asm/acpi.h |    1 +
>>  arch/x86/kernel/acpi/boot.c |   26 +++++++++++------------
>>  arch/x86/pci/xen.c          |   49 ++-----------------------------------------
>>  drivers/acpi/pci_irq.c      |    1 -
>>  4 files changed, 16 insertions(+), 61 deletions(-)
> 
>

Comments

Jiang Liu Feb. 9, 2015, 12:12 p.m. UTC | #1
On 2015/2/9 17:47, Stefan Bader wrote:
> On 05.02.2015 21:07, Sander Eikelenboom wrote:
>>
>> Tuesday, January 20, 2015, 3:21:04 AM, you wrote:
>>
>>> Hi Thomas,
>>>         This patch set includes three hotfixes related Xen IRQ for v3.19.
>>> Sorry for the long delay to get these two regressions fixed, it really
>>> cost me some time to read and understand Xen IRQ code.
>>
>>> Patch 1 fixes the failure to register ACPI SCI interrupt on Xen
>>> domain0 by reworking acpi_gsi_to_irq(). I will backport it to v3.18
>>> too once it reaches the mainstream kernel.
>>
>>> Patch 2 fixes the regression in Xen PCI device passthrough(pciback).
>>> It's a temporary solution, I will send the formal fix for v3.20 and
>>> it has passed tests too.
>>
>>> Patch 3 fixes an issue found when reading code. There's no real bug
>>> reports related to this issue yet.
>>
>>> Great thanks to Konrad and Sander for testing fixes for these regressions.
>>
>>> Regards,
>>> Gerry
>>
>> Hi Gerry,
>>
>> Since these patches now are: tested, reviewed and have landed into mainline,
>> could you also provide the backports for 3.17 and 3.18 where required ?
> 
> This would be my attempt of backporting those to 3.18 (I have not tried whether
> they would apply to 3.17 as well). Those seem to work when test-booting and
> Sander said he will give them a try as well. But better check yourself I did not
> mess anything up while backporting. One of the three patches seemed not to be
> required at all.
I'm backporting them too, but now I will give up my patches:)

The first one is a must, which should be applied to 3.17 and 3.18.
The second one doesn't apply to 3.17 or 3.18.
The third may be applied to v3.17 and v3.18, but it shouldn't be applied
according to the stable-kernel doc because no user reports such a bug yet.
Regards
Gerry
> 
> -Stefan
> 
>>
>> The number of people running into these (subtle) issues with these stable
>> kernels seems to be steadily increasing.
>>
>> --
>> Sander
>>
>>> Jiang Liu (3):
>>>   xen/pci: Kill function xen_setup_acpi_sci()
>>>   xen/irq, ACPI: Fix regression in xen PCI passthrough caused by
>>>     cffe0a2b5a34
>>>   xen/irq: Override ACPI IRQ management callback __acpi_unregister_gsi
>>
>>>  arch/x86/include/asm/acpi.h |    1 +
>>>  arch/x86/kernel/acpi/boot.c |   26 +++++++++++------------
>>>  arch/x86/pci/xen.c          |   49 ++-----------------------------------------
>>>  drivers/acpi/pci_irq.c      |    1 -
>>>  4 files changed, 16 insertions(+), 61 deletions(-)
>>
>>
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sander Eikelenboom Feb. 9, 2015, 12:17 p.m. UTC | #2
Monday, February 9, 2015, 10:47:43 AM, you wrote:

> On 05.02.2015 21:07, Sander Eikelenboom wrote:
>> 
>> Tuesday, January 20, 2015, 3:21:04 AM, you wrote:
>> 
>>> Hi Thomas,
>>>         This patch set includes three hotfixes related Xen IRQ for v3.19.
>>> Sorry for the long delay to get these two regressions fixed, it really
>>> cost me some time to read and understand Xen IRQ code.
>> 
>>> Patch 1 fixes the failure to register ACPI SCI interrupt on Xen
>>> domain0 by reworking acpi_gsi_to_irq(). I will backport it to v3.18
>>> too once it reaches the mainstream kernel.
>> 
>>> Patch 2 fixes the regression in Xen PCI device passthrough(pciback).
>>> It's a temporary solution, I will send the formal fix for v3.20 and
>>> it has passed tests too.
>> 
>>> Patch 3 fixes an issue found when reading code. There's no real bug
>>> reports related to this issue yet.
>> 
>>> Great thanks to Konrad and Sander for testing fixes for these regressions.
>> 
>>> Regards,
>>> Gerry
>> 
>> Hi Gerry,
>> 
>> Since these patches now are: tested, reviewed and have landed into mainline,
>> could you also provide the backports for 3.17 and 3.18 where required ?

> This would be my attempt of backporting those to 3.18 (I have not tried whether
> they would apply to 3.17 as well). Those seem to work when test-booting and
> Sander said he will give them a try as well. But better check yourself I did not
> mess anything up while backporting. One of the three patches seemed not to be
> required at all.

> -Stefan

Hi Stefan / Gerry,

Happy to inform you i have tested stefan's backport-patches on Intel and AMD:

- Patches apply cleanly to kernel's 3.18.6 and 3.17.8 and compile.
  (hmm, 3.17 seems to be already EOL according to www.kernel.org ?)
- Fixes the subtle issues i had.

So .. Tested-by: Sander Eikelenboom <linux@eikelenboom.it>

Thanks !

--
Sander

>> 
>> The number of people running into these (subtle) issues with these stable
>> kernels seems to be steadily increasing.
>> 
>> --
>> Sander
>> 
>>> Jiang Liu (3):
>>>   xen/pci: Kill function xen_setup_acpi_sci()
>>>   xen/irq, ACPI: Fix regression in xen PCI passthrough caused by
>>>     cffe0a2b5a34
>>>   xen/irq: Override ACPI IRQ management callback __acpi_unregister_gsi
>> 
>>>  arch/x86/include/asm/acpi.h |    1 +
>>>  arch/x86/kernel/acpi/boot.c |   26 +++++++++++------------
>>>  arch/x86/pci/xen.c          |   49 ++-----------------------------------------
>>>  drivers/acpi/pci_irq.c      |    1 -
>>>  4 files changed, 16 insertions(+), 61 deletions(-)
>> 
>> 


--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Stefan Bader Feb. 9, 2015, 12:29 p.m. UTC | #3
On 09.02.2015 13:12, Jiang Liu wrote:
> On 2015/2/9 17:47, Stefan Bader wrote:
>> On 05.02.2015 21:07, Sander Eikelenboom wrote:
>>>
>>> Tuesday, January 20, 2015, 3:21:04 AM, you wrote:
>>>
>>>> Hi Thomas,
>>>>         This patch set includes three hotfixes related Xen IRQ for v3.19.
>>>> Sorry for the long delay to get these two regressions fixed, it really
>>>> cost me some time to read and understand Xen IRQ code.
>>>
>>>> Patch 1 fixes the failure to register ACPI SCI interrupt on Xen
>>>> domain0 by reworking acpi_gsi_to_irq(). I will backport it to v3.18
>>>> too once it reaches the mainstream kernel.
>>>
>>>> Patch 2 fixes the regression in Xen PCI device passthrough(pciback).
>>>> It's a temporary solution, I will send the formal fix for v3.20 and
>>>> it has passed tests too.
>>>
>>>> Patch 3 fixes an issue found when reading code. There's no real bug
>>>> reports related to this issue yet.
>>>
>>>> Great thanks to Konrad and Sander for testing fixes for these regressions.
>>>
>>>> Regards,
>>>> Gerry
>>>
>>> Hi Gerry,
>>>
>>> Since these patches now are: tested, reviewed and have landed into mainline,
>>> could you also provide the backports for 3.17 and 3.18 where required ?
>>
>> This would be my attempt of backporting those to 3.18 (I have not tried whether
>> they would apply to 3.17 as well). Those seem to work when test-booting and
>> Sander said he will give them a try as well. But better check yourself I did not
>> mess anything up while backporting. One of the three patches seemed not to be
>> required at all.
> I'm backporting them too, but now I will give up my patches:)
> 
> The first one is a must, which should be applied to 3.17 and 3.18.
> The second one doesn't apply to 3.17 or 3.18.
> The third may be applied to v3.17 and v3.18, but it shouldn't be applied
> according to the stable-kernel doc because no user reports such a bug yet.

Hm, ok. So maybe I should retry with only patch#1 and verify that alone gets
around the acpi irq and the usb problems, too. Though interestingly from the
history, the acpi irq I saw in 3.17 while the usb devices started to fail with
3.18. I will let you know in a bit. Just want to finish another bisect first.

-Stefan

> Regards
> Gerry
>>
>> -Stefan
>>
>>>
>>> The number of people running into these (subtle) issues with these stable
>>> kernels seems to be steadily increasing.
>>>
>>> --
>>> Sander
>>>
>>>> Jiang Liu (3):
>>>>   xen/pci: Kill function xen_setup_acpi_sci()
>>>>   xen/irq, ACPI: Fix regression in xen PCI passthrough caused by
>>>>     cffe0a2b5a34
>>>>   xen/irq: Override ACPI IRQ management callback __acpi_unregister_gsi
>>>
>>>>  arch/x86/include/asm/acpi.h |    1 +
>>>>  arch/x86/kernel/acpi/boot.c |   26 +++++++++++------------
>>>>  arch/x86/pci/xen.c          |   49 ++-----------------------------------------
>>>>  drivers/acpi/pci_irq.c      |    1 -
>>>>  4 files changed, 16 insertions(+), 61 deletions(-)
>>>
>>>
>>
Stefan Bader Feb. 9, 2015, 4:09 p.m. UTC | #4
On 09.02.2015 13:29, Stefan Bader wrote:
> On 09.02.2015 13:12, Jiang Liu wrote:
>> On 2015/2/9 17:47, Stefan Bader wrote:
>>> On 05.02.2015 21:07, Sander Eikelenboom wrote:
>>>>
>>>> Tuesday, January 20, 2015, 3:21:04 AM, you wrote:
>>>>
>>>>> Hi Thomas,
>>>>>         This patch set includes three hotfixes related Xen IRQ for v3.19.
>>>>> Sorry for the long delay to get these two regressions fixed, it really
>>>>> cost me some time to read and understand Xen IRQ code.
>>>>
>>>>> Patch 1 fixes the failure to register ACPI SCI interrupt on Xen
>>>>> domain0 by reworking acpi_gsi_to_irq(). I will backport it to v3.18
>>>>> too once it reaches the mainstream kernel.
>>>>
>>>>> Patch 2 fixes the regression in Xen PCI device passthrough(pciback).
>>>>> It's a temporary solution, I will send the formal fix for v3.20 and
>>>>> it has passed tests too.
>>>>
>>>>> Patch 3 fixes an issue found when reading code. There's no real bug
>>>>> reports related to this issue yet.
>>>>
>>>>> Great thanks to Konrad and Sander for testing fixes for these regressions.
>>>>
>>>>> Regards,
>>>>> Gerry
>>>>
>>>> Hi Gerry,
>>>>
>>>> Since these patches now are: tested, reviewed and have landed into mainline,
>>>> could you also provide the backports for 3.17 and 3.18 where required ?
>>>
>>> This would be my attempt of backporting those to 3.18 (I have not tried whether
>>> they would apply to 3.17 as well). Those seem to work when test-booting and
>>> Sander said he will give them a try as well. But better check yourself I did not
>>> mess anything up while backporting. One of the three patches seemed not to be
>>> required at all.
>> I'm backporting them too, but now I will give up my patches:)
>>
>> The first one is a must, which should be applied to 3.17 and 3.18.
>> The second one doesn't apply to 3.17 or 3.18.
>> The third may be applied to v3.17 and v3.18, but it shouldn't be applied
>> according to the stable-kernel doc because no user reports such a bug yet.
> 
> Hm, ok. So maybe I should retry with only patch#1 and verify that alone gets
> around the acpi irq and the usb problems, too. Though interestingly from the
> history, the acpi irq I saw in 3.17 while the usb devices started to fail with
> 3.18. I will let you know in a bit. Just want to finish another bisect first.

So it looks like patch #1 indeed does fix both the acpi irq and my usb devices.
Sander, do you want to verify that variant, too?

The only odd thing left in a 3.18 with the fix (regardless of using patch #1
only or patches #1 and #3) is that the ahci driver shows up with its pci bus
number in /proc/interrupts. But that does not seem to have any relevant downside
(cannot try 3.19 on that box right now for other reasons).

-Stefan

...
# 57: 12441  0    0    0  xen-pirq-msi       0000:00:1f.2
#                                            (used to be ahci)

> 
> -Stefan
> 
>> Regards
>> Gerry
>>>
>>> -Stefan
>>>
>>>>
>>>> The number of people running into these (subtle) issues with these stable
>>>> kernels seems to be steadily increasing.
>>>>
>>>> --
>>>> Sander
>>>>
>>>>> Jiang Liu (3):
>>>>>   xen/pci: Kill function xen_setup_acpi_sci()
>>>>>   xen/irq, ACPI: Fix regression in xen PCI passthrough caused by
>>>>>     cffe0a2b5a34
>>>>>   xen/irq: Override ACPI IRQ management callback __acpi_unregister_gsi
>>>>
>>>>>  arch/x86/include/asm/acpi.h |    1 +
>>>>>  arch/x86/kernel/acpi/boot.c |   26 +++++++++++------------
>>>>>  arch/x86/pci/xen.c          |   49 ++-----------------------------------------
>>>>>  drivers/acpi/pci_irq.c      |    1 -
>>>>>  4 files changed, 16 insertions(+), 61 deletions(-)
>>>>
>>>>
>>>
> 
>
Sander Eikelenboom Feb. 9, 2015, 4:55 p.m. UTC | #5
Monday, February 9, 2015, 5:09:44 PM, you wrote:

> On 09.02.2015 13:29, Stefan Bader wrote:
>> On 09.02.2015 13:12, Jiang Liu wrote:
>>> On 2015/2/9 17:47, Stefan Bader wrote:
>>>> On 05.02.2015 21:07, Sander Eikelenboom wrote:
>>>>>
>>>>> Tuesday, January 20, 2015, 3:21:04 AM, you wrote:
>>>>>
>>>>>> Hi Thomas,
>>>>>>         This patch set includes three hotfixes related Xen IRQ for v3.19.
>>>>>> Sorry for the long delay to get these two regressions fixed, it really
>>>>>> cost me some time to read and understand Xen IRQ code.
>>>>>
>>>>>> Patch 1 fixes the failure to register ACPI SCI interrupt on Xen
>>>>>> domain0 by reworking acpi_gsi_to_irq(). I will backport it to v3.18
>>>>>> too once it reaches the mainstream kernel.
>>>>>
>>>>>> Patch 2 fixes the regression in Xen PCI device passthrough(pciback).
>>>>>> It's a temporary solution, I will send the formal fix for v3.20 and
>>>>>> it has passed tests too.
>>>>>
>>>>>> Patch 3 fixes an issue found when reading code. There's no real bug
>>>>>> reports related to this issue yet.
>>>>>
>>>>>> Great thanks to Konrad and Sander for testing fixes for these regressions.
>>>>>
>>>>>> Regards,
>>>>>> Gerry
>>>>>
>>>>> Hi Gerry,
>>>>>
>>>>> Since these patches now are: tested, reviewed and have landed into mainline,
>>>>> could you also provide the backports for 3.17 and 3.18 where required ?
>>>>
>>>> This would be my attempt of backporting those to 3.18 (I have not tried whether
>>>> they would apply to 3.17 as well). Those seem to work when test-booting and
>>>> Sander said he will give them a try as well. But better check yourself I did not
>>>> mess anything up while backporting. One of the three patches seemed not to be
>>>> required at all.
>>> I'm backporting them too, but now I will give up my patches:)
>>>
>>> The first one is a must, which should be applied to 3.17 and 3.18.
>>> The second one doesn't apply to 3.17 or 3.18.
>>> The third may be applied to v3.17 and v3.18, but it shouldn't be applied
>>> according to the stable-kernel doc because no user reports such a bug yet.
>> 
>> Hm, ok. So maybe I should retry with only patch#1 and verify that alone gets
>> around the acpi irq and the usb problems, too. Though interestingly from the
>> history, the acpi irq I saw in 3.17 while the usb devices started to fail with
>> 3.18. I will let you know in a bit. Just want to finish another bisect first.

> So it looks like patch #1 indeed does fix both the acpi irq and my usb devices.
> Sander, do you want to verify that variant, too?

Will test 3.18 with only patch 1 after dinner.

> The only odd thing left in a 3.18 with the fix (regardless of using patch #1
> only or patches #1 and #3) is that the ahci driver shows up with its pci bus
> number in /proc/interrupts. But that does not seem to have any relevant downside
> (cannot try 3.19 on that box right now for other reasons).

> -Stefan

> ...
> # 57: 12441  0    0    0  xen-pirq-msi       0000:00:1f.2
> #                                            (used to be ahci)

Hmm funky .. now that you mention it .. i'm seeing that as well but only on an 
intel machine.

intel .. on 3.19:
 52:      13529          0          0          0  xen-pirq-msi       0000:00:1f.2
 
on my amd machine on 3.19 it seems ok though:

 114:     412535          0          0          0          0          0  xen-pirq-msi       ahci0
 115:          0          0          0          0          0          0  xen-pirq-msi       ahci1
 116:      16717          0          0          0          0          0  xen-pirq-msi       ahci2
 117:          0          0          0          0          0          0  xen-pirq-msi       ahci3
 118:          0          0          0          0          0          0  xen-pirq-msi       ahci4
 119:          0          0          0          0          0          0  xen-pirq-msi       ahci5

--
Sander

>> 
>> -Stefan
>> 
>>> Regards
>>> Gerry
>>>>
>>>> -Stefan
>>>>
>>>>>
>>>>> The number of people running into these (subtle) issues with these stable
>>>>> kernels seems to be steadily increasing.
>>>>>
>>>>> --
>>>>> Sander
>>>>>
>>>>>> Jiang Liu (3):
>>>>>>   xen/pci: Kill function xen_setup_acpi_sci()
>>>>>>   xen/irq, ACPI: Fix regression in xen PCI passthrough caused by
>>>>>>     cffe0a2b5a34
>>>>>>   xen/irq: Override ACPI IRQ management callback __acpi_unregister_gsi
>>>>>
>>>>>>  arch/x86/include/asm/acpi.h |    1 +
>>>>>>  arch/x86/kernel/acpi/boot.c |   26 +++++++++++------------
>>>>>>  arch/x86/pci/xen.c          |   49 ++-----------------------------------------
>>>>>>  drivers/acpi/pci_irq.c      |    1 -
>>>>>>  4 files changed, 16 insertions(+), 61 deletions(-)
>>>>>
>>>>>
>>>>
>> 
>> 



--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sander Eikelenboom Feb. 9, 2015, 7:15 p.m. UTC | #6
Monday, February 9, 2015, 5:09:44 PM, you wrote:

> On 09.02.2015 13:29, Stefan Bader wrote:
>> On 09.02.2015 13:12, Jiang Liu wrote:
>>> On 2015/2/9 17:47, Stefan Bader wrote:
>>>> On 05.02.2015 21:07, Sander Eikelenboom wrote:
>>>>>
>>>>> Tuesday, January 20, 2015, 3:21:04 AM, you wrote:
>>>>>
>>>>>> Hi Thomas,
>>>>>>         This patch set includes three hotfixes related Xen IRQ for v3.19.
>>>>>> Sorry for the long delay to get these two regressions fixed, it really
>>>>>> cost me some time to read and understand Xen IRQ code.
>>>>>
>>>>>> Patch 1 fixes the failure to register ACPI SCI interrupt on Xen
>>>>>> domain0 by reworking acpi_gsi_to_irq(). I will backport it to v3.18
>>>>>> too once it reaches the mainstream kernel.
>>>>>
>>>>>> Patch 2 fixes the regression in Xen PCI device passthrough(pciback).
>>>>>> It's a temporary solution, I will send the formal fix for v3.20 and
>>>>>> it has passed tests too.
>>>>>
>>>>>> Patch 3 fixes an issue found when reading code. There's no real bug
>>>>>> reports related to this issue yet.
>>>>>
>>>>>> Great thanks to Konrad and Sander for testing fixes for these regressions.
>>>>>
>>>>>> Regards,
>>>>>> Gerry
>>>>>
>>>>> Hi Gerry,
>>>>>
>>>>> Since these patches now are: tested, reviewed and have landed into mainline,
>>>>> could you also provide the backports for 3.17 and 3.18 where required ?
>>>>
>>>> This would be my attempt of backporting those to 3.18 (I have not tried whether
>>>> they would apply to 3.17 as well). Those seem to work when test-booting and
>>>> Sander said he will give them a try as well. But better check yourself I did not
>>>> mess anything up while backporting. One of the three patches seemed not to be
>>>> required at all.
>>> I'm backporting them too, but now I will give up my patches:)
>>>
>>> The first one is a must, which should be applied to 3.17 and 3.18.
>>> The second one doesn't apply to 3.17 or 3.18.
>>> The third may be applied to v3.17 and v3.18, but it shouldn't be applied
>>> according to the stable-kernel doc because no user reports such a bug yet.
>> 
>> Hm, ok. So maybe I should retry with only patch#1 and verify that alone gets
>> around the acpi irq and the usb problems, too. Though interestingly from the
>> history, the acpi irq I saw in 3.17 while the usb devices started to fail with
>> 3.18. I will let you know in a bit. Just want to finish another bisect first.

> So it looks like patch #1 indeed does fix both the acpi irq and my usb devices.
> Sander, do you want to verify that variant, too?

Hi Stefan / Gerry,

Just tested with only patch 1, ended up the same .. the reported issues seem 
gone.


> The only odd thing left in a 3.18 with the fix (regardless of using patch #1
> only or patches #1 and #3) is that the ahci driver shows up with its pci bus
> number in /proc/interrupts. But that does not seem to have any relevant downside
> (cannot try 3.19 on that box right now for other reasons).

> -Stefan

> ...
> # 57: 12441  0    0    0  xen-pirq-msi       0000:00:1f.2
> #                                            (used to be ahci)

This is also there on baremetal with 3.19 on intel, so not xen related:
 27:       1868        582       1282        555  IR-PCI-MSI-edge      0000:00:1f.2

--
Sander

>> 
>> -Stefan
>> 
>>> Regards
>>> Gerry
>>>>
>>>> -Stefan
>>>>
>>>>>
>>>>> The number of people running into these (subtle) issues with these stable
>>>>> kernels seems to be steadily increasing.
>>>>>
>>>>> --
>>>>> Sander
>>>>>
>>>>>> Jiang Liu (3):
>>>>>>   xen/pci: Kill function xen_setup_acpi_sci()
>>>>>>   xen/irq, ACPI: Fix regression in xen PCI passthrough caused by
>>>>>>     cffe0a2b5a34
>>>>>>   xen/irq: Override ACPI IRQ management callback __acpi_unregister_gsi
>>>>>
>>>>>>  arch/x86/include/asm/acpi.h |    1 +
>>>>>>  arch/x86/kernel/acpi/boot.c |   26 +++++++++++------------
>>>>>>  arch/x86/pci/xen.c          |   49 ++-----------------------------------------
>>>>>>  drivers/acpi/pci_irq.c      |    1 -
>>>>>>  4 files changed, 16 insertions(+), 61 deletions(-)
>>>>>
>>>>>
>>>>
>> 
>> 



--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Stefan Bader Feb. 10, 2015, 1:31 p.m. UTC | #7
On 09.02.2015 20:15, Sander Eikelenboom wrote:
> 
> Monday, February 9, 2015, 5:09:44 PM, you wrote:
> 
>> On 09.02.2015 13:29, Stefan Bader wrote:
>>> On 09.02.2015 13:12, Jiang Liu wrote:
>>>> On 2015/2/9 17:47, Stefan Bader wrote:
>>>>> On 05.02.2015 21:07, Sander Eikelenboom wrote:
>>>>>>
>>>>>> Tuesday, January 20, 2015, 3:21:04 AM, you wrote:
>>>>>>
>>>>>>> Hi Thomas,
>>>>>>>         This patch set includes three hotfixes related Xen IRQ for v3.19.
>>>>>>> Sorry for the long delay to get these two regressions fixed, it really
>>>>>>> cost me some time to read and understand Xen IRQ code.
>>>>>>
>>>>>>> Patch 1 fixes the failure to register ACPI SCI interrupt on Xen
>>>>>>> domain0 by reworking acpi_gsi_to_irq(). I will backport it to v3.18
>>>>>>> too once it reaches the mainstream kernel.
>>>>>>
>>>>>>> Patch 2 fixes the regression in Xen PCI device passthrough(pciback).
>>>>>>> It's a temporary solution, I will send the formal fix for v3.20 and
>>>>>>> it has passed tests too.
>>>>>>
>>>>>>> Patch 3 fixes an issue found when reading code. There's no real bug
>>>>>>> reports related to this issue yet.
>>>>>>
>>>>>>> Great thanks to Konrad and Sander for testing fixes for these regressions.
>>>>>>
>>>>>>> Regards,
>>>>>>> Gerry
>>>>>>
>>>>>> Hi Gerry,
>>>>>>
>>>>>> Since these patches now are: tested, reviewed and have landed into mainline,
>>>>>> could you also provide the backports for 3.17 and 3.18 where required ?
>>>>>
>>>>> This would be my attempt of backporting those to 3.18 (I have not tried whether
>>>>> they would apply to 3.17 as well). Those seem to work when test-booting and
>>>>> Sander said he will give them a try as well. But better check yourself I did not
>>>>> mess anything up while backporting. One of the three patches seemed not to be
>>>>> required at all.
>>>> I'm backporting them too, but now I will give up my patches:)
>>>>
>>>> The first one is a must, which should be applied to 3.17 and 3.18.
>>>> The second one doesn't apply to 3.17 or 3.18.
>>>> The third may be applied to v3.17 and v3.18, but it shouldn't be applied
>>>> according to the stable-kernel doc because no user reports such a bug yet.
>>>
>>> Hm, ok. So maybe I should retry with only patch#1 and verify that alone gets
>>> around the acpi irq and the usb problems, too. Though interestingly from the
>>> history, the acpi irq I saw in 3.17 while the usb devices started to fail with
>>> 3.18. I will let you know in a bit. Just want to finish another bisect first.
> 
>> So it looks like patch #1 indeed does fix both the acpi irq and my usb devices.
>> Sander, do you want to verify that variant, too?
> 
> Hi Stefan / Gerry,
> 
> Just tested with only patch 1, ended up the same .. the reported issues seem 
> gone.

Sounds good. :) Gerry, do you want me to fwd the backport to Greg for 3.18 or do
you do that? As far as I know 3.17 has nobody caring about it.

-Stefan

> 
> 
>> The only odd thing left in a 3.18 with the fix (regardless of using patch #1
>> only or patches #1 and #3) is that the ahci driver shows up with its pci bus
>> number in /proc/interrupts. But that does not seem to have any relevant downside
>> (cannot try 3.19 on that box right now for other reasons).
> 
>> -Stefan
> 
>> ...
>> # 57: 12441  0    0    0  xen-pirq-msi       0000:00:1f.2
>> #                                            (used to be ahci)
> 
> This is also there on baremetal with 3.19 on intel, so not xen related:
>  27:       1868        582       1282        555  IR-PCI-MSI-edge      0000:00:1f.2
> 
> --
> Sander
> 
>>>
>>> -Stefan
>>>
>>>> Regards
>>>> Gerry
>>>>>
>>>>> -Stefan
>>>>>
>>>>>>
>>>>>> The number of people running into these (subtle) issues with these stable
>>>>>> kernels seems to be steadily increasing.
>>>>>>
>>>>>> --
>>>>>> Sander
>>>>>>
>>>>>>> Jiang Liu (3):
>>>>>>>   xen/pci: Kill function xen_setup_acpi_sci()
>>>>>>>   xen/irq, ACPI: Fix regression in xen PCI passthrough caused by
>>>>>>>     cffe0a2b5a34
>>>>>>>   xen/irq: Override ACPI IRQ management callback __acpi_unregister_gsi
>>>>>>
>>>>>>>  arch/x86/include/asm/acpi.h |    1 +
>>>>>>>  arch/x86/kernel/acpi/boot.c |   26 +++++++++++------------
>>>>>>>  arch/x86/pci/xen.c          |   49 ++-----------------------------------------
>>>>>>>  drivers/acpi/pci_irq.c      |    1 -
>>>>>>>  4 files changed, 16 insertions(+), 61 deletions(-)
>>>>>>
>>>>>>
>>>>>
>>>
>>>
> 
> 
>
diff mbox

Patch

From 96f1d05b484334ff01ea2ee2b66798e294e34d96 Mon Sep 17 00:00:00 2001
From: Jiang Liu <jiang.liu@linux.intel.com>
Date: Tue, 20 Jan 2015 10:21:07 +0800
Subject: [PATCH 2/2] x86/xen: Override ACPI IRQ management callback
 __acpi_unregister_gsi

Xen overrides __acpi_register_gsi and leaves __acpi_unregister_gsi as is.
That means, an IRQ allocated by acpi_register_gsi_xen_hvm() or
acpi_register_gsi_xen() will be freed by acpi_unregister_gsi_ioapic(),
which may cause undesired effects. So override __acpi_unregister_gsi to
NULL for safety.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Tested-by: Sander Eikelenboom <linux@eikelenboom.it>
Cc: Tony Luck <tony.luck@intel.com>
Cc: xen-devel@lists.xenproject.org
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Graeme Gregory <graeme.gregory@linaro.org>
Cc: Lv Zheng <lv.zheng@intel.com>
Link: http://lkml.kernel.org/r/1421720467-7709-4-git-send-email-jiang.liu@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
---
 arch/x86/include/asm/acpi.h | 1 +
 arch/x86/pci/xen.c          | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h
index 0ab4f9f..3a45668 100644
--- a/arch/x86/include/asm/acpi.h
+++ b/arch/x86/include/asm/acpi.h
@@ -50,6 +50,7 @@  void acpi_pic_sci_set_trigger(unsigned int, u16);
 
 extern int (*__acpi_register_gsi)(struct device *dev, u32 gsi,
 				  int trigger, int polarity);
+extern void (*__acpi_unregister_gsi)(u32 gsi);
 
 static inline void disable_acpi(void)
 {
diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c
index 6b3cf7c..3c41716 100644
--- a/arch/x86/pci/xen.c
+++ b/arch/x86/pci/xen.c
@@ -442,6 +442,7 @@  int __init pci_xen_hvm_init(void)
 	 * just how GSIs get registered.
 	 */
 	__acpi_register_gsi = acpi_register_gsi_xen_hvm;
+	__acpi_unregister_gsi = NULL;
 #endif
 
 #ifdef CONFIG_PCI_MSI
@@ -464,6 +465,7 @@  int __init pci_xen_initial_domain(void)
 	x86_msi.msix_mask_irq = xen_nop_msix_mask_irq;
 #endif
 	__acpi_register_gsi = acpi_register_gsi_xen;
+	__acpi_unregister_gsi = NULL;
 	/* Pre-allocate legacy irqs */
 	for (irq = 0; irq < nr_legacy_irqs(); irq++) {
 		int trigger, polarity;
-- 
1.9.1