|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 2/2] xen/manage: Re-raise pending irq_work after suspend
xen_suspend() calls syscore_suspend(), which on x86 disables the APIC,
and only re-enables it in syscore_resume(). But, in between,
gnttab_resume() and xen_irq_resume() call printk().
With an nbcon console, e.g. the 8250, printk() queues irq_work, which
sends a self-IPI. As the APIC is disabled, the IPI is dropped. The
irq_work stays on the raised list, and no later irq_work_queue() on that
CPU raises the IPI again. All irq_work on that CPU is dead after resume.
Commit 560f4deda327 ("printk/nbcon: Change nbcon_irq_work to
IRQ_WORK_LAZY") removed this particular issue, but any other non-lazy
irq_work queued in this window would cause the irq_work to stall in the
same way.
To fix the issue, re-raise pending irq_work once syscore_resume() has
re-enabled the APIC.
Signed-off-by: Julian Vetter <julian.vetter@xxxxxxxxxx>
---
drivers/xen/manage.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c
index 05d7de128e71..5054fcb25337 100644
--- a/drivers/xen/manage.c
+++ b/drivers/xen/manage.c
@@ -13,6 +13,7 @@
#include <linux/stop_machine.h>
#include <linux/suspend.h>
#include <linux/freezer.h>
+#include <linux/irq_work.h>
#include <linux/syscore_ops.h>
#include <linux/export.h>
@@ -86,6 +87,8 @@ static int xen_suspend(void *data)
syscore_resume();
+ irq_work_raise_pending();
+
return 0;
}
--
2.53.0
--
Julian Vetter | Vates Hypervisor & Kernel Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |