[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Handle migration of x86 VCPUs between physical CPUs.



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 83eeb056f7c289a5105dc9895959ca0222c48ed9
# Parent  0aff653824db5ce6474ba1865794a285ae9f3bbc
Handle migration of x86 VCPUs between physical CPUs.
If required, context_switch() must pull state off of
old CPU.

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 0aff653824db -r 83eeb056f7c2 xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c     Sat Jan  7 15:53:25 2006
+++ b/xen/arch/x86/domain.c     Sat Jan  7 16:52:43 2006
@@ -749,11 +749,21 @@
 {
     unsigned int cpu = smp_processor_id();
 
+    ASSERT(local_irq_is_enabled());
+
     set_current(next);
 
     if ( (percpu_ctxt[cpu].curr_vcpu != next) &&
          !is_idle_domain(next->domain) )
     {
+        /* This may happen if next has been migrated by the scheduler. */
+        if ( unlikely(!cpus_empty(next->vcpu_dirty_cpumask)) )
+        {
+            ASSERT(!cpu_isset(cpu, next->vcpu_dirty_cpumask));
+            sync_vcpu_execstate(next);
+            ASSERT(cpus_empty(next->vcpu_dirty_cpumask));
+        }
+
         local_irq_disable();
         __context_switch();
         local_irq_enable();

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.