File x86-no-ERESTART.patch of Package xen.7317

Use of -ERESTART to indicate the need for continuations was introduced
only in 4.5, so we need to avoid using that error code in backports.

--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -2912,9 +2912,9 @@ int vcpu_destroy_pagetables(struct vcpu
 
     /*
      * put_page_and_type_preemptible() is liable to return -EINTR. The
-     * callers of us expect -ERESTART so convert it over.
+     * callers of us expect -EAGAIN so convert it over.
      */
-    return rc != -EINTR ? rc : -ERESTART;
+    return rc != -EINTR ? rc : -EAGAIN;
 }
 
 int new_guest_cr3(unsigned long mfn)
--- a/xen/arch/x86/mm/p2m-pod.c
+++ b/xen/arch/x86/mm/p2m-pod.c
@@ -417,7 +417,7 @@ int p2m_pod_empty_cache(struct domain *d
 
  out:
     unlock_page_alloc(p2m);
-    return p2m->pod.count ? -ERESTART : 0;
+    return p2m->pod.count ? -EAGAIN : 0;
 }
 
 int
openSUSE Build Service is sponsored by