static void __init noreturn reinit_bsp_stack(void)
{
unsigned long *stack = (void*)(get_stack_bottom() & ~(STACK_SIZE - 1));
+ int rc;
/* Update TSS and ISTs */
load_system_tables();
stack_base[0] = stack;
memguard_guard_stack(stack);
+ rc = setup_cpu_root_pgt(0);
+ if ( rc )
+ panic("Error %d setting up PV root page table\n", rc);
+
if ( IS_ENABLED(CONFIG_XEN_SHSTK) && cpu_has_xen_shstk )
{
wrmsrl(MSR_PL0_SSP,
extern const char _stextentry[], _etextentry[];
-static int setup_cpu_root_pgt(unsigned int cpu)
+int setup_cpu_root_pgt(unsigned int cpu)
{
root_pgentry_t *rpt;
unsigned int off;
void __init smp_prepare_cpus(void)
{
- int rc;
-
register_cpu_notifier(&cpu_smpboot_nfb);
mtrr_aps_sync_begin();
stack_base[0] = (void *)((unsigned long)stack_start & ~(STACK_SIZE - 1));
- rc = setup_cpu_root_pgt(0);
- if ( rc )
- panic("Error %d setting up PV root page table\n", rc);
- if ( per_cpu(root_pgt, 0) )
+ if ( opt_xpti_hwdom || opt_xpti_domu )
{
get_cpu_info()->pv_cr3 = 0;
extern void *stack_base[NR_CPUS];
void initialize_cpu_data(unsigned int cpu);
+int setup_cpu_root_pgt(unsigned int cpu);
#endif /* __XEN_SMP_H__ */