# HG changeset patch
# User Jimi Xenidis <[EMAIL PROTECTED]>
# Node ID dbe9249ba61b0d616f3e43ee54fea83d635285c9
# Parent  a7abc95d4ce4177acd9cfbd58476d521352f9ff7
[XEN][POWERPC] Xen shadow ops, mostly skeleton code

Signed-off-by: Jimi Xenidis <[EMAIL PROTECTED]>
---
 xen/arch/powerpc/Makefile        |    1 +
 xen/arch/powerpc/dom0_ops.c      |   15 +++++++++++++++
 xen/include/asm-powerpc/shadow.h |    4 ++++
 3 files changed, 20 insertions(+)

diff -r a7abc95d4ce4 -r dbe9249ba61b xen/arch/powerpc/Makefile
--- a/xen/arch/powerpc/Makefile Sun Aug 20 13:06:37 2006 -0400
+++ b/xen/arch/powerpc/Makefile Sun Aug 20 13:28:45 2006 -0400
@@ -32,6 +32,7 @@ obj-y += physdev.o
 obj-y += physdev.o
 obj-y += rtas.o
 obj-y += setup.o
+obj-y += shadow.o
 obj-y += smp.o
 obj-y += time.o
 obj-y += usercopy.o
diff -r a7abc95d4ce4 -r dbe9249ba61b xen/arch/powerpc/dom0_ops.c
--- a/xen/arch/powerpc/dom0_ops.c       Sun Aug 20 13:06:37 2006 -0400
+++ b/xen/arch/powerpc/dom0_ops.c       Sun Aug 20 13:28:45 2006 -0400
@@ -23,6 +23,7 @@
 #include <xen/lib.h>
 #include <xen/sched.h>
 #include <xen/guest_access.h>
+#include <xen/shadow.h>
 #include <public/xen.h>
 #include <public/dom0_ops.h>
 
@@ -94,8 +95,22 @@ long arch_do_dom0_op(struct dom0_op *op,
             ret = -EFAULT;
     }
     break;
+    case DOM0_SHADOW_CONTROL:
+    {
+        struct domain *d;
+        ret = -ESRCH;
+        d = find_domain_by_id(op->u.shadow_control.domain);
+        if ( d != NULL )
+        {
+            ret = shadow_control_op(d, &op->u.shadow_control, u_dom0_op);
+            put_domain(d);
+            copy_to_guest(u_dom0_op, op, 1);
+        } 
+    }
+    break;
 
     default:
+        printk("%s: unsupported op: 0x%x\n", __func__, (op->cmd));
         ret = -ENOSYS;
         break;
     }
diff -r a7abc95d4ce4 -r dbe9249ba61b xen/include/asm-powerpc/shadow.h
--- a/xen/include/asm-powerpc/shadow.h  Sun Aug 20 13:06:37 2006 -0400
+++ b/xen/include/asm-powerpc/shadow.h  Sun Aug 20 13:28:45 2006 -0400
@@ -56,4 +56,8 @@ static inline void mark_dirty(struct dom
     return;
 }
 #define gnttab_mark_dirty(d, f) mark_dirty((d), (f))
+
+extern int shadow_control_op(struct domain *d, 
+                             dom0_shadow_control_t *sc,
+                             XEN_GUEST_HANDLE(dom0_op_t) u_dom0_op);
 #endif

_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel

Reply via email to