Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d3eb2c89 authored by Konrad Rzeszutek Wilk's avatar Konrad Rzeszutek Wilk
Browse files

xen/mmu: Move the setting of pvops.write_cr3 to later phase in bootup.



We move the setting of write_cr3 from the early bootup variant
(see git commit 0cc9129d
"x86-64, xen, mmu: Provide an early version of write_cr3.")
to a more appropiate location.

This new location sets all of the other non-early variants
of pvops calls - and most importantly is before the
alternative_asm mechanism kicks in.

Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
parent 76fc2537
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -1467,8 +1467,6 @@ static void __init xen_write_cr3_init(unsigned long cr3)
	__xen_write_cr3(true, cr3);
	__xen_write_cr3(true, cr3);


	xen_mc_issue(PARAVIRT_LAZY_CPU);  /* interrupts restored */
	xen_mc_issue(PARAVIRT_LAZY_CPU);  /* interrupts restored */

	pv_mmu_ops.write_cr3 = &xen_write_cr3;
}
}
#endif
#endif


@@ -2122,6 +2120,7 @@ static void __init xen_post_allocator_init(void)
#endif
#endif


#ifdef CONFIG_X86_64
#ifdef CONFIG_X86_64
	pv_mmu_ops.write_cr3 = &xen_write_cr3;
	SetPagePinned(virt_to_page(level3_user_vsyscall));
	SetPagePinned(virt_to_page(level3_user_vsyscall));
#endif
#endif
	xen_mark_init_mm_pinned();
	xen_mark_init_mm_pinned();