ia64/linux-2.6.18-xen.hg

changeset 706:45c3a3dfa5b5

[IA64] xencomm: support several domctls for VT-d.

This patch adds xencomm support of several domctl hypercalls
for VT-d.

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Isaku Yamahata <yamahata@valinux.co.jp>
date Fri Oct 24 11:22:02 2008 +0900 (2008-10-24)
parents c87adc976013
children 61d1f2810617
files arch/ia64/xen/xcom_privcmd.c
line diff
     1.1 --- a/arch/ia64/xen/xcom_privcmd.c	Mon Oct 20 15:29:07 2008 +0100
     1.2 +++ b/arch/ia64/xen/xcom_privcmd.c	Fri Oct 24 11:22:02 2008 +0900
     1.3 @@ -340,6 +340,20 @@ xencomm_privcmd_domctl(privcmd_hypercall
     1.4  			return -ENOMEM;
     1.5  		set_xen_guest_handle(kern_op.u.hvmcontext.buffer, (void*)desc);
     1.6  		break;
     1.7 +	case XEN_DOMCTL_get_device_group: 
     1.8 +	{
     1.9 +		struct xen_domctl_get_device_group *get_device_group =
    1.10 +			&kern_op.u.get_device_group;
    1.11 +		desc = xencomm_map(
    1.12 +			xen_guest_handle(get_device_group->sdev_array),
    1.13 +			get_device_group->max_sdevs * sizeof(uint32_t));
    1.14 +		if (xen_guest_handle(get_device_group->sdev_array) != NULL &&
    1.15 +		    get_device_group->max_sdevs > 0 && desc == NULL)
    1.16 +			return -ENOMEM;
    1.17 +		set_xen_guest_handle(kern_op.u.get_device_group.sdev_array,
    1.18 +				     (void*)desc);
    1.19 +		break;
    1.20 +	}
    1.21  	case XEN_DOMCTL_max_vcpus:
    1.22  	case XEN_DOMCTL_scheduler_op:
    1.23  	case XEN_DOMCTL_setdomainhandle:
    1.24 @@ -354,6 +368,12 @@ xencomm_privcmd_domctl(privcmd_hypercall
    1.25  	case XEN_DOMCTL_set_opt_feature:
    1.26  	case XEN_DOMCTL_assign_device:
    1.27  	case XEN_DOMCTL_subscribe:
    1.28 +	case XEN_DOMCTL_test_assign_device:
    1.29 +	case XEN_DOMCTL_deassign_device:
    1.30 +	case XEN_DOMCTL_bind_pt_irq:
    1.31 +	case XEN_DOMCTL_unbind_pt_irq:
    1.32 +	case XEN_DOMCTL_memory_mapping:
    1.33 +	case XEN_DOMCTL_ioport_mapping:
    1.34  		break;
    1.35  	case XEN_DOMCTL_pin_mem_cacheattr:
    1.36  		return -ENOSYS;