Ensure cur_pgd per-cpu variables are initialised early.

Secondary VCPUs can take page faults immediately after
booting, because of writable pagetable logic.

Signed-off-by: Keir Fraser <keir@xensource.com>
This commit is contained in:
kaf24@firebug.cl.cam.ac.uk committed 2005-08-23 17:29:46 +00:00
1 parent a128983d92
commit 4abc4afefd
2 files changed
+8

No files matched your search

@@ -348,9 +348,12 @@ static void __init pagetable_init (void)
{
unsigned long vaddr;
pgd_t *pgd_base = (pgd_t *)xen_start_info.pt_base;
int i;
swapper_pg_dir = pgd_base;
init_mm.pgd = pgd_base;
for (i = 0; i < NR_CPUS; i++)
per_cpu(cur_pgd, i) = pgd_base;
/* Enable PSE if available */
if (cpu_has_pse) {
@@ -559,6 +559,11 @@ static void xen_copy_pt(void)
void __init xen_init_pt(void)
{
int i;
for (i = 0; i < NR_CPUS; i++)
per_cpu(cur_pgd, i) = init_mm.pgd;
memcpy((void *)init_level4_pgt,
(void *)xen_start_info.pt_base, PAGE_SIZE);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.