ia64/xen-unstable

changeset 18999:b0beee268543

[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@valinux.co.jp>
author Isaku Yamahata <yamahata@valinux.co.jp>
date Wed Jan 07 14:28:33 2009 +0900 (2009-01-07)
parents 7152abcd560d
children 4fd4dcf2f891 6d96d3c02e94
files xen/arch/ia64/xen/mm.c
line diff
     1.1 --- a/xen/arch/ia64/xen/mm.c	Wed Jan 07 14:27:03 2009 +0900
     1.2 +++ b/xen/arch/ia64/xen/mm.c	Wed Jan 07 14:28:33 2009 +0900
     1.3 @@ -3437,6 +3437,45 @@ arch_memory_op(int op, XEN_GUEST_HANDLE(
     1.4          return 0;
     1.5      }
     1.6  
     1.7 +    case XENMEM_get_pod_target:
     1.8 +    case XENMEM_set_pod_target: {
     1.9 +        /* XXX: PoD populate on demand isn't supported yet. */
    1.10 +        xen_pod_target_t target;
    1.11 +        struct domain *d;
    1.12 +
    1.13 +        /* Support DOMID_SELF? */
    1.14 +        if ( !IS_PRIV(current->domain) )
    1.15 +            return -EINVAL;
    1.16 +
    1.17 +        if ( copy_from_guest(&target, arg, 1) )
    1.18 +            return -EFAULT;
    1.19 +
    1.20 +        rc = rcu_lock_target_domain_by_id(target.domid, &d);
    1.21 +        if ( rc != 0 )
    1.22 +            return rc;
    1.23 +
    1.24 +        if ( op == XENMEM_set_pod_target )
    1.25 +        {
    1.26 +            /* if -ENOSYS is returned,
    1.27 +               domain builder aborts domain creation. */
    1.28 +            /* rc = -ENOSYS; */
    1.29 +        }
    1.30 +
    1.31 +        target.tot_pages       = d->tot_pages;
    1.32 +        target.pod_cache_pages = 0;
    1.33 +        target.pod_entries     = 0;
    1.34 +
    1.35 +        if ( copy_to_guest(arg, &target, 1) )
    1.36 +        {
    1.37 +            rc= -EFAULT;
    1.38 +            goto pod_target_out_unlock;
    1.39 +        }
    1.40 +        
    1.41 +    pod_target_out_unlock:
    1.42 +        rcu_unlock_domain(d);
    1.43 +        return rc;
    1.44 +    }
    1.45 +
    1.46      default:
    1.47          return -ENOSYS;
    1.48      }