Source-Changes-HG archive

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

[src/netbsd-6]: src/sys/arch/xen Pull up revisions:



details:   https://anonhg.NetBSD.org/src/rev/ea528a2e3d34
branches:  netbsd-6
changeset: 774278:ea528a2e3d34
user:      jdc <jdc%NetBSD.org@localhost>
date:      Mon Jul 02 21:01:48 2012 +0000

description:
Pull up revisions:
  src/sys/arch/xen/include/xenpmap.h revision 1.35 via patch
  src/sys/arch/xen/x86/xen_pmap.c revision 1.22 via patch
(requested by jym in ticket #372).

Enable the map/unmap recursive mapping functions for all Xen ports for
save/restore.

For an unknown reason (to me) Xen refuses to update VM translations
when the entry is pointing back to itself (which is precisely
what our recursive VM model does). So enable the functions that take
care of this, which will avoid all sort of memory corruption upon restore
leading domU to trample upon itself.

Save/restore works again for amd64. The occasional domU frontend
corruption is
still present, but is harmless to dom0. Now we have a working shell and
ddb inside domU, that helps debugging a tiny bit.

XXX pull-up to -6.

diffstat:

 sys/arch/xen/include/xenpmap.h |   9 +++------
 sys/arch/xen/x86/xen_pmap.c    |  10 ++--------
 2 files changed, 5 insertions(+), 14 deletions(-)

diffs (70 lines):

diff -r 912dcd0d02a8 -r ea528a2e3d34 sys/arch/xen/include/xenpmap.h
--- a/sys/arch/xen/include/xenpmap.h    Mon Jul 02 20:37:29 2012 +0000
+++ b/sys/arch/xen/include/xenpmap.h    Mon Jul 02 21:01:48 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xenpmap.h,v 1.33.2.1 2012/05/09 03:22:52 riz Exp $     */
+/*     $NetBSD: xenpmap.h,v 1.33.2.2 2012/07/02 21:01:48 jdc Exp $     */
 
 /*
  *
@@ -58,11 +58,8 @@
 
 void pmap_xen_resume(void);
 void pmap_xen_suspend(void);
-
-#ifdef PAE
-void   pmap_map_recursive_entries(void);
-void   pmap_unmap_recursive_entries(void);
-#endif /* PAE */
+void pmap_map_recursive_entries(void);
+void pmap_unmap_recursive_entries(void);
 
 #if defined(PAE) || defined(__x86_64__)
 void xen_kpm_sync(struct pmap *, int);
diff -r 912dcd0d02a8 -r ea528a2e3d34 sys/arch/xen/x86/xen_pmap.c
--- a/sys/arch/xen/x86/xen_pmap.c       Mon Jul 02 20:37:29 2012 +0000
+++ b/sys/arch/xen/x86/xen_pmap.c       Mon Jul 02 21:01:48 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xen_pmap.c,v 1.16.2.2 2012/05/09 03:22:54 riz Exp $    */
+/*     $NetBSD: xen_pmap.c,v 1.16.2.3 2012/07/02 21:01:48 jdc Exp $    */
 
 /*
  * Copyright (c) 2007 Manuel Bouyer.
@@ -102,7 +102,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xen_pmap.c,v 1.16.2.2 2012/05/09 03:22:54 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xen_pmap.c,v 1.16.2.3 2012/07/02 21:01:48 jdc Exp $");
 
 #include "opt_user_ldt.h"
 #include "opt_lockdebug.h"
@@ -249,20 +249,15 @@
        xpq_flush_queue();
        splx(s);
 
-#ifdef PAE
        pmap_unmap_recursive_entries();
-#endif
 }
 
 void
 pmap_xen_resume(void)
 {
-#ifdef PAE
        pmap_map_recursive_entries();
-#endif
 }
 
-#ifdef PAE
 /*
  * NetBSD uses L2 shadow pages to support PAE with Xen. However, Xen does not
  * handle them correctly during save/restore, leading to incorrect page
@@ -330,7 +325,6 @@
        xpq_flush_queue();
 
 }
-#endif /* PAE */
 
 #if defined(PAE) || defined(__x86_64__)
 



Home | Main Index | Thread Index | Old Index