WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Handle migration of x86 VCPUs between physical CPUs.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 09 Jan 2006 13:08:06 +0000
Delivery-date: Mon, 09 Jan 2006 13:14:33 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Handle migration of x86 VCPUs between physical CPUs., Xen patchbot -unstable <=