[Xen-devel] [PATCH v2] x86/suspend: disable watchdog before calling console_start_sync()

Igor Druzhinin posted 1 patch 4 years, 2 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/xen tags/patchew/1580222228-21828-1-git-send-email-igor.druzhinin@citrix.com
xen/arch/x86/acpi/power.c | 4 ++++
1 file changed, 4 insertions(+)
[Xen-devel] [PATCH v2] x86/suspend: disable watchdog before calling console_start_sync()
Posted by Igor Druzhinin 4 years, 2 months ago
... and enable it after exiting S-state. Otherwise accumulated
output in serial buffer might easily trigger the watchdog if it's
still enabled after entering sync transmission mode.

The issue observed on machines which, unfortunately, generate non-0
output in CPU offline callbacks.

Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
---
 xen/arch/x86/acpi/power.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/xen/arch/x86/acpi/power.c b/xen/arch/x86/acpi/power.c
index 8078352..feb0f6c 100644
--- a/xen/arch/x86/acpi/power.c
+++ b/xen/arch/x86/acpi/power.c
@@ -23,6 +23,7 @@
 #include <xen/domain.h>
 #include <xen/console.h>
 #include <xen/iommu.h>
+#include <xen/watchdog.h>
 #include <xen/cpu.h>
 #include <public/platform.h>
 #include <asm/tboot.h>
@@ -223,6 +224,7 @@ static int enter_state(u32 state)
 
     acpi_sleep_prepare(state);
 
+    watchdog_disable();
     console_start_sync();
     printk("Entering ACPI S%d state.\n", state);
 
@@ -235,6 +237,7 @@ static int enter_state(u32 state)
         system_state = SYS_STATE_resume;
         device_power_up(error);
         console_end_sync();
+        watchdog_enable();
         error = -EIO;
         goto done;
     }
@@ -281,6 +284,7 @@ static int enter_state(u32 state)
         tboot_s3_error(error);
 
     console_end_sync();
+    watchdog_enable();
 
     microcode_update_one(true);
 
-- 
2.7.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH v2] x86/suspend: disable watchdog before calling console_start_sync()
Posted by Jan Beulich 4 years, 2 months ago
On 28.01.2020 15:37, Igor Druzhinin wrote:
> ... and enable it after exiting S-state. Otherwise accumulated
> output in serial buffer might easily trigger the watchdog if it's
> still enabled after entering sync transmission mode.
> 
> The issue observed on machines which, unfortunately, generate non-0
> output in CPU offline callbacks.
> 
> Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel