ia64/xen-unstable

changeset 11370:43c383265de4

[POWERPC] missing shadow skeleton
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 Mon Aug 21 06:53:55 2006 -0400 (2006-08-21)
parents 883e3dc47926
children 3425e338b849
files xen/arch/powerpc/shadow.c xen/include/asm-powerpc/current.h
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/xen/arch/powerpc/shadow.c	Mon Aug 21 06:53:55 2006 -0400
     1.3 @@ -0,0 +1,36 @@
     1.4 +#include <xen/config.h>
     1.5 +#include <xen/types.h>
     1.6 +#include <xen/shadow.h>
     1.7 +#include <public/dom0_ops.h>
     1.8 +
     1.9 +int shadow_control_op(struct domain *d, 
    1.10 +                      dom0_shadow_control_t *sc,
    1.11 +                      XEN_GUEST_HANDLE(dom0_op_t) u_dom0_op)
    1.12 +{
    1.13 +    if ( unlikely(d == current->domain) )
    1.14 +    {
    1.15 +        DPRINTK("Don't try to do a shadow op on yourself!\n");
    1.16 +        return -EINVAL;
    1.17 +    }
    1.18 +
    1.19 +    switch ( sc->op )
    1.20 +    {
    1.21 +    case DOM0_SHADOW_CONTROL_OP_OFF:
    1.22 +        return 0;
    1.23 +
    1.24 +    case DOM0_SHADOW2_CONTROL_OP_GET_ALLOCATION:
    1.25 +        sc->mb = 0;
    1.26 +        return 0;
    1.27 +    case DOM0_SHADOW2_CONTROL_OP_SET_ALLOCATION:
    1.28 +        if (sc->mb > 0) {
    1.29 +            BUG();
    1.30 +            return -ENOMEM;
    1.31 +        }
    1.32 +        return 0;
    1.33 +
    1.34 +    default:
    1.35 +        printk("Bad shadow op %u\n", sc->op);
    1.36 +        BUG();
    1.37 +        return -EINVAL;
    1.38 +    }
    1.39 +}
     2.1 --- a/xen/include/asm-powerpc/current.h	Sun Aug 20 13:28:45 2006 -0400
     2.2 +++ b/xen/include/asm-powerpc/current.h	Mon Aug 21 06:53:55 2006 -0400
     2.3 @@ -66,7 +66,7 @@ static inline struct cpu_user_regs *gues
     2.4  
     2.5  static inline void reset_stack_and_jump(void (*f)(void))
     2.6  {
     2.7 -    void _reset_stack_and_jump(void (*f)(void), struct cpu_user_regs *regs);
     2.8 +    void _reset_stack_and_jump(void (*)(void), struct cpu_user_regs *);
     2.9      struct cpu_user_regs *regs = guest_cpu_user_regs();
    2.10  
    2.11  #ifdef TRACK_RESUME