Skip to content

Commit fec6836

Browse files
fllindenPortia Stephens
authored andcommitted
UBUNTU: SAUCE: xen: Only restore the ACPI SCI interrupt in xen_restore_pirqs.
BugLink: https://bugs.launchpad.net/bugs/1913410 Restoring all PIRQs, which is the right thing to do, was causing problems on larger instances. This is a horrible workaround until this issue is fully understood. Signed-off-by: Frank van der Linden <fllinden@amazon.com> Reviewed-by: Alakesh Haloi <alakeshh@amazon.com> Reviewed-by: Anchal Agarwal <anchalag@amazon.com> Reviewed-by: Qian Lu <luqia@amazon.com> (cherry picked from 88d49684bde78117795c5cafb8fd326188e9031e https://github.com/amazonlinux/linux.git) Signed-off-by: Andrea Righi <andrea.righi@canonical.com> Acked-by: Stefan Bader <stefan.bader@canonical.com> Acked-by: Kelsey Skunberg <kelsey.skunberg@canonical.com> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
1 parent ab8c9f9 commit fec6836

File tree

1 file changed

+41
-1
lines changed

1 file changed

+41
-1
lines changed

drivers/xen/events/events_base.c

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@
6464
#include <xen/interface/vcpu.h>
6565
#include <asm/hw_irq.h>
6666

67+
#ifdef CONFIG_ACPI
68+
#include <linux/acpi.h>
69+
#endif
70+
6771
#include "events_internal.h"
6872

6973
#undef MODULE_PARAM_PREFIX
@@ -2040,9 +2044,45 @@ void xen_shutdown_pirqs(void)
20402044
}
20412045
}
20422046

2047+
/*
2048+
* For now, only restore the ACPI SCI pirq.
2049+
*/
20432050
void xen_restore_pirqs(void)
20442051
{
2045-
restore_pirqs();
2052+
#ifdef CONFIG_ACPI
2053+
int pirq, rc, irq, gsi;
2054+
struct physdev_map_pirq map_irq;
2055+
struct irq_info *info;
2056+
2057+
list_for_each_entry(info, &xen_irq_list_head, list) {
2058+
if (info->type != IRQT_PIRQ)
2059+
continue;
2060+
2061+
pirq = info->u.pirq.pirq;
2062+
gsi = info->u.pirq.gsi;
2063+
irq = info->irq;
2064+
2065+
if (gsi != acpi_gbl_FADT.sci_interrupt)
2066+
continue;
2067+
2068+
map_irq.domid = DOMID_SELF;
2069+
map_irq.type = MAP_PIRQ_TYPE_GSI;
2070+
map_irq.index = gsi;
2071+
map_irq.pirq = pirq;
2072+
2073+
rc = HYPERVISOR_physdev_op(PHYSDEVOP_map_pirq, &map_irq);
2074+
if (rc) {
2075+
pr_warn("xen: ACPI SCI interrupt map failed, rc=%d\n",
2076+
rc);
2077+
xen_free_irq(irq);
2078+
continue;
2079+
}
2080+
2081+
printk(KERN_DEBUG "xen: restored ACPI SCI interrupt\n");
2082+
2083+
__startup_pirq(irq);
2084+
}
2085+
#endif
20462086
}
20472087

20482088
static struct irq_chip xen_dynamic_chip __read_mostly = {

0 commit comments

Comments
 (0)