direct-io.hg

changeset 11366:883e3dc47926

[XEN][POWERPC] Xen shadow ops, mostly skeleton code
Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author Jimi Xenidis <jimix@watson.ibm.com>
date Sun Aug 20 13:28:45 2006 -0400 (2006-08-20)
parents 75b4982b82fe
children 43c383265de4
files xen/arch/powerpc/Makefile xen/arch/powerpc/dom0_ops.c xen/include/asm-powerpc/shadow.h
line diff
     1.1 --- a/xen/arch/powerpc/Makefile	Tue Aug 29 14:36:16 2006 -0500
     1.2 +++ b/xen/arch/powerpc/Makefile	Sun Aug 20 13:28:45 2006 -0400
     1.3 @@ -32,6 +32,7 @@ obj-y += ofd_fixup.o
     1.4  obj-y += physdev.o
     1.5  obj-y += rtas.o
     1.6  obj-y += setup.o
     1.7 +obj-y += shadow.o
     1.8  obj-y += smp.o
     1.9  obj-y += time.o
    1.10  obj-y += usercopy.o
     2.1 --- a/xen/arch/powerpc/dom0_ops.c	Tue Aug 29 14:36:16 2006 -0500
     2.2 +++ b/xen/arch/powerpc/dom0_ops.c	Sun Aug 20 13:28:45 2006 -0400
     2.3 @@ -23,6 +23,7 @@
     2.4  #include <xen/lib.h>
     2.5  #include <xen/sched.h>
     2.6  #include <xen/guest_access.h>
     2.7 +#include <xen/shadow.h>
     2.8  #include <public/xen.h>
     2.9  #include <public/domctl.h>
    2.10  #include <public/sysctl.h>
    2.11 @@ -107,8 +108,22 @@ long arch_do_sysctl(struct xen_sysctl *s
    2.12              ret = -EFAULT;
    2.13      }
    2.14      break;
    2.15 +    case DOM0_SHADOW_CONTROL:
    2.16 +    {
    2.17 +        struct domain *d;
    2.18 +        ret = -ESRCH;
    2.19 +        d = find_domain_by_id(op->u.shadow_control.domain);
    2.20 +        if ( d != NULL )
    2.21 +        {
    2.22 +            ret = shadow_control_op(d, &op->u.shadow_control, u_dom0_op);
    2.23 +            put_domain(d);
    2.24 +            copy_to_guest(u_dom0_op, op, 1);
    2.25 +        } 
    2.26 +    }
    2.27 +    break;
    2.28  
    2.29      default:
    2.30 +        printk("%s: unsupported op: 0x%x\n", __func__, (op->cmd));
    2.31          ret = -ENOSYS;
    2.32          break;
    2.33      }
     3.1 --- a/xen/include/asm-powerpc/shadow.h	Tue Aug 29 14:36:16 2006 -0500
     3.2 +++ b/xen/include/asm-powerpc/shadow.h	Sun Aug 20 13:28:45 2006 -0400
     3.3 @@ -56,4 +56,8 @@ static inline void mark_dirty(struct dom
     3.4      return;
     3.5  }
     3.6  #define gnttab_mark_dirty(d, f) mark_dirty((d), (f))
     3.7 +
     3.8 +extern int shadow_control_op(struct domain *d, 
     3.9 +                             dom0_shadow_control_t *sc,
    3.10 +                             XEN_GUEST_HANDLE(dom0_op_t) u_dom0_op);
    3.11  #endif