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] Bug fix: we need to eagerly synchronise th HL2, since Xe

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Bug fix: we need to eagerly synchronise th HL2, since Xen relies on it
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 30 Jan 2006 15:00:15 +0000
Delivery-date: Mon, 30 Jan 2006 15:23:57 +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 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Bug fix: we need to eagerly synchronise th HL2, since Xen relies on it, Xen patchbot -unstable <=