ia64/linux-2.6.18-xen.hg

changeset 673:3161879fdf22

[IA64] xencomm: support XENMEM_add_to_physmap and XENMEM_remove_from_phsymap

support XENMEM_add_to_physmap and XENMEM_remove_from_phsymap.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Isaku Yamahata <yamahata@valinux.co.jp>
date Tue Sep 16 21:26:15 2008 +0900 (2008-09-16)
parents 7d032c5bb346
children 5f3c40a4c214
files arch/ia64/xen/xcom_privcmd.c
line diff
     1.1 --- a/arch/ia64/xen/xcom_privcmd.c	Tue Sep 16 21:25:54 2008 +0900
     1.2 +++ b/arch/ia64/xen/xcom_privcmd.c	Tue Sep 16 21:26:15 2008 +0900
     1.3 @@ -575,6 +575,33 @@ xencomm_privcmd_memory_op(privcmd_hyperc
     1.4  
     1.5  		return ret;
     1.6  	}
     1.7 +	case XENMEM_add_to_physmap:
     1.8 +	case XENMEM_remove_from_physmap:
     1.9 +	{
    1.10 +		void __user *arg = (void __user *)hypercall->arg[1];
    1.11 +		size_t argsize;
    1.12 +		struct xencomm_handle *desc;
    1.13 +
    1.14 +		switch (cmd) {
    1.15 +		case XENMEM_add_to_physmap: 
    1.16 +			argsize = sizeof(struct xen_add_to_physmap);
    1.17 +			break;
    1.18 +		case XENMEM_remove_from_physmap:
    1.19 +			argsize = sizeof(struct xen_remove_from_physmap);
    1.20 +			break;
    1.21 +		default:
    1.22 +			BUG();
    1.23 +		}
    1.24 +
    1.25 +		desc = xencomm_map(arg, argsize);
    1.26 +		if (desc == NULL)
    1.27 +			return -ENOMEM;
    1.28 +
    1.29 +		ret = xencomm_arch_hypercall_memory_op(cmd, desc);
    1.30 +
    1.31 +		xencomm_free(desc);
    1.32 +		return ret;
    1.33 +	}
    1.34  	default:
    1.35  		printk("%s: unknown memory op %lu\n", __func__, cmd);
    1.36  		ret = -ENOSYS;