|
@@ -622,7 +622,7 @@ static struct trap_array_entry trap_array[] = {
|
|
{ simd_coprocessor_error, xen_simd_coprocessor_error, false },
|
|
{ simd_coprocessor_error, xen_simd_coprocessor_error, false },
|
|
};
|
|
};
|
|
|
|
|
|
-static bool get_trap_addr(void **addr, unsigned int ist)
|
|
|
|
|
|
+static bool __ref get_trap_addr(void **addr, unsigned int ist)
|
|
{
|
|
{
|
|
unsigned int nr;
|
|
unsigned int nr;
|
|
bool ist_okay = false;
|
|
bool ist_okay = false;
|
|
@@ -644,6 +644,14 @@ static bool get_trap_addr(void **addr, unsigned int ist)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (nr == ARRAY_SIZE(trap_array) &&
|
|
|
|
+ *addr >= (void *)early_idt_handler_array[0] &&
|
|
|
|
+ *addr < (void *)early_idt_handler_array[NUM_EXCEPTION_VECTORS]) {
|
|
|
|
+ nr = (*addr - (void *)early_idt_handler_array[0]) /
|
|
|
|
+ EARLY_IDT_HANDLER_SIZE;
|
|
|
|
+ *addr = (void *)xen_early_idt_handler_array[nr];
|
|
|
|
+ }
|
|
|
|
+
|
|
if (WARN_ON(ist != 0 && !ist_okay))
|
|
if (WARN_ON(ist != 0 && !ist_okay))
|
|
return false;
|
|
return false;
|
|
|
|
|
|
@@ -1262,6 +1270,21 @@ asmlinkage __visible void __init xen_start_kernel(void)
|
|
xen_setup_gdt(0);
|
|
xen_setup_gdt(0);
|
|
|
|
|
|
xen_init_irq_ops();
|
|
xen_init_irq_ops();
|
|
|
|
+
|
|
|
|
+ /* Let's presume PV guests always boot on vCPU with id 0. */
|
|
|
|
+ per_cpu(xen_vcpu_id, 0) = 0;
|
|
|
|
+
|
|
|
|
+ /*
|
|
|
|
+ * Setup xen_vcpu early because idt_setup_early_handler needs it for
|
|
|
|
+ * local_irq_disable(), irqs_disabled().
|
|
|
|
+ *
|
|
|
|
+ * Don't do the full vcpu_info placement stuff until we have
|
|
|
|
+ * the cpu_possible_mask and a non-dummy shared_info.
|
|
|
|
+ */
|
|
|
|
+ xen_vcpu_info_reset(0);
|
|
|
|
+
|
|
|
|
+ idt_setup_early_handler();
|
|
|
|
+
|
|
xen_init_capabilities();
|
|
xen_init_capabilities();
|
|
|
|
|
|
#ifdef CONFIG_X86_LOCAL_APIC
|
|
#ifdef CONFIG_X86_LOCAL_APIC
|
|
@@ -1295,18 +1318,6 @@ asmlinkage __visible void __init xen_start_kernel(void)
|
|
*/
|
|
*/
|
|
acpi_numa = -1;
|
|
acpi_numa = -1;
|
|
#endif
|
|
#endif
|
|
- /* Let's presume PV guests always boot on vCPU with id 0. */
|
|
|
|
- per_cpu(xen_vcpu_id, 0) = 0;
|
|
|
|
-
|
|
|
|
- /*
|
|
|
|
- * Setup xen_vcpu early because start_kernel needs it for
|
|
|
|
- * local_irq_disable(), irqs_disabled().
|
|
|
|
- *
|
|
|
|
- * Don't do the full vcpu_info placement stuff until we have
|
|
|
|
- * the cpu_possible_mask and a non-dummy shared_info.
|
|
|
|
- */
|
|
|
|
- xen_vcpu_info_reset(0);
|
|
|
|
-
|
|
|
|
WARN_ON(xen_cpuhp_setup(xen_cpu_up_prepare_pv, xen_cpu_dead_pv));
|
|
WARN_ON(xen_cpuhp_setup(xen_cpu_up_prepare_pv, xen_cpu_dead_pv));
|
|
|
|
|
|
local_irq_disable();
|
|
local_irq_disable();
|