ia64/xen-unstable

changeset 9563:9bee4875a848

Rename sched_op->sched_op_compat and sched_op_new->sched_op
after Christian's interface cleanup.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Sat Apr 01 11:08:50 2006 +0100 (2006-04-01)
parents 508cb44338f5
children 60071beccf18
files xen/arch/ia64/vmx/vmx_hypercall.c xen/arch/ia64/vmx/vmx_ivt.S xen/arch/ia64/vmx/vmx_support.c xen/arch/ia64/xen/hypercall.c xen/arch/x86/hvm/io.c xen/arch/x86/x86_32/entry.S xen/arch/x86/x86_64/entry.S xen/common/schedule.c xen/include/public/sched.h xen/include/xen/hypercall.h
line diff
     1.1 --- a/xen/arch/ia64/vmx/vmx_hypercall.c	Sat Apr 01 10:52:47 2006 +0100
     1.2 +++ b/xen/arch/ia64/vmx/vmx_hypercall.c	Sat Apr 01 11:08:50 2006 +0100
     1.3 @@ -35,7 +35,7 @@
     1.4  #include <asm/dom_fw.h>
     1.5  #include <xen/domain.h>
     1.6  
     1.7 -extern long do_sched_op(int cmd, unsigned long arg);
     1.8 +extern long do_sched_op_compat(int cmd, unsigned long arg);
     1.9  extern unsigned long domain_mpa_to_imva(struct domain *,unsigned long mpaddr);
    1.10  
    1.11  void hyper_not_support(void)
    1.12 @@ -83,13 +83,13 @@ void hyper_dom_mem_op(void)
    1.13  }
    1.14  
    1.15  
    1.16 -void hyper_sched_op(void)
    1.17 +void hyper_sched_op_compat(void)
    1.18  {
    1.19      VCPU *vcpu=current;
    1.20      u64 r32,r33,ret;
    1.21      vcpu_get_gr_nat(vcpu,16,&r32);
    1.22      vcpu_get_gr_nat(vcpu,17,&r33);
    1.23 -    ret=do_sched_op(r32,r33);
    1.24 +    ret=do_sched_op_compat(r32,r33);
    1.25      vcpu_set_gr(vcpu, 8, ret, 0);
    1.26  
    1.27      vmx_vcpu_increment_iip(vcpu);
     2.1 --- a/xen/arch/ia64/vmx/vmx_ivt.S	Sat Apr 01 10:52:47 2006 +0100
     2.2 +++ b/xen/arch/ia64/vmx/vmx_ivt.S	Sat Apr 01 11:08:50 2006 +0100
     2.3 @@ -1125,7 +1125,7 @@ hyper_call_table:
     2.4      data8 hyper_not_support     //hyper_stack_switch
     2.5      data8 hyper_not_support     //hyper_set_callbacks
     2.6      data8 hyper_not_support     //hyper_fpu_taskswitch     /*  5 */
     2.7 -    data8 hyper_sched_op
     2.8 +    data8 hyper_sched_op_compat
     2.9      data8 hyper_dom0_op
    2.10      data8 hyper_not_support     //hyper_set_debugreg
    2.11      data8 hyper_not_support     //hyper_get_debugreg
     3.1 --- a/xen/arch/ia64/vmx/vmx_support.c	Sat Apr 01 10:52:47 2006 +0100
     3.2 +++ b/xen/arch/ia64/vmx/vmx_support.c	Sat Apr 01 11:08:50 2006 +0100
     3.3 @@ -43,7 +43,7 @@ void vmx_wait_io(void)
     3.4      do {
     3.5  	if (!test_bit(port,
     3.6  		&d->shared_info->evtchn_pending[0]))
     3.7 -            do_sched_op(SCHEDOP_block, 0);
     3.8 +            do_sched_op_compat(SCHEDOP_block, 0);
     3.9  
    3.10  	/* Unblocked when some event is coming. Clear pending indication
    3.11  	 * immediately if deciding to go for io assist
     4.1 --- a/xen/arch/ia64/xen/hypercall.c	Sat Apr 01 10:52:47 2006 +0100
     4.2 +++ b/xen/arch/ia64/xen/hypercall.c	Sat Apr 01 11:08:50 2006 +0100
     4.3 @@ -38,7 +38,7 @@ hypercall_t ia64_hypercall_table[] =
     4.4  	(hypercall_t)do_ni_hypercall,		/* do_stack_switch */
     4.5  	(hypercall_t)do_ni_hypercall,		/* do_set_callbacks */
     4.6  	(hypercall_t)do_ni_hypercall,		/* do_fpu_taskswitch */		/*  5 */
     4.7 -	(hypercall_t)do_ni_hypercall,		/* do_sched_op */
     4.8 +	(hypercall_t)do_ni_hypercall,		/* do_sched_op_compat */
     4.9  	(hypercall_t)do_dom0_op,
    4.10  	(hypercall_t)do_ni_hypercall,		/* do_set_debugreg */
    4.11  	(hypercall_t)do_ni_hypercall,		/* do_get_debugreg */
    4.12 @@ -160,7 +160,7 @@ fw_hypercall (struct pt_regs *regs)
    4.13  			}
    4.14  			else {
    4.15  				pal_halt_light_count++;
    4.16 -				do_sched_op(SCHEDOP_yield, 0);
    4.17 +				do_sched_op_compat(SCHEDOP_yield, 0);
    4.18  			}
    4.19  			regs->r8 = 0;
    4.20  			regs->r9 = 0;
     5.1 --- a/xen/arch/x86/hvm/io.c	Sat Apr 01 10:52:47 2006 +0100
     5.2 +++ b/xen/arch/x86/hvm/io.c	Sat Apr 01 11:08:50 2006 +0100
     5.3 @@ -713,7 +713,7 @@ void hvm_wait_io(void)
     5.4          if ( !test_bit(ARCH_HVM_IO_WAIT, &v->arch.hvm_vcpu.ioflags) )
     5.5              break;
     5.6  
     5.7 -        do_sched_op(SCHEDOP_block, 0);
     5.8 +        do_sched_op_compat(SCHEDOP_block, 0);
     5.9      }
    5.10  
    5.11      /*
    5.12 @@ -743,7 +743,7 @@ void hvm_safe_block(void)
    5.13          if ( test_bit(port, &d->shared_info->evtchn_pending[0]) )
    5.14              break;
    5.15  
    5.16 -        do_sched_op(SCHEDOP_block, 0);
    5.17 +        do_sched_op_compat(SCHEDOP_block, 0);
    5.18      }
    5.19  
    5.20      /* Reflect pending event in selector and master flags. */
     6.1 --- a/xen/arch/x86/x86_32/entry.S	Sat Apr 01 10:52:47 2006 +0100
     6.2 +++ b/xen/arch/x86/x86_32/entry.S	Sat Apr 01 11:08:50 2006 +0100
     6.3 @@ -579,6 +579,13 @@ ENTRY(setup_vm86_frame)
     6.4          addl $16,%esp
     6.5          ret
     6.6  
     6.7 +do_arch_sched_op_compat:
     6.8 +        # Ensure we return success even if we return via schedule_tail()
     6.9 +        xorl %eax,%eax
    6.10 +        GET_GUEST_REGS(%ecx)
    6.11 +        movl %eax,UREGS_eax(%ecx)
    6.12 +        jmp  do_sched_op_compat
    6.13 +
    6.14  do_arch_sched_op:
    6.15          # Ensure we return success even if we return via schedule_tail()
    6.16          xorl %eax,%eax
    6.17 @@ -586,13 +593,6 @@ do_arch_sched_op:
    6.18          movl %eax,UREGS_eax(%ecx)
    6.19          jmp  do_sched_op
    6.20  
    6.21 -do_arch_sched_op_new:
    6.22 -        # Ensure we return success even if we return via schedule_tail()
    6.23 -        xorl %eax,%eax
    6.24 -        GET_GUEST_REGS(%ecx)
    6.25 -        movl %eax,UREGS_eax(%ecx)
    6.26 -        jmp  do_sched_op_new
    6.27 -
    6.28  .data
    6.29  
    6.30  ENTRY(exception_table)
    6.31 @@ -624,7 +624,7 @@ ENTRY(hypercall_table)
    6.32          .long do_stack_switch
    6.33          .long do_set_callbacks
    6.34          .long do_fpu_taskswitch     /*  5 */
    6.35 -        .long do_arch_sched_op
    6.36 +        .long do_arch_sched_op_compat
    6.37          .long do_dom0_op
    6.38          .long do_set_debugreg
    6.39          .long do_get_debugreg
    6.40 @@ -647,7 +647,7 @@ ENTRY(hypercall_table)
    6.41          .long do_mmuext_op
    6.42          .long do_acm_op
    6.43          .long do_nmi_op
    6.44 -        .long do_arch_sched_op_new
    6.45 +        .long do_arch_sched_op
    6.46          .rept NR_hypercalls-((.-hypercall_table)/4)
    6.47          .long do_ni_hypercall
    6.48          .endr
    6.49 @@ -659,7 +659,7 @@ ENTRY(hypercall_args_table)
    6.50          .byte 2 /* do_stack_switch      */
    6.51          .byte 4 /* do_set_callbacks     */
    6.52          .byte 1 /* do_fpu_taskswitch    */  /*  5 */
    6.53 -        .byte 2 /* do_arch_sched_op     */
    6.54 +        .byte 2 /* do_arch_sched_op_compat */
    6.55          .byte 1 /* do_dom0_op           */
    6.56          .byte 2 /* do_set_debugreg      */
    6.57          .byte 1 /* do_get_debugreg      */
    6.58 @@ -682,7 +682,7 @@ ENTRY(hypercall_args_table)
    6.59          .byte 4 /* do_mmuext_op         */
    6.60          .byte 1 /* do_acm_op            */
    6.61          .byte 2 /* do_nmi_op            */
    6.62 -        .byte 2 /* do_arch_sched_op_new */
    6.63 +        .byte 2 /* do_arch_sched_op     */
    6.64          .rept NR_hypercalls-(.-hypercall_args_table)
    6.65          .byte 0 /* do_ni_hypercall      */
    6.66          .endr
     7.1 --- a/xen/arch/x86/x86_64/entry.S	Sat Apr 01 10:52:47 2006 +0100
     7.2 +++ b/xen/arch/x86/x86_64/entry.S	Sat Apr 01 11:08:50 2006 +0100
     7.3 @@ -488,6 +488,13 @@ nmi_in_hypervisor_mode:
     7.4          call  do_nmi
     7.5          jmp   ret_from_intr
     7.6  
     7.7 +do_arch_sched_op_compat:
     7.8 +        # Ensure we return success even if we return via schedule_tail()
     7.9 +        xorl  %eax,%eax
    7.10 +        GET_GUEST_REGS(%r10)
    7.11 +        movq  %rax,UREGS_rax(%r10)
    7.12 +        jmp   do_sched_op_compat
    7.13 +
    7.14  do_arch_sched_op:
    7.15          # Ensure we return success even if we return via schedule_tail()
    7.16          xorl  %eax,%eax
    7.17 @@ -495,13 +502,6 @@ do_arch_sched_op:
    7.18          movq  %rax,UREGS_rax(%r10)
    7.19          jmp   do_sched_op
    7.20  
    7.21 -do_arch_sched_op_new:
    7.22 -        # Ensure we return success even if we return via schedule_tail()
    7.23 -        xorl  %eax,%eax
    7.24 -        GET_GUEST_REGS(%r10)
    7.25 -        movq  %rax,UREGS_rax(%r10)
    7.26 -        jmp   do_sched_op_new
    7.27 -
    7.28  .data
    7.29  
    7.30  ENTRY(exception_table)
    7.31 @@ -533,7 +533,7 @@ ENTRY(hypercall_table)
    7.32          .quad do_stack_switch
    7.33          .quad do_set_callbacks
    7.34          .quad do_fpu_taskswitch     /*  5 */
    7.35 -        .quad do_arch_sched_op
    7.36 +        .quad do_arch_sched_op_compat
    7.37          .quad do_dom0_op
    7.38          .quad do_set_debugreg
    7.39          .quad do_get_debugreg
    7.40 @@ -556,7 +556,7 @@ ENTRY(hypercall_table)
    7.41          .quad do_mmuext_op
    7.42          .quad do_acm_op
    7.43          .quad do_nmi_op
    7.44 -        .quad do_arch_sched_op_new
    7.45 +        .quad do_arch_sched_op
    7.46          .rept NR_hypercalls-((.-hypercall_table)/8)
    7.47          .quad do_ni_hypercall
    7.48          .endr
    7.49 @@ -568,7 +568,7 @@ ENTRY(hypercall_args_table)
    7.50          .byte 2 /* do_stack_switch      */
    7.51          .byte 3 /* do_set_callbacks     */
    7.52          .byte 1 /* do_fpu_taskswitch    */  /*  5 */
    7.53 -        .byte 2 /* do_arch_sched_op     */
    7.54 +        .byte 2 /* do_arch_sched_op_compat */
    7.55          .byte 1 /* do_dom0_op           */
    7.56          .byte 2 /* do_set_debugreg      */
    7.57          .byte 1 /* do_get_debugreg      */
    7.58 @@ -591,7 +591,7 @@ ENTRY(hypercall_args_table)
    7.59          .byte 4 /* do_mmuext_op         */
    7.60          .byte 1 /* do_acm_op            */
    7.61          .byte 2 /* do_nmi_op            */
    7.62 -        .byte 2 /* do_arch_sched_op_new */
    7.63 +        .byte 2 /* do_arch_sched_op     */
    7.64          .rept NR_hypercalls-(.-hypercall_args_table)
    7.65          .byte 0 /* do_ni_hypercall      */
    7.66          .endr
     8.1 --- a/xen/common/schedule.c	Sat Apr 01 10:52:47 2006 +0100
     8.2 +++ b/xen/common/schedule.c	Sat Apr 01 11:08:50 2006 +0100
     8.3 @@ -332,7 +332,7 @@ static long do_yield(void)
     8.4      return 0;
     8.5  }
     8.6  
     8.7 -long do_sched_op(int cmd, unsigned long arg)
     8.8 +long do_sched_op_compat(int cmd, unsigned long arg)
     8.9  {
    8.10      long ret = 0;
    8.11  
    8.12 @@ -365,7 +365,7 @@ long do_sched_op(int cmd, unsigned long 
    8.13      return ret;
    8.14  }
    8.15  
    8.16 -long do_sched_op_new(int cmd, GUEST_HANDLE(void) arg)
    8.17 +long do_sched_op(int cmd, GUEST_HANDLE(void) arg)
    8.18  {
    8.19      long ret = 0;
    8.20  
     9.1 --- a/xen/include/public/sched.h	Sat Apr 01 10:52:47 2006 +0100
     9.2 +++ b/xen/include/public/sched.h	Sat Apr 01 11:08:50 2006 +0100
     9.3 @@ -13,17 +13,17 @@
     9.4  
     9.5  /*
     9.6   * The prototype for this hypercall is:
     9.7 - *  long sched_op_new(int cmd, void *arg)
     9.8 + *  long sched_op(int cmd, void *arg)
     9.9   * @cmd == SCHEDOP_??? (scheduler operation).
    9.10   * @arg == Operation-specific extra argument(s), as described below.
    9.11   * 
    9.12 - * **NOTE**:
    9.13 - * Versions of Xen prior to 3.0.2 provide only the following legacy version
    9.14 + * Versions of Xen prior to 3.0.2 provided only the following legacy version
    9.15   * of this hypercall, supporting only the commands yield, block and shutdown:
    9.16   *  long sched_op(int cmd, unsigned long arg)
    9.17   * @cmd == SCHEDOP_??? (scheduler operation).
    9.18   * @arg == 0               (SCHEDOP_yield and SCHEDOP_block)
    9.19   *      == SHUTDOWN_* code (SCHEDOP_shutdown)
    9.20 + * This legacy version is available to new guests as sched_op_compat().
    9.21   */
    9.22  
    9.23  /*
    10.1 --- a/xen/include/xen/hypercall.h	Sat Apr 01 10:52:47 2006 +0100
    10.2 +++ b/xen/include/xen/hypercall.h	Sat Apr 01 11:08:50 2006 +0100
    10.3 @@ -18,9 +18,14 @@ do_ni_hypercall(
    10.4      void);
    10.5  
    10.6  extern long
    10.7 +do_sched_op_compat(
    10.8 +    int cmd,
    10.9 +    unsigned long arg);
   10.10 +
   10.11 +extern long
   10.12  do_sched_op(
   10.13      int cmd,
   10.14 -    unsigned long arg);
   10.15 +    GUEST_HANDLE(void) arg);
   10.16  
   10.17  extern long
   10.18  do_dom0_op(