File x86-no-ERESTART.patch of Package xen.6121
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.
Index: xen-4.4.4-testing/xen/arch/x86/mm.c
===================================================================
--- xen-4.4.4-testing.orig/xen/arch/x86/mm.c
+++ xen-4.4.4-testing/xen/arch/x86/mm.c
@@ -2903,9 +2903,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)
Index: xen-4.4.4-testing/xen/arch/x86/mm/p2m-pod.c
===================================================================
--- xen-4.4.4-testing.orig/xen/arch/x86/mm/p2m-pod.c
+++ xen-4.4.4-testing/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