ia64/xen-unstable

changeset 11723:49bf2381e009

[IA64] xencomm_privcmd_sched_op

Necessary for reboot on VTi domains.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
author awilliam@xenbuild.aw
date Wed Oct 04 22:11:50 2006 -0600 (2006-10-04)
parents 3f3a818d56f5
children 4786a0b3d6c5
files linux-2.6-xen-sparse/arch/ia64/xen/xcom_privcmd.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/ia64/xen/xcom_privcmd.c	Wed Oct 04 22:11:34 2006 -0600
     1.2 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/xcom_privcmd.c	Wed Oct 04 22:11:50 2006 -0600
     1.3 @@ -545,6 +545,34 @@ xencomm_privcmd_hvm_op(privcmd_hypercall
     1.4  	return ret;
     1.5  }
     1.6  
     1.7 +static int
     1.8 +xencomm_privcmd_sched_op(privcmd_hypercall_t *hypercall)
     1.9 +{
    1.10 +	int cmd = hypercall->arg[0];
    1.11 +	struct xencomm_handle *desc;
    1.12 +	unsigned int argsize;
    1.13 +	int ret;
    1.14 +
    1.15 +	switch (cmd) {
    1.16 +	case SCHEDOP_remote_shutdown:
    1.17 +		argsize = sizeof(sched_remote_shutdown_t);
    1.18 +		break;
    1.19 +	default:
    1.20 +		printk("%s: unknown SCHEDOP %d\n", __func__, cmd);
    1.21 +		return -EINVAL;
    1.22 +	}
    1.23 +
    1.24 +	ret = xencomm_create((void *)hypercall->arg[1], argsize,
    1.25 +	                     &desc, GFP_KERNEL);
    1.26 +	if (ret)
    1.27 +		return ret;
    1.28 +
    1.29 +	ret = xencomm_arch_hypercall_sched_op(cmd, desc);
    1.30 +
    1.31 +	xencomm_free(desc);
    1.32 +	return ret;
    1.33 +}
    1.34 +
    1.35  int
    1.36  privcmd_hypercall(privcmd_hypercall_t *hypercall)
    1.37  {
    1.38 @@ -565,6 +593,8 @@ privcmd_hypercall(privcmd_hypercall_t *h
    1.39  		return xencomm_privcmd_event_channel_op(hypercall);
    1.40  	case __HYPERVISOR_hvm_op:
    1.41  		return xencomm_privcmd_hvm_op(hypercall);
    1.42 +	case __HYPERVISOR_sched_op:
    1.43 +		return xencomm_privcmd_sched_op(hypercall);
    1.44  	default:
    1.45  		printk("%s: unknown hcall (%ld)\n", __func__, hypercall->op);
    1.46  		return -ENOSYS;