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.
This commit is contained in:
parent
2db61b9b19
commit
23a2531c0e
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: xenpmap.h,v 1.34 2012/04/20 22:23:24 rmind Exp $ */
|
||||
/* $NetBSD: xenpmap.h,v 1.35 2012/06/24 18:31:52 jym Exp $ */
|
||||
|
||||
/*
|
||||
*
|
||||
@ -58,11 +58,8 @@ void xen_bcast_invlpg(vaddr_t);
|
||||
|
||||
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);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: xen_pmap.c,v 1.21 2012/04/20 22:23:25 rmind Exp $ */
|
||||
/* $NetBSD: xen_pmap.c,v 1.22 2012/06/24 18:31:53 jym Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Manuel Bouyer.
|
||||
@ -102,7 +102,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: xen_pmap.c,v 1.21 2012/04/20 22:23:25 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: xen_pmap.c,v 1.22 2012/06/24 18:31:53 jym Exp $");
|
||||
|
||||
#include "opt_user_ldt.h"
|
||||
#include "opt_lockdebug.h"
|
||||
@ -241,9 +241,7 @@ pmap_extract_ma(struct pmap *pmap, vaddr_t va, paddr_t *pap)
|
||||
void
|
||||
pmap_xen_suspend(void)
|
||||
{
|
||||
#ifdef PAE
|
||||
pmap_unmap_recursive_entries();
|
||||
#endif
|
||||
|
||||
xpq_flush_queue();
|
||||
}
|
||||
@ -251,14 +249,11 @@ pmap_xen_suspend(void)
|
||||
void
|
||||
pmap_xen_resume(void)
|
||||
{
|
||||
#ifdef PAE
|
||||
pmap_map_recursive_entries();
|
||||
#endif
|
||||
|
||||
xpq_flush_queue();
|
||||
}
|
||||
|
||||
#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
|
||||
@ -327,7 +322,6 @@ pmap_unmap_recursive_entries(void)
|
||||
0);
|
||||
}
|
||||
}
|
||||
#endif /* PAE */
|
||||
|
||||
#if defined(PAE) || defined(__x86_64__)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user