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] Fix context switching between VCPUs belonging to the sam

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fix context switching between VCPUs belonging to the same domain. Setting
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Sun, 03 Apr 2005 13:17:25 +0000
Delivery-date: Sun, 03 Apr 2005 14:03:35 +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 Development List <xen-devel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1443, 2005/04/03 14:17:25+01:00, kaf24@viper.(none)

        Fix context switching between VCPUs belonging to the same domain. 
Setting
        and then clearing the physical CPU bit in the cpuset bitmap is 
incorrect.
        Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>



 domain.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)


diff -Nru a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c     2005-04-03 10:03:37 -04:00
+++ b/xen/arch/x86/domain.c     2005-04-03 10:03:37 -04:00
@@ -808,10 +808,14 @@
         }
     }
 
-    set_bit(cpu, &n->domain->cpuset);
+    if ( p->domain != n->domain )
+        set_bit(cpu, &n->domain->cpuset);
+
     write_ptbase(n);
     __asm__ __volatile__ ( "lgdt %0" : "=m" (*n->arch.gdt) );
-    clear_bit(cpu, &p->domain->cpuset);
+
+    if ( p->domain != n->domain )
+        clear_bit(cpu, &p->domain->cpuset);
 
     percpu_ctxt[cpu].curr_ed = n;
 }

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix context switching between VCPUs belonging to the same domain. Setting, BitKeeper Bot <=