]> xenbits.xensource.com Git - xen.git/commitdiff
bitkeeper revision 1.1159.117.2 (4176a216CU3JD-3Q5NlBFwP8DCqzVg)
authorcl349@freefall.cl.cam.ac.uk <cl349@freefall.cl.cam.ac.uk>
Wed, 20 Oct 2004 17:36:22 +0000 (17:36 +0000)
committercl349@freefall.cl.cam.ac.uk <cl349@freefall.cl.cam.ac.uk>
Wed, 20 Oct 2004 17:36:22 +0000 (17:36 +0000)
Additional fixes to the writable pagetable error paths.

xen/arch/x86/memory.c
xen/common/schedule.c

index dd155a5ba52a1ccd1cfaeeaadc072348f0bd2dd5..ffd1d6eacc38022c56b248c3a0b7335ae34e2418 100644 (file)
@@ -1682,6 +1682,8 @@ void ptwr_flush(const int which)
              */
             memcpy(&pl1e[i], &ptwr_info[cpu].ptinfo[which].page[i],
                    (ENTRIES_PER_L1_PAGETABLE - i) * sizeof(l1_pgentry_t));
+            unmap_domain_mem(pl1e);
+            ptwr_info[cpu].ptinfo[which].l1va = 0;
             domain_crash();
         }
         
index db69f24362e08f236f7975c5894965b6f6ec74fa..251fc8b4f438b6390fb6fb1cdadfc4d9f51280a1 100644 (file)
@@ -326,6 +326,9 @@ void __enter_scheduler(void)
     task_slice_t        next_slice;
     s32                 r_time;     /* time for new dom to run */
 
+    cleanup_writable_pagetable(
+        prev, PTWR_CLEANUP_ACTIVE | PTWR_CLEANUP_INACTIVE);
+
     perfc_incrc(sched_run);
     
     spin_lock_irq(&schedule_data[cpu].schedule_lock);
@@ -373,9 +376,6 @@ void __enter_scheduler(void)
     if ( unlikely(prev == next) )
         return;
     
-    cleanup_writable_pagetable(
-        prev, PTWR_CLEANUP_ACTIVE | PTWR_CLEANUP_INACTIVE);
-
     perfc_incrc(sched_ctx);
 
 #if defined(WAKE_HISTO)