direct-io.hg

changeset 14504:9fbaf07d3f67

[IA64] Add HYPERVISOR_vcpu_op

For support of steal time accounting, only supports
VCPUOP_register_runstate_memory_area right now.

Signed-off-by: Atsushi SAKAI <sakaia@jp.fujitsu.com>
author awilliam@xenbuild2.aw
date Thu Mar 08 09:50:25 2007 -0700 (2007-03-08)
parents 4e367aa89895
children 1f303be68364
files linux-2.6-xen-sparse/arch/ia64/xen/xcom_hcall.c linux-2.6-xen-sparse/include/asm-ia64/hypercall.h linux-2.6-xen-sparse/include/asm-ia64/xen/xcom_hcall.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/ia64/xen/xcom_hcall.c	Wed Mar 07 13:16:07 2007 -0700
     1.2 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/xcom_hcall.c	Thu Mar 08 09:50:25 2007 -0700
     1.3 @@ -33,6 +33,7 @@
     1.4  #include <xen/interface/acm_ops.h>
     1.5  #include <xen/interface/hvm/params.h>
     1.6  #include <xen/interface/xenoprof.h>
     1.7 +#include <xen/interface/vcpu.h>
     1.8  #include <asm/hypercall.h>
     1.9  #include <asm/page.h>
    1.10  #include <asm/uaccess.h>
    1.11 @@ -363,3 +364,20 @@ xencomm_hypercall_perfmon_op(unsigned lo
    1.12  	                                         xencomm_create_inline(arg),
    1.13  	                                         count);
    1.14  }
    1.15 +
    1.16 +long
    1.17 +xencomm_hypercall_vcpu_op(int cmd, int cpu, void *arg)
    1.18 +{
    1.19 +	switch (cmd) {
    1.20 +	case VCPUOP_register_runstate_memory_area:
    1.21 +		xencommize_memory_reservation((xen_memory_reservation_t *)arg);
    1.22 +		break;
    1.23 +
    1.24 +	default:
    1.25 +		printk("%s: unknown vcpu op %d\n", __func__, cmd);
    1.26 +		return -ENOSYS;
    1.27 +	}
    1.28 +
    1.29 +	return xencomm_arch_hypercall_vcpu_op(cmd, cpu,
    1.30 +					      xencomm_create_inline(arg));
    1.31 +}
     2.1 --- a/linux-2.6-xen-sparse/include/asm-ia64/hypercall.h	Wed Mar 07 13:16:07 2007 -0700
     2.2 +++ b/linux-2.6-xen-sparse/include/asm-ia64/hypercall.h	Thu Mar 08 09:50:25 2007 -0700
     2.3 @@ -205,6 +205,12 @@ xencomm_arch_hypercall_hvm_op(int cmd, v
     2.4  	return _hypercall2(unsigned long, hvm_op, cmd, arg);
     2.5  }
     2.6  
     2.7 +static inline long
     2.8 +xencomm_arch_hypercall_vcpu_op(int cmd, int cpu, void *arg)
     2.9 +{
    2.10 +	return _hypercall3(long, vcpu_op, cmd, cpu, arg);
    2.11 +}
    2.12 +
    2.13  static inline int
    2.14  HYPERVISOR_physdev_op(int cmd, void *arg)
    2.15  {
    2.16 @@ -405,5 +411,6 @@ xencomm_arch_hypercall_perfmon_op(unsign
    2.17  #endif
    2.18  
    2.19  #define HYPERVISOR_suspend xencomm_hypercall_suspend
    2.20 +#define HYPERVISOR_vcpu_op xencomm_hypercall_vcpu_op
    2.21  
    2.22  #endif /* __HYPERCALL_H__ */
     3.1 --- a/linux-2.6-xen-sparse/include/asm-ia64/xen/xcom_hcall.h	Wed Mar 07 13:16:07 2007 -0700
     3.2 +++ b/linux-2.6-xen-sparse/include/asm-ia64/xen/xcom_hcall.h	Thu Mar 08 09:50:25 2007 -0700
     3.3 @@ -51,6 +51,8 @@ extern int xencomm_hypercall_xenoprof_op
     3.4  extern int xencomm_hypercall_perfmon_op(unsigned long cmd, void* arg,
     3.5                                          unsigned long count);
     3.6  
     3.7 +extern long xencomm_hypercall_vcpu_op(int cmd, int cpu, void *arg);
     3.8 +
     3.9  /* Using mini xencomm.  */
    3.10  extern int xencomm_mini_hypercall_console_io(int cmd, int count, char *str);
    3.11