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

[Xen-changelog] Svm patch to fix asid logic on multicore.



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID f933aae43044d89de2a6e4c2ab2416cb91869a92
# Parent  0851d92183a131702700f557b1ca26b1c8a17ff4
Svm patch to fix asid logic on multicore.

Signed-off-by: Tom Woller <thomas.woller@xxxxxxx>

diff -r 0851d92183a1 -r f933aae43044 xen/arch/x86/hvm/svm/svm.c
--- a/xen/arch/x86/hvm/svm/svm.c        Sat Feb 18 00:01:31 2006
+++ b/xen/arch/x86/hvm/svm/svm.c        Sat Feb 18 00:01:52 2006
@@ -2666,18 +2666,22 @@
     struct vcpu *v = current;
     struct vmcb_struct *vmcb = v->arch.hvm_svm.vmcb;
     int core = smp_processor_id();
+    int oldcore = v->arch.hvm_svm.core; 
     /* 
      * if need to assign new asid or if switching cores, 
      * then retire asid for old core, and assign new for new core.
      */
-    if( svm_dbg_on)
-        printk("old core %d new core 
%d\n",(int)v->arch.hvm_svm.core,(int)core);
-
+    if( v->arch.hvm_svm.core != core ) {
+        if (svm_dbg_on)
+            printk("old core %d new core 
%d\n",(int)v->arch.hvm_svm.core,(int)core);
+        v->arch.hvm_svm.core = core;
+    }
     if( test_bit(ARCH_SVM_VMCB_ASSIGN_ASID, &v->arch.hvm_svm.flags) ||
-          (v->arch.hvm_svm.core != core)) {
+          (oldcore != core)) {
         if(!asidpool_assign_next(vmcb, 1, 
-                   v->arch.hvm_svm.core, core)) {
-           BUG();              
+                   oldcore, core)) {
+            /* If we get here, we have a major problem */
+            domain_crash_synchronous();
         }
     }
     clear_bit(ARCH_SVM_VMCB_ASSIGN_ASID, &v->arch.hvm_svm.flags);

_______________________________________________
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®.