Skip to contentSkip to conversation

x86/hvm: process softirq while saving/loading entries

PATCH In review Roger Pau Monne 2 participants 3 messages Oct 29, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/hvm: process softirq while saving/loading entries

On slow systems with sync_console saving or loading the context of big guests can cause the watchdog to trigger. Fix this by adding a couple of process_pending_softirqs.

---
 xen/arch/x86/hvm/save.c | 4 ++++
 1 file changed, 4 insertions(+)
xen/arch/x86/hvm/save.c +4 -0
index a2c56fbc1e..584620985b 100644
@@ -21,6 +21,7 @@
  */
 
 #include <xen/guest_access.h>
+#include <xen/softirq.h>
 #include <xen/version.h>
 
 #include <asm/hvm/support.h>
@@ -255,6 +256,7 @@ int hvm_save(struct domain *d, hvm_domain_context_t *h)
                            v, i);
                     return -ENODATA;
                 }
+                process_pending_softirqs();
             }
         }
         else
@@ -268,6 +270,7 @@ int hvm_save(struct domain *d, hvm_domain_context_t *h)
                        d->domain_id, i);
                 return -ENODATA;
             }
+            process_pending_softirqs();
         }
     }
 
@@ -341,6 +344,7 @@ int hvm_load(struct domain *d, hvm_domain_context_t *h)
                    d->domain_id, desc->typecode, desc->instance);
             return -1;
         }
+        process_pending_softirqs();
     }
 
     /* Not reached */
Signature · 1 line
2.29.0
Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Roger Pau Monne

On slow systems with sync_console saving or loading the context of big guests can cause the watchdog to trigger. Fix this by adding a couple of process_pending_softirqs.

Which raises the question in how far this is then also a problem for the caller of the underlying hypercall. IOW I wonder whether instead we need to make use of continuations here. Nevertheless
...

Quoted 1 line

Jan

#2 lore raw
Quoted 8 lines · Jan Beulich
Quoted 3 lines · Roger Pau Monne

On slow systems with sync_console saving or loading the context of big guests can cause the watchdog to trigger. Fix this by adding a couple of process_pending_softirqs.

Which raises the question in how far this is then also a problem for the caller of the underlying hypercall. IOW I wonder whether instead we need to make use of continuations here. Nevertheless

FWIW, I've only hit this with debug builds on boxes that have slow serial with sync_console enabled, due to the verbose printks.

Quoted 4 lines
Quoted 2 lines

Thanks.