ia64/xen-unstable

changeset 14663:704151d0e219

xen: Rename remaining vcpu_flags as pause_flags.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Thu Mar 29 18:26:12 2007 +0100 (2007-03-29)
parents 28e187c8221d
children 9a839ead4870
files xen/arch/ia64/vmx/vlsapic.c xen/arch/ia64/vmx/vmx_support.c xen/arch/ia64/xen/domain.c xen/arch/ia64/xen/fw_emul.c xen/arch/ia64/xen/hypercall.c xen/arch/powerpc/domain.c xen/arch/powerpc/domain_build.c xen/arch/x86/domain.c xen/arch/x86/domain_build.c xen/arch/x86/domctl.c xen/arch/x86/hvm/hvm.c xen/arch/x86/hvm/save.c xen/arch/x86/hvm/vpt.c xen/arch/x86/x86_32/asm-offsets.c xen/arch/x86/x86_64/asm-offsets.c xen/common/domain.c xen/common/domctl.c xen/common/event_channel.c xen/common/keyhandler.c xen/common/sched_credit.c xen/common/schedule.c xen/include/asm-ia64/event.h xen/include/asm-powerpc/event.h xen/include/asm-x86/event.h xen/include/xen/event.h xen/include/xen/sched.h
line diff
     1.1 --- a/xen/arch/ia64/vmx/vlsapic.c	Thu Mar 29 18:19:10 2007 +0100
     1.2 +++ b/xen/arch/ia64/vmx/vlsapic.c	Thu Mar 29 18:26:12 2007 +0100
     1.3 @@ -693,7 +693,7 @@ static void vlsapic_write_ipi(VCPU *vcpu
     1.4          panic_domain(NULL, "Unknown IPI cpu\n");
     1.5  
     1.6      if (!targ->is_initialised ||
     1.7 -        test_bit(_VCPUF_down, &targ->vcpu_flags)) {
     1.8 +        test_bit(_VPF_down, &targ->pause_flags)) {
     1.9  
    1.10          struct pt_regs *targ_regs = vcpu_regs(targ);
    1.11          struct vcpu_guest_context c;
    1.12 @@ -709,7 +709,7 @@ static void vlsapic_write_ipi(VCPU *vcpu
    1.13          targ_regs->cr_iip = d->arch.sal_data->boot_rdv_ip;
    1.14          targ_regs->r1 = d->arch.sal_data->boot_rdv_r1;
    1.15  
    1.16 -        if (test_and_clear_bit(_VCPUF_down,&targ->vcpu_flags)) {
    1.17 +        if (test_and_clear_bit(_VPF_down,&targ->pause_flags)) {
    1.18              vcpu_wake(targ);
    1.19              printk(XENLOG_DEBUG "arch_boot_vcpu: vcpu %d awaken %016lx!\n",
    1.20                     targ->vcpu_id, targ_regs->cr_iip);
     2.1 --- a/xen/arch/ia64/vmx/vmx_support.c	Thu Mar 29 18:19:10 2007 +0100
     2.2 +++ b/xen/arch/ia64/vmx/vmx_support.c	Thu Mar 29 18:26:12 2007 +0100
     2.3 @@ -82,12 +82,12 @@ void vmx_send_assist_req(struct vcpu *v)
     2.4              p->state != STATE_IOREQ_INPROCESS)
     2.5              break;
     2.6  
     2.7 -        set_bit(_VCPUF_blocked_in_xen, &current->vcpu_flags);
     2.8 +        set_bit(_VPF_blocked_in_xen, &current->pause_flags);
     2.9          mb(); /* set blocked status /then/ re-evaluate condition */
    2.10          if (p->state != STATE_IOREQ_READY &&
    2.11              p->state != STATE_IOREQ_INPROCESS)
    2.12          {
    2.13 -            clear_bit(_VCPUF_blocked_in_xen, &current->vcpu_flags);
    2.14 +            clear_bit(_VPF_blocked_in_xen, &current->pause_flags);
    2.15              break;
    2.16          }
    2.17  
     3.1 --- a/xen/arch/ia64/xen/domain.c	Thu Mar 29 18:19:10 2007 +0100
     3.2 +++ b/xen/arch/ia64/xen/domain.c	Thu Mar 29 18:26:12 2007 +0100
     3.3 @@ -680,7 +680,7 @@ int arch_set_info_guest(struct vcpu *v, 
     3.4  		v->is_initialised = 1;
     3.5  		/* Auto-online VCPU0 when it is initialised. */
     3.6  		if (v->vcpu_id == 0)
     3.7 -			clear_bit(_VCPUF_down, &v->vcpu_flags);
     3.8 +			clear_bit(_VPF_down, &v->pause_flags);
     3.9  	}
    3.10  
    3.11  	return 0;
    3.12 @@ -1191,7 +1191,7 @@ int construct_dom0(struct domain *d,
    3.13  	printk("Dom0: 0x%lx\n", (u64)dom0);
    3.14  
    3.15  	v->is_initialised = 1;
    3.16 -	clear_bit(_VCPUF_down, &v->vcpu_flags);
    3.17 +	clear_bit(_VPF_down, &v->pause_flags);
    3.18  
    3.19  	/* Build firmware.
    3.20  	   Note: Linux kernel reserve memory used by start_info, so there is
     4.1 --- a/xen/arch/ia64/xen/fw_emul.c	Thu Mar 29 18:19:10 2007 +0100
     4.2 +++ b/xen/arch/ia64/xen/fw_emul.c	Thu Mar 29 18:26:12 2007 +0100
     4.3 @@ -374,7 +374,7 @@ sal_emulator (long index, unsigned long 
     4.4  		printk("*** CALLED SAL_UPDATE_PAL.  IGNORED...\n");
     4.5  		break;
     4.6  	    case SAL_XEN_SAL_RETURN:
     4.7 -	        if (!test_and_set_bit(_VCPUF_down, &current->vcpu_flags))
     4.8 +	        if (!test_and_set_bit(_VPF_down, &current->pause_flags))
     4.9  			vcpu_sleep_nosync(current);
    4.10  		break;
    4.11  	    case SN_SAL_GET_MASTER_NASID:
    4.12 @@ -725,7 +725,7 @@ xen_pal_emulator(unsigned long index, u6
    4.13  			console_start_sync();
    4.14  			(*efi.reset_system)(EFI_RESET_SHUTDOWN,0,0,NULL);
    4.15  		} else {
    4.16 -			set_bit(_VCPUF_down, &current->vcpu_flags);
    4.17 +			set_bit(_VPF_down, &current->pause_flags);
    4.18  			vcpu_sleep_nosync(current);
    4.19  			status = PAL_STATUS_SUCCESS;
    4.20  		}
     5.1 --- a/xen/arch/ia64/xen/hypercall.c	Thu Mar 29 18:19:10 2007 +0100
     5.2 +++ b/xen/arch/ia64/xen/hypercall.c	Thu Mar 29 18:26:12 2007 +0100
     5.3 @@ -82,7 +82,7 @@ fw_hypercall_ipi (struct pt_regs *regs)
     5.4  
     5.5    	if (vector == XEN_SAL_BOOT_RENDEZ_VEC
     5.6  	    && (!targ->is_initialised
     5.7 -		|| test_bit(_VCPUF_down, &targ->vcpu_flags))) {
     5.8 +		|| test_bit(_VPF_down, &targ->pause_flags))) {
     5.9  
    5.10  		/* First start: initialize vpcu.  */
    5.11  		if (!targ->is_initialised) {
    5.12 @@ -102,8 +102,8 @@ fw_hypercall_ipi (struct pt_regs *regs)
    5.13  		vcpu_regs (targ)->r1 = d->arch.sal_data->boot_rdv_r1;
    5.14  		vcpu_regs (targ)->b0 = FW_HYPERCALL_SAL_RETURN_PADDR;
    5.15  
    5.16 -		if (test_and_clear_bit(_VCPUF_down,
    5.17 -				       &targ->vcpu_flags)) {
    5.18 +		if (test_and_clear_bit(_VPF_down,
    5.19 +				       &targ->pause_flags)) {
    5.20  			vcpu_wake(targ);
    5.21  			printk(XENLOG_INFO "arch_boot_vcpu: vcpu %d awaken\n",
    5.22  			       targ->vcpu_id);
    5.23 @@ -207,7 +207,7 @@ ia64_hypercall(struct pt_regs *regs)
    5.24  		regs->r10 = x.r10; regs->r11 = x.r11;
    5.25  		break;
    5.26  	case FW_HYPERCALL_SAL_RETURN:
    5.27 -	        if ( !test_and_set_bit(_VCPUF_down, &v->vcpu_flags) )
    5.28 +	        if ( !test_and_set_bit(_VPF_down, &v->pause_flags) )
    5.29  			vcpu_sleep_nosync(v);
    5.30  		break;
    5.31  	case FW_HYPERCALL_EFI_CALL:
     6.1 --- a/xen/arch/powerpc/domain.c	Thu Mar 29 18:19:10 2007 +0100
     6.2 +++ b/xen/arch/powerpc/domain.c	Thu Mar 29 18:26:12 2007 +0100
     6.3 @@ -173,7 +173,7 @@ int arch_set_info_guest(struct vcpu *v, 
     6.4          v->is_initialised = 1;
     6.5          /* Auto-online VCPU0 when it is initialised. */
     6.6          if ( v->vcpu_id == 0 )
     6.7 -            clear_bit(_VCPUF_down, &v->vcpu_flags);
     6.8 +            clear_bit(_VPF_down, &v->pause_flags);
     6.9      }
    6.10  
    6.11      cpu_init_vcpu(v);
     7.1 --- a/xen/arch/powerpc/domain_build.c	Thu Mar 29 18:19:10 2007 +0100
     7.2 +++ b/xen/arch/powerpc/domain_build.c	Thu Mar 29 18:26:12 2007 +0100
     7.3 @@ -274,7 +274,7 @@ int construct_dom0(struct domain *d,
     7.4      ofd_dom0_fixup(d, *ofh_tree + rma, cmdline, shared_info_addr);
     7.5  
     7.6      v->is_initialised = 1;
     7.7 -    clear_bit(_VCPUF_down, &v->vcpu_flags);
     7.8 +    clear_bit(_VPF_down, &v->pause_flags);
     7.9  
    7.10      rc = 0;
    7.11  
     8.1 --- a/xen/arch/x86/domain.c	Thu Mar 29 18:19:10 2007 +0100
     8.2 +++ b/xen/arch/x86/domain.c	Thu Mar 29 18:26:12 2007 +0100
     8.3 @@ -706,9 +706,9 @@ int arch_set_info_guest(
     8.4  
     8.5   out:
     8.6      if ( flags & VGCF_online )
     8.7 -        clear_bit(_VCPUF_down, &v->vcpu_flags);
     8.8 +        clear_bit(_VPF_down, &v->pause_flags);
     8.9      else
    8.10 -        set_bit(_VCPUF_down, &v->vcpu_flags);
    8.11 +        set_bit(_VPF_down, &v->pause_flags);
    8.12      return 0;
    8.13  #undef c
    8.14  }
     9.1 --- a/xen/arch/x86/domain_build.c	Thu Mar 29 18:19:10 2007 +0100
     9.2 +++ b/xen/arch/x86/domain_build.c	Thu Mar 29 18:26:12 2007 +0100
     9.3 @@ -902,7 +902,7 @@ int construct_dom0(struct domain *d,
     9.4      update_domain_wallclock_time(d);
     9.5  
     9.6      v->is_initialised = 1;
     9.7 -    clear_bit(_VCPUF_down, &v->vcpu_flags);
     9.8 +    clear_bit(_VPF_down, &v->pause_flags);
     9.9  
    9.10      /*
    9.11       * Initial register values:
    10.1 --- a/xen/arch/x86/domctl.c	Thu Mar 29 18:19:10 2007 +0100
    10.2 +++ b/xen/arch/x86/domctl.c	Thu Mar 29 18:26:12 2007 +0100
    10.3 @@ -450,7 +450,7 @@ void arch_get_info_guest(struct vcpu *v,
    10.4      c(flags &= ~(VGCF_i387_valid|VGCF_in_kernel));
    10.5      if ( v->fpu_initialised )
    10.6          c(flags |= VGCF_i387_valid);
    10.7 -    if ( !test_bit(_VCPUF_down, &v->vcpu_flags) )
    10.8 +    if ( !test_bit(_VPF_down, &v->pause_flags) )
    10.9          c(flags |= VGCF_online);
   10.10  
   10.11      if ( is_hvm_vcpu(v) )
    11.1 --- a/xen/arch/x86/hvm/hvm.c	Thu Mar 29 18:19:10 2007 +0100
    11.2 +++ b/xen/arch/x86/hvm/hvm.c	Thu Mar 29 18:26:12 2007 +0100
    11.3 @@ -238,7 +238,7 @@ static int hvm_save_cpu_ctxt(struct doma
    11.4      {
    11.5          /* We don't need to save state for a vcpu that is down; the restore 
    11.6           * code will leave it down if there is nothing saved. */
    11.7 -        if ( test_bit(_VCPUF_down, &v->vcpu_flags) ) 
    11.8 +        if ( test_bit(_VPF_down, &v->pause_flags) ) 
    11.9              continue;
   11.10  
   11.11          hvm_funcs.save_cpu_ctxt(v, &ctxt);
   11.12 @@ -269,7 +269,7 @@ static int hvm_load_cpu_ctxt(struct doma
   11.13          return -EINVAL;
   11.14  
   11.15      /* Auxiliary processors should be woken immediately. */
   11.16 -    if ( test_and_clear_bit(_VCPUF_down, &v->vcpu_flags) )
   11.17 +    if ( test_and_clear_bit(_VPF_down, &v->pause_flags) )
   11.18          vcpu_wake(v);
   11.19  
   11.20      return 0;
   11.21 @@ -331,8 +331,8 @@ void hvm_vcpu_reset(struct vcpu *v)
   11.22  
   11.23      hvm_funcs.vcpu_initialise(v);
   11.24  
   11.25 -    set_bit(_VCPUF_down, &v->vcpu_flags);
   11.26 -    clear_bit(_VCPUF_blocked, &v->vcpu_flags);
   11.27 +    set_bit(_VPF_down, &v->pause_flags);
   11.28 +    clear_bit(_VPF_blocked, &v->pause_flags);
   11.29      v->fpu_initialised = 0;
   11.30      v->fpu_dirtied     = 0;
   11.31      v->is_initialised  = 0;
   11.32 @@ -350,13 +350,13 @@ static void hvm_vcpu_down(void)
   11.33             d->domain_id, v->vcpu_id);
   11.34  
   11.35      /* Doesn't halt us immediately, but we'll never return to guest context. */
   11.36 -    set_bit(_VCPUF_down, &v->vcpu_flags);
   11.37 +    set_bit(_VPF_down, &v->pause_flags);
   11.38      vcpu_sleep_nosync(v);
   11.39  
   11.40      /* Any other VCPUs online? ... */
   11.41      LOCK_BIGLOCK(d);
   11.42      for_each_vcpu ( d, v )
   11.43 -        if ( !test_bit(_VCPUF_down, &v->vcpu_flags) )
   11.44 +        if ( !test_bit(_VPF_down, &v->pause_flags) )
   11.45              online_count++;
   11.46      UNLOCK_BIGLOCK(d);
   11.47  
   11.48 @@ -734,7 +734,7 @@ int hvm_bringup_ap(int vcpuid, int tramp
   11.49          goto out;
   11.50      }
   11.51  
   11.52 -    if ( test_and_clear_bit(_VCPUF_down, &v->vcpu_flags) )
   11.53 +    if ( test_and_clear_bit(_VPF_down, &v->pause_flags) )
   11.54          vcpu_wake(v);
   11.55      gdprintk(XENLOG_INFO, "AP %d bringup suceeded.\n", vcpuid);
   11.56  
    12.1 --- a/xen/arch/x86/hvm/save.c	Thu Mar 29 18:19:10 2007 +0100
    12.2 +++ b/xen/arch/x86/hvm/save.c	Thu Mar 29 18:26:12 2007 +0100
    12.3 @@ -185,7 +185,7 @@ int hvm_load(struct domain *d, hvm_domai
    12.4  
    12.5      /* Down all the vcpus: we only re-enable the ones that had state saved. */
    12.6      for_each_vcpu(d, v) 
    12.7 -        if ( test_and_set_bit(_VCPUF_down, &v->vcpu_flags) )
    12.8 +        if ( test_and_set_bit(_VPF_down, &v->pause_flags) )
    12.9              vcpu_sleep_nosync(v);
   12.10  
   12.11      while(1) {
    13.1 --- a/xen/arch/x86/hvm/vpt.c	Thu Mar 29 18:19:10 2007 +0100
    13.2 +++ b/xen/arch/x86/hvm/vpt.c	Thu Mar 29 18:26:12 2007 +0100
    13.3 @@ -49,7 +49,7 @@ void pt_freeze_time(struct vcpu *v)
    13.4      struct list_head *list;
    13.5      struct periodic_time *pt;
    13.6  
    13.7 -    if ( test_bit(_VCPUF_blocked, &v->vcpu_flags) )
    13.8 +    if ( test_bit(_VPF_blocked, &v->pause_flags) )
    13.9          return;
   13.10  
   13.11      v->arch.hvm_vcpu.guest_time = hvm_get_guest_time(v);
    14.1 --- a/xen/arch/x86/x86_32/asm-offsets.c	Thu Mar 29 18:19:10 2007 +0100
    14.2 +++ b/xen/arch/x86/x86_32/asm-offsets.c	Thu Mar 29 18:26:12 2007 +0100
    14.3 @@ -66,7 +66,6 @@ void __dummy__(void)
    14.4             arch.guest_context.kernel_sp);
    14.5      OFFSET(VCPU_guest_context_flags, struct vcpu, arch.guest_context.flags);
    14.6      OFFSET(VCPU_arch_guest_fpu_ctxt, struct vcpu, arch.guest_context.fpu_ctxt);
    14.7 -    OFFSET(VCPU_flags, struct vcpu, vcpu_flags);
    14.8      OFFSET(VCPU_nmi_addr, struct vcpu, nmi_addr);
    14.9      OFFSET(VCPU_nmi_pending, struct vcpu, nmi_pending);
   14.10      OFFSET(VCPU_nmi_masked, struct vcpu, nmi_masked);
    15.1 --- a/xen/arch/x86/x86_64/asm-offsets.c	Thu Mar 29 18:19:10 2007 +0100
    15.2 +++ b/xen/arch/x86/x86_64/asm-offsets.c	Thu Mar 29 18:26:12 2007 +0100
    15.3 @@ -75,7 +75,6 @@ void __dummy__(void)
    15.4      OFFSET(VCPU_kernel_ss, struct vcpu, arch.guest_context.kernel_ss);
    15.5      OFFSET(VCPU_guest_context_flags, struct vcpu, arch.guest_context.flags);
    15.6      OFFSET(VCPU_arch_guest_fpu_ctxt, struct vcpu, arch.guest_context.fpu_ctxt);
    15.7 -    OFFSET(VCPU_flags, struct vcpu, vcpu_flags);
    15.8      OFFSET(VCPU_nmi_addr, struct vcpu, nmi_addr);
    15.9      OFFSET(VCPU_nmi_pending, struct vcpu, nmi_pending);
   15.10      OFFSET(VCPU_nmi_masked, struct vcpu, nmi_masked);
    16.1 --- a/xen/common/domain.c	Thu Mar 29 18:19:10 2007 +0100
    16.2 +++ b/xen/common/domain.c	Thu Mar 29 18:26:12 2007 +0100
    16.3 @@ -101,7 +101,7 @@ struct vcpu *alloc_vcpu(
    16.4  
    16.5      if ( !is_idle_domain(d) )
    16.6      {
    16.7 -        set_bit(_VCPUF_down, &v->vcpu_flags);
    16.8 +        set_bit(_VPF_down, &v->pause_flags);
    16.9          v->vcpu_info = shared_info_addr(d, vcpu_info[vcpu_id]);
   16.10      }
   16.11  
   16.12 @@ -481,7 +481,7 @@ int vcpu_reset(struct vcpu *v)
   16.13      if ( rc != 0 )
   16.14          goto out;
   16.15  
   16.16 -    set_bit(_VCPUF_down, &v->vcpu_flags);
   16.17 +    set_bit(_VPF_down, &v->pause_flags);
   16.18  
   16.19      v->fpu_initialised = 0;
   16.20      v->fpu_dirtied     = 0;
   16.21 @@ -489,7 +489,7 @@ int vcpu_reset(struct vcpu *v)
   16.22      v->is_initialised  = 0;
   16.23      v->nmi_pending     = 0;
   16.24      v->nmi_masked      = 0;
   16.25 -    clear_bit(_VCPUF_blocked, &v->vcpu_flags);
   16.26 +    clear_bit(_VPF_blocked, &v->pause_flags);
   16.27  
   16.28   out:
   16.29      UNLOCK_BIGLOCK(v->domain);
   16.30 @@ -537,18 +537,18 @@ long do_vcpu_op(int cmd, int vcpuid, XEN
   16.31          if ( !v->is_initialised )
   16.32              return -EINVAL;
   16.33  
   16.34 -        if ( test_and_clear_bit(_VCPUF_down, &v->vcpu_flags) )
   16.35 +        if ( test_and_clear_bit(_VPF_down, &v->pause_flags) )
   16.36              vcpu_wake(v);
   16.37  
   16.38          break;
   16.39  
   16.40      case VCPUOP_down:
   16.41 -        if ( !test_and_set_bit(_VCPUF_down, &v->vcpu_flags) )
   16.42 +        if ( !test_and_set_bit(_VPF_down, &v->pause_flags) )
   16.43              vcpu_sleep_nosync(v);
   16.44          break;
   16.45  
   16.46      case VCPUOP_is_up:
   16.47 -        rc = !test_bit(_VCPUF_down, &v->vcpu_flags);
   16.48 +        rc = !test_bit(_VPF_down, &v->pause_flags);
   16.49          break;
   16.50  
   16.51      case VCPUOP_get_runstate_info:
    17.1 --- a/xen/common/domctl.c	Thu Mar 29 18:19:10 2007 +0100
    17.2 +++ b/xen/common/domctl.c	Thu Mar 29 18:26:12 2007 +0100
    17.3 @@ -101,9 +101,9 @@ void getdomaininfo(struct domain *d, str
    17.4          vcpu_runstate_get(v, &runstate);
    17.5          cpu_time += runstate.time[RUNSTATE_running];
    17.6          info->max_vcpu_id = v->vcpu_id;
    17.7 -        if ( !test_bit(_VCPUF_down, &v->vcpu_flags) )
    17.8 +        if ( !test_bit(_VPF_down, &v->pause_flags) )
    17.9          {
   17.10 -            if ( !(v->vcpu_flags & VCPUF_blocked) )
   17.11 +            if ( !(v->pause_flags & VPF_blocked) )
   17.12                  flags &= ~XEN_DOMINF_blocked;
   17.13              if ( v->is_running )
   17.14                  flags |= XEN_DOMINF_running;
   17.15 @@ -145,7 +145,7 @@ static unsigned int default_vcpu0_locati
   17.16      rcu_read_lock(&domlist_read_lock);
   17.17      for_each_domain ( d )
   17.18          for_each_vcpu ( d, v )
   17.19 -        if ( !test_bit(_VCPUF_down, &v->vcpu_flags) )
   17.20 +        if ( !test_bit(_VPF_down, &v->pause_flags) )
   17.21              cnt[v->processor]++;
   17.22      rcu_read_unlock(&domlist_read_lock);
   17.23  
   17.24 @@ -574,8 +574,8 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc
   17.25  
   17.26          vcpu_runstate_get(v, &runstate);
   17.27  
   17.28 -        op->u.getvcpuinfo.online   = !test_bit(_VCPUF_down, &v->vcpu_flags);
   17.29 -        op->u.getvcpuinfo.blocked  = test_bit(_VCPUF_blocked, &v->vcpu_flags);
   17.30 +        op->u.getvcpuinfo.online   = !test_bit(_VPF_down, &v->pause_flags);
   17.31 +        op->u.getvcpuinfo.blocked  = test_bit(_VPF_blocked, &v->pause_flags);
   17.32          op->u.getvcpuinfo.running  = v->is_running;
   17.33          op->u.getvcpuinfo.cpu_time = runstate.time[RUNSTATE_running];
   17.34          op->u.getvcpuinfo.cpu      = v->processor;
    18.1 --- a/xen/common/event_channel.c	Thu Mar 29 18:19:10 2007 +0100
    18.2 +++ b/xen/common/event_channel.c	Thu Mar 29 18:26:12 2007 +0100
    18.3 @@ -481,8 +481,8 @@ long evtchn_send(unsigned int lport)
    18.4          if ( rchn->consumer_is_xen )
    18.5          {
    18.6              /* Xen consumers need notification only if they are blocked. */
    18.7 -            if ( test_and_clear_bit(_VCPUF_blocked_in_xen,
    18.8 -                                    &rvcpu->vcpu_flags) )
    18.9 +            if ( test_and_clear_bit(_VPF_blocked_in_xen,
   18.10 +                                    &rvcpu->pause_flags) )
   18.11                  vcpu_wake(rvcpu);
   18.12          }
   18.13          else
    19.1 --- a/xen/common/keyhandler.c	Thu Mar 29 18:19:10 2007 +0100
    19.2 +++ b/xen/common/keyhandler.c	Thu Mar 29 18:26:12 2007 +0100
    19.3 @@ -189,7 +189,7 @@ static void dump_domains(unsigned char k
    19.4                     "upcall_pend = %02x, upcall_mask = %02x ",
    19.5                     v->vcpu_id, v->processor,
    19.6                     v->is_running ? 'T':'F',
    19.7 -                   v->vcpu_flags,
    19.8 +                   v->pause_flags,
    19.9                     vcpu_info(v, evtchn_upcall_pending),
   19.10                     vcpu_info(v, evtchn_upcall_mask));
   19.11              cpuset_print(tmpstr, sizeof(tmpstr), v->vcpu_dirty_cpumask);
    20.1 --- a/xen/common/sched_credit.c	Thu Mar 29 18:19:10 2007 +0100
    20.2 +++ b/xen/common/sched_credit.c	Thu Mar 29 18:26:12 2007 +0100
    20.3 @@ -565,7 +565,7 @@ csched_vcpu_acct(unsigned int cpu)
    20.4      {
    20.5          CSCHED_VCPU_STAT_CRANK(svc, migrate_r);
    20.6          CSCHED_STAT_CRANK(migrate_running);
    20.7 -        set_bit(_VCPUF_migrating, &current->vcpu_flags);
    20.8 +        set_bit(_VPF_migrating, &current->pause_flags);
    20.9          cpu_raise_softirq(cpu, SCHEDULE_SOFTIRQ);
   20.10      }
   20.11  }
    21.1 --- a/xen/common/schedule.c	Thu Mar 29 18:19:10 2007 +0100
    21.2 +++ b/xen/common/schedule.c	Thu Mar 29 18:26:12 2007 +0100
    21.3 @@ -190,7 +190,7 @@ void vcpu_wake(struct vcpu *v)
    21.4              vcpu_runstate_change(v, RUNSTATE_runnable, NOW());
    21.5          SCHED_OP(wake, v);
    21.6      }
    21.7 -    else if ( !test_bit(_VCPUF_blocked, &v->vcpu_flags) )
    21.8 +    else if ( !test_bit(_VPF_blocked, &v->pause_flags) )
    21.9      {
   21.10          if ( v->runstate.state == RUNSTATE_blocked )
   21.11              vcpu_runstate_change(v, RUNSTATE_offline, NOW());
   21.12 @@ -214,7 +214,7 @@ static void vcpu_migrate(struct vcpu *v)
   21.13       * regions are strictly serialised.
   21.14       */
   21.15      if ( v->is_running ||
   21.16 -         !test_and_clear_bit(_VCPUF_migrating, &v->vcpu_flags) )
   21.17 +         !test_and_clear_bit(_VPF_migrating, &v->pause_flags) )
   21.18      {
   21.19          vcpu_schedule_unlock_irqrestore(v, flags);
   21.20          return;
   21.21 @@ -240,10 +240,10 @@ void vcpu_force_reschedule(struct vcpu *
   21.22  {
   21.23      vcpu_schedule_lock_irq(v);
   21.24      if ( v->is_running )
   21.25 -        set_bit(_VCPUF_migrating, &v->vcpu_flags);
   21.26 +        set_bit(_VPF_migrating, &v->pause_flags);
   21.27      vcpu_schedule_unlock_irq(v);
   21.28  
   21.29 -    if ( test_bit(_VCPUF_migrating, &v->vcpu_flags) )
   21.30 +    if ( test_bit(_VPF_migrating, &v->pause_flags) )
   21.31      {
   21.32          vcpu_sleep_nosync(v);
   21.33          vcpu_migrate(v);
   21.34 @@ -265,11 +265,11 @@ int vcpu_set_affinity(struct vcpu *v, cp
   21.35  
   21.36      v->cpu_affinity = *affinity;
   21.37      if ( !cpu_isset(v->processor, v->cpu_affinity) )
   21.38 -        set_bit(_VCPUF_migrating, &v->vcpu_flags);
   21.39 +        set_bit(_VPF_migrating, &v->pause_flags);
   21.40  
   21.41      vcpu_schedule_unlock_irq(v);
   21.42  
   21.43 -    if ( test_bit(_VCPUF_migrating, &v->vcpu_flags) )
   21.44 +    if ( test_bit(_VPF_migrating, &v->pause_flags) )
   21.45      {
   21.46          vcpu_sleep_nosync(v);
   21.47          vcpu_migrate(v);
   21.48 @@ -284,12 +284,12 @@ static long do_block(void)
   21.49      struct vcpu *v = current;
   21.50  
   21.51      local_event_delivery_enable();
   21.52 -    set_bit(_VCPUF_blocked, &v->vcpu_flags);
   21.53 +    set_bit(_VPF_blocked, &v->pause_flags);
   21.54  
   21.55      /* Check for events /after/ blocking: avoids wakeup waiting race. */
   21.56      if ( local_events_need_delivery() )
   21.57      {
   21.58 -        clear_bit(_VCPUF_blocked, &v->vcpu_flags);
   21.59 +        clear_bit(_VPF_blocked, &v->pause_flags);
   21.60      }
   21.61      else
   21.62      {
   21.63 @@ -315,7 +315,7 @@ static long do_poll(struct sched_poll *s
   21.64      if ( !guest_handle_okay(sched_poll->ports, sched_poll->nr_ports) )
   21.65          return -EFAULT;
   21.66  
   21.67 -    set_bit(_VCPUF_blocked, &v->vcpu_flags);
   21.68 +    set_bit(_VPF_blocked, &v->pause_flags);
   21.69      v->is_polling = 1;
   21.70      d->is_polling = 1;
   21.71  
   21.72 @@ -347,7 +347,7 @@ static long do_poll(struct sched_poll *s
   21.73  
   21.74   out:
   21.75      v->is_polling = 0;
   21.76 -    clear_bit(_VCPUF_blocked, &v->vcpu_flags);
   21.77 +    clear_bit(_VPF_blocked, &v->pause_flags);
   21.78      return rc;
   21.79  }
   21.80  
   21.81 @@ -648,7 +648,7 @@ static void schedule(void)
   21.82      ASSERT(prev->runstate.state == RUNSTATE_running);
   21.83      vcpu_runstate_change(
   21.84          prev,
   21.85 -        (test_bit(_VCPUF_blocked, &prev->vcpu_flags) ? RUNSTATE_blocked :
   21.86 +        (test_bit(_VPF_blocked, &prev->pause_flags) ? RUNSTATE_blocked :
   21.87           (vcpu_runnable(prev) ? RUNSTATE_runnable : RUNSTATE_offline)),
   21.88          now);
   21.89  
   21.90 @@ -685,7 +685,7 @@ void context_saved(struct vcpu *prev)
   21.91      /* Check for migration request /after/ clearing running flag. */
   21.92      smp_mb();
   21.93  
   21.94 -    if ( unlikely(test_bit(_VCPUF_migrating, &prev->vcpu_flags)) )
   21.95 +    if ( unlikely(test_bit(_VPF_migrating, &prev->pause_flags)) )
   21.96          vcpu_migrate(prev);
   21.97  }
   21.98  
    22.1 --- a/xen/include/asm-ia64/event.h	Thu Mar 29 18:19:10 2007 +0100
    22.2 +++ b/xen/include/asm-ia64/event.h	Thu Mar 29 18:26:12 2007 +0100
    22.3 @@ -15,7 +15,7 @@
    22.4  static inline void vcpu_kick(struct vcpu *v)
    22.5  {
    22.6      /*
    22.7 -     * NB1. 'vcpu_flags' and 'processor' must be checked /after/ update of
    22.8 +     * NB1. 'pause_flags' and 'processor' must be checked /after/ update of
    22.9       * pending flag. These values may fluctuate (after all, we hold no
   22.10       * locks) but the key insight is that each change will cause
   22.11       * evtchn_upcall_pending to be polled.
    23.1 --- a/xen/include/asm-powerpc/event.h	Thu Mar 29 18:19:10 2007 +0100
    23.2 +++ b/xen/include/asm-powerpc/event.h	Thu Mar 29 18:26:12 2007 +0100
    23.3 @@ -68,7 +68,7 @@ static inline int arch_virq_is_global(in
    23.4  static inline void vcpu_kick(struct vcpu *v)
    23.5  {
    23.6      /*
    23.7 -     * NB1. 'vcpu_flags' and 'processor' must be checked /after/ update of
    23.8 +     * NB1. 'pause_flags' and 'processor' must be checked /after/ update of
    23.9       * pending flag. These values may fluctuate (after all, we hold no
   23.10       * locks) but the key insight is that each change will cause
   23.11       * evtchn_upcall_pending to be polled.
    24.1 --- a/xen/include/asm-x86/event.h	Thu Mar 29 18:19:10 2007 +0100
    24.2 +++ b/xen/include/asm-x86/event.h	Thu Mar 29 18:26:12 2007 +0100
    24.3 @@ -15,7 +15,7 @@
    24.4  static inline void vcpu_kick(struct vcpu *v)
    24.5  {
    24.6      /*
    24.7 -     * NB1. 'vcpu_flags' and 'processor' must be checked /after/ update of
    24.8 +     * NB1. 'pause_flags' and 'processor' must be checked /after/ update of
    24.9       * pending flag. These values may fluctuate (after all, we hold no
   24.10       * locks) but the key insight is that each change will cause
   24.11       * evtchn_upcall_pending to be polled.
    25.1 --- a/xen/include/xen/event.h	Thu Mar 29 18:19:10 2007 +0100
    25.2 +++ b/xen/include/xen/event.h	Thu Mar 29 18:26:12 2007 +0100
    25.3 @@ -59,11 +59,11 @@ void notify_via_xen_event_channel(int lp
    25.4      do {                                                                \
    25.5          if ( condition )                                                \
    25.6              break;                                                      \
    25.7 -        set_bit(_VCPUF_blocked_in_xen, &current->vcpu_flags);           \
    25.8 +        set_bit(_VPF_blocked_in_xen, &current->pause_flags);            \
    25.9          mb(); /* set blocked status /then/ re-evaluate condition */     \
   25.10          if ( condition )                                                \
   25.11          {                                                               \
   25.12 -            clear_bit(_VCPUF_blocked_in_xen, &current->vcpu_flags);     \
   25.13 +            clear_bit(_VPF_blocked_in_xen, &current->pause_flags);      \
   25.14              break;                                                      \
   25.15          }                                                               \
   25.16          raise_softirq(SCHEDULE_SOFTIRQ);                                \
   25.17 @@ -72,7 +72,7 @@ void notify_via_xen_event_channel(int lp
   25.18  
   25.19  #define prepare_wait_on_xen_event_channel(port)                         \
   25.20      do {                                                                \
   25.21 -        set_bit(_VCPUF_blocked_in_xen, &current->vcpu_flags);           \
   25.22 +        set_bit(_VPF_blocked_in_xen, &current->pause_flags);            \
   25.23          raise_softirq(SCHEDULE_SOFTIRQ);                                \
   25.24          mb(); /* set blocked status /then/ caller does his work */      \
   25.25      } while ( 0 )
    26.1 --- a/xen/include/xen/sched.h	Thu Mar 29 18:19:10 2007 +0100
    26.2 +++ b/xen/include/xen/sched.h	Thu Mar 29 18:26:12 2007 +0100
    26.3 @@ -115,8 +115,7 @@ struct vcpu
    26.4      /* Avoid NMI reentry by allowing NMIs to be masked for short periods. */
    26.5      bool_t           nmi_masked;
    26.6  
    26.7 -    unsigned long    vcpu_flags;
    26.8 -
    26.9 +    unsigned long    pause_flags;
   26.10      atomic_t         pause_count;
   26.11  
   26.12      u16              virq_to_evtchn[NR_VIRQS];
   26.13 @@ -434,26 +433,26 @@ extern struct domain *domain_list;
   26.14         (_v) = (_v)->next_in_list )
   26.15  
   26.16  /*
   26.17 - * Per-VCPU flags (vcpu_flags).
   26.18 + * Per-VCPU pause flags.
   26.19   */
   26.20   /* Domain is blocked waiting for an event. */
   26.21 -#define _VCPUF_blocked         0
   26.22 -#define VCPUF_blocked          (1UL<<_VCPUF_blocked)
   26.23 +#define _VPF_blocked         0
   26.24 +#define VPF_blocked          (1UL<<_VPF_blocked)
   26.25   /* VCPU is offline. */
   26.26 -#define _VCPUF_down            1
   26.27 -#define VCPUF_down             (1UL<<_VCPUF_down)
   26.28 +#define _VPF_down            1
   26.29 +#define VPF_down             (1UL<<_VPF_down)
   26.30   /* VCPU is blocked awaiting an event to be consumed by Xen. */
   26.31 -#define _VCPUF_blocked_in_xen  2
   26.32 -#define VCPUF_blocked_in_xen   (1UL<<_VCPUF_blocked_in_xen)
   26.33 +#define _VPF_blocked_in_xen  2
   26.34 +#define VPF_blocked_in_xen   (1UL<<_VPF_blocked_in_xen)
   26.35   /* VCPU affinity has changed: migrating to a new CPU. */
   26.36 -#define _VCPUF_migrating       3
   26.37 -#define VCPUF_migrating        (1UL<<_VCPUF_migrating)
   26.38 +#define _VPF_migrating       3
   26.39 +#define VPF_migrating        (1UL<<_VPF_migrating)
   26.40  
   26.41  static inline int vcpu_runnable(struct vcpu *v)
   26.42  {
   26.43 -    return (!v->vcpu_flags &&
   26.44 -            !atomic_read(&v->pause_count) &&
   26.45 -            !atomic_read(&v->domain->pause_count));
   26.46 +    return !(v->pause_flags |
   26.47 +             atomic_read(&v->pause_count) |
   26.48 +             atomic_read(&v->domain->pause_count));
   26.49  }
   26.50  
   26.51  void vcpu_pause(struct vcpu *v);
   26.52 @@ -472,7 +471,7 @@ void vcpu_runstate_get(struct vcpu *v, s
   26.53  
   26.54  static inline void vcpu_unblock(struct vcpu *v)
   26.55  {
   26.56 -    if ( test_and_clear_bit(_VCPUF_blocked, &v->vcpu_flags) )
   26.57 +    if ( test_and_clear_bit(_VPF_blocked, &v->pause_flags) )
   26.58          vcpu_wake(v);
   26.59  }
   26.60