[PATCH] [IA64] support XEN_DOMCTL_mem_sharing_op

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] [IA64] support XEN_DOMCTL_mem_sharing_op

KUWAMURA Shin'ya
Hi,

Creating HVM domains fails on ia64:
  Error: (38, 'Function not implemented')
This patch fixes it.

Signed-off-by: KUWAMURA Shin'ya <[hidden email]>

Best regards,
--
  KUWAMURA Shin'ya

# HG changeset patch
# User KUWAMURA Shin'ya <[hidden email]>
# Date 1262925519 -32400
# Node ID 848cd4cd9a243ca5d11eb45525af72f7561491b3
# Parent  c41dbd268c7a7c9f02cc46e89368b1f07932c8de
[IA64] support XEN_DOMCTL_mem_sharing_op

Because memory sharing is not implemented on ia64, only
XEN_DOMCTL_MEM_SHARING_OP_CONTROL is supported.

Signed-off-by: KUWAMURA Shin'ya <[hidden email]>

diff -r c41dbd268c7a -r 848cd4cd9a24 xen/arch/ia64/xen/dom0_ops.c
--- a/xen/arch/ia64/xen/dom0_ops.c Thu Jan 07 16:41:13 2010 +0900
+++ b/xen/arch/ia64/xen/dom0_ops.c Fri Jan 08 13:38:39 2010 +0900
@@ -683,6 +683,35 @@ long arch_do_domctl(xen_domctl_t *op, XE
     }
     break;
 
+    case XEN_DOMCTL_mem_sharing_op:
+    {
+        xen_domctl_mem_sharing_op_t *mec = &op->u.mem_sharing_op;
+        struct domain *d = rcu_lock_domain_by_id(op->domain);
+
+        ret = -ESRCH;
+        if (d == NULL)
+            break;
+
+        switch(mec->op)
+        {
+            case XEN_DOMCTL_MEM_SHARING_OP_CONTROL:
+            {
+                if (mec->u.enable) {
+                    ret = -EINVAL; /* not implemented */
+                    break;
+                }
+                ret = 0;
+            }
+            break;
+
+            default:
+                ret = -ENOSYS;
+        }
+        
+        rcu_unlock_domain(d);
+    }
+    break;
+
     default:
         printk("arch_do_domctl: unrecognized domctl: %d!!!\n",op->cmd);
         ret = -ENOSYS;

_______________________________________________
Xen-ia64-devel mailing list
[hidden email]
http://lists.xensource.com/xen-ia64-devel