[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [IA64] stub for XENMEM_[gs]et_pod_target.



# HG changeset patch
# User Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
# Date 1231306113 -32400
# Node ID b0beee2685433da53ba3943880282c3e38e7a257
# Parent  7152abcd560d9b94113dda60fdae5b9b5ef1d48b
[IA64] stub for XENMEM_[gs]et_pod_target.

This patch adds the stub for XENMEM_[gs]et_pod_target.
Without this patch, domain builder aborts on the error.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 xen/arch/ia64/xen/mm.c |   39 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 39 insertions(+)

diff -r 7152abcd560d -r b0beee268543 xen/arch/ia64/xen/mm.c
--- a/xen/arch/ia64/xen/mm.c    Wed Jan 07 14:27:03 2009 +0900
+++ b/xen/arch/ia64/xen/mm.c    Wed Jan 07 14:28:33 2009 +0900
@@ -3437,6 +3437,45 @@ arch_memory_op(int op, XEN_GUEST_HANDLE(
         return 0;
     }
 
+    case XENMEM_get_pod_target:
+    case XENMEM_set_pod_target: {
+        /* XXX: PoD populate on demand isn't supported yet. */
+        xen_pod_target_t target;
+        struct domain *d;
+
+        /* Support DOMID_SELF? */
+        if ( !IS_PRIV(current->domain) )
+            return -EINVAL;
+
+        if ( copy_from_guest(&target, arg, 1) )
+            return -EFAULT;
+
+        rc = rcu_lock_target_domain_by_id(target.domid, &d);
+        if ( rc != 0 )
+            return rc;
+
+        if ( op == XENMEM_set_pod_target )
+        {
+            /* if -ENOSYS is returned,
+               domain builder aborts domain creation. */
+            /* rc = -ENOSYS; */
+        }
+
+        target.tot_pages       = d->tot_pages;
+        target.pod_cache_pages = 0;
+        target.pod_entries     = 0;
+
+        if ( copy_to_guest(arg, &target, 1) )
+        {
+            rc= -EFAULT;
+            goto pod_target_out_unlock;
+        }
+        
+    pod_target_out_unlock:
+        rcu_unlock_domain(d);
+        return rc;
+    }
+
     default:
         return -ENOSYS;
     }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.