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

[Xen-changelog] Bug fix: we need to eagerly synchronise th HL2, since Xen relies on it



# HG changeset patch
# User sos22@xxxxxxxxxxxxxxxxxxxx
# Node ID e9770d41e5bd85afc3a8bace375e529b83cdaa92
# Parent  990c009015e8582eebf04698d845ca2b926ea6bf
Bug fix: we need to eagerly synchronise th HL2, since Xen relies on it
(via the guest linear table), and faults to that don't get sent to the
shadow mode infrastructure, and so we can't do it lazily.

Signed-off-by: Steven Smith, sos22@xxxxxxxxx

diff -r 990c009015e8 -r e9770d41e5bd xen/arch/x86/shadow32.c
--- a/xen/arch/x86/shadow32.c   Fri Jan 27 20:23:06 2006
+++ b/xen/arch/x86/shadow32.c   Fri Jan 27 20:38:55 2006
@@ -1456,7 +1456,9 @@
 {
     unsigned long hl2mfn;
     l1_pgentry_t *hl2;
+    l2_pgentry_t *gpgd;
     int limit;
+    int x;
 
     ASSERT(PGT_base_page_table == PGT_l2_page_table);
 
@@ -1494,6 +1496,11 @@
         hl2[l2_table_offset(PERDOMAIN_VIRT_START)] =
             l1e_from_pfn(hl2mfn, __PAGE_HYPERVISOR);
     }
+
+    gpgd = map_domain_page(gmfn);
+    for (x = 0; x < DOMAIN_ENTRIES_PER_L2_PAGETABLE; x++)
+        validate_hl2e_change(d, gpgd[x], &hl2[x]);
+    unmap_domain_page(gpgd);
 
     unmap_domain_page(hl2);
 
@@ -2797,8 +2804,9 @@
     unsigned long pa, l2_pgentry_t gpde,
     struct domain_mmap_cache *cache)
 {
-    unsigned long sl2mfn;
+    unsigned long sl2mfn, hl2mfn;
     l2_pgentry_t *spl2e;
+    l1_pgentry_t *hl2e;
 
     shadow_lock(d);
 
@@ -2811,6 +2819,15 @@
         validate_pde_change(d, gpde,
                             &spl2e[(pa & ~PAGE_MASK) / sizeof(l2_pgentry_t)]);
         unmap_domain_page_with_cache(spl2e, cache);
+    }
+    hl2mfn = __shadow_status(current->domain, pa >> PAGE_SHIFT,
+                             PGT_hl2_shadow);
+    if ( hl2mfn )
+    {
+        hl2e = map_domain_page(hl2mfn);
+        validate_hl2e_change(d, gpde,
+                             &hl2e[(pa & ~PAGE_MASK) / sizeof(l1_pgentry_t)]);
+        unmap_domain_page(hl2e);
     }
 
     shadow_unlock(d);

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