ia64/xen-unstable

changeset 15631:bb5c23bbc7b7

Fix hypercall migration. schedule_tail() is not required
after set affinity, or else continue stub runs on current
cpu immediately before migrating is checked when switching
out.

Signed-off-by Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Fri Jul 20 09:38:27 2007 +0100 (2007-07-20)
parents 9c3a8ca0bf34
children ae672309bb95
files xen/arch/x86/domain.c
line diff
     1.1 --- a/xen/arch/x86/domain.c	Thu Jul 19 17:18:20 2007 +0100
     1.2 +++ b/xen/arch/x86/domain.c	Fri Jul 20 09:38:27 2007 +0100
     1.3 @@ -1394,6 +1394,9 @@ int continue_hypercall_on_cpu(int cpu, l
     1.4      struct migrate_info *info;
     1.5      cpumask_t mask = cpumask_of_cpu(cpu);
     1.6  
     1.7 +    if ( cpu == smp_processor_id() )
     1.8 +        return func(data);
     1.9 +
    1.10      info = xmalloc(struct migrate_info);
    1.11      if ( info == NULL )
    1.12          return -ENOMEM;
    1.13 @@ -1407,8 +1410,9 @@ int continue_hypercall_on_cpu(int cpu, l
    1.14      v->arch.continue_info = info;
    1.15  
    1.16      vcpu_set_affinity(v, &mask);
    1.17 -    schedule_tail(v);
    1.18  
    1.19 +    /* Dummy return value will be overwritten by new schedule_tail. */
    1.20 +    BUG_ON(!test_bit(SCHEDULE_SOFTIRQ, &softirq_pending(smp_processor_id())));
    1.21      return 0;
    1.22  }
    1.23