Few XEN fixes:
- cpu_load_pmap: perform tlbflush() after xen_set_user_pgd(). - xen_pmap_bootstrap: perform xpq_queue_tlb_flush() in the end. - pmap_tlb_shootdown: do not check PG_G for Xen.
This commit is contained in:
parent
57f2d9bddc
commit
06b5aba5f8
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap_tlb.c,v 1.2 2011/06/12 03:35:50 rmind Exp $ */
|
||||
/* $NetBSD: pmap_tlb.c,v 1.3 2011/06/15 20:50:02 rmind Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2008-2011 The NetBSD Foundation, Inc.
|
||||
@ -40,7 +40,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.2 2011/06/12 03:35:50 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.3 2011/06/15 20:50:02 rmind Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
@ -209,7 +209,9 @@ pmap_tlb_shootdown(struct pmap *pm, vaddr_t va, pt_entry_t pte, tlbwhy_t why)
|
||||
pmap_tlb_packet_t *tp;
|
||||
int s;
|
||||
|
||||
#ifndef XEN
|
||||
KASSERT((pte & PG_G) == 0 || pm == pmap_kernel());
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If tearing down the pmap, do nothing. We will flush later
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cpu.c,v 1.58 2011/06/15 19:54:16 rmind Exp $ */
|
||||
/* $NetBSD: cpu.c,v 1.59 2011/06/15 20:50:02 rmind Exp $ */
|
||||
/* NetBSD: cpu.c,v 1.18 2004/02/20 17:35:01 yamt Exp */
|
||||
|
||||
/*-
|
||||
@ -66,7 +66,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.58 2011/06/15 19:54:16 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.59 2011/06/15 20:50:02 rmind Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_multiprocessor.h"
|
||||
@ -1170,9 +1170,9 @@ cpu_load_pmap(struct pmap *pmap)
|
||||
if ((new_pgd[i] & PG_V) || (old_pgd[i] & PG_V))
|
||||
xpq_queue_pte_update(addr, new_pgd[i]);
|
||||
}
|
||||
tlbflush();
|
||||
xen_set_user_pgd(pmap_pdirpa(pmap, 0));
|
||||
ci->ci_xen_current_user_pgd = pmap_pdirpa(pmap, 0);
|
||||
tlbflush();
|
||||
splx(s);
|
||||
}
|
||||
#endif /* __x86_64__ */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: x86_xpmap.c,v 1.27 2011/06/15 19:54:16 rmind Exp $ */
|
||||
/* $NetBSD: x86_xpmap.c,v 1.28 2011/06/15 20:50:02 rmind Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006 Mathieu Ropert <mro@adviseo.fr>
|
||||
@ -69,7 +69,7 @@
|
||||
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: x86_xpmap.c,v 1.27 2011/06/15 19:54:16 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: x86_xpmap.c,v 1.28 2011/06/15 20:50:02 rmind Exp $");
|
||||
|
||||
#include "opt_xen.h"
|
||||
#include "opt_ddb.h"
|
||||
@ -498,6 +498,10 @@ bootstrap_again:
|
||||
/* zero out free space after tables */
|
||||
memset((void *)(init_tables + ((count + l2_4_count) * PAGE_SIZE)), 0,
|
||||
(UPAGES + 1) * NBPG);
|
||||
|
||||
/* Finally, flush TLB. */
|
||||
xpq_queue_tlb_flush();
|
||||
|
||||
return (init_tables + ((count + l2_4_count) * PAGE_SIZE));
|
||||
}
|
||||
|
||||
@ -508,8 +512,6 @@ bootstrap_again:
|
||||
* new_count is # of new tables (PTE only)
|
||||
* we assume areas don't overlap
|
||||
*/
|
||||
|
||||
|
||||
static void
|
||||
xen_bootstrap_tables (vaddr_t old_pgd, vaddr_t new_pgd,
|
||||
int old_count, int new_count, int final)
|
||||
@ -854,7 +856,6 @@ xen_bootstrap_tables (vaddr_t old_pgd, vaddr_t new_pgd,
|
||||
pte++;
|
||||
}
|
||||
xpq_flush_queue();
|
||||
xpq_queue_tlb_flush();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user