|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v5 08/13] x86/traps: factor out pv_trap_init
On 26/06/17 17:28, Wei Liu wrote:
> Factor out pv_trap_init and call it at the beginning of trap_init. We
> then need to tune the code to generate stub handlers in entry.S. Take
> the chance to tune init_irq_data so that 0x80 and 0x82 can be used in
> !CONFIG_PV case.
"used for regular interrupts in ..." ?
> diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
> index 7e3cba0ffe..d89409ff05 100644
> --- a/xen/arch/x86/traps.c
> +++ b/xen/arch/x86/traps.c
> @@ -1934,21 +1934,29 @@ void __init init_idt_traps(void)
> this_cpu(compat_gdt_table) = boot_cpu_compat_gdt_table;
> }
>
> +void __init pv_trap_init(void)
> +{
> + /* The 32-on-64 hypercall vector is only accessible from ring 1. */
> + _set_gate(idt_table + HYPERCALL_VECTOR,
&idt_table[HYPERCALL_VECTOR]
> + SYS_DESC_trap_gate, 1, entry_int82);
> +
> + /* Fast trap for int80 (faster than taking the #GP-fixup path). */
> + _set_gate(idt_table + LEGACY_SYSCALL_VECTOR, SYS_DESC_trap_gate, 3,
&idt_table[LEGACY_SYSCALL_VECTOR]
Otherwise, Reivewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> + &int80_direct_trap);
> +
> + open_softirq(NMI_MCE_SOFTIRQ, nmi_mce_softirq);
> +}
> +
> extern void (*const autogen_entrypoints[NR_VECTORS])(void);
> void __init trap_init(void)
> {
> unsigned int vector;
>
> + pv_trap_init();
> +
> /* Replace early pagefault with real pagefault handler. */
> set_intr_gate(TRAP_page_fault, &page_fault);
>
> - /* The 32-on-64 hypercall vector is only accessible from ring 1. */
> - _set_gate(idt_table + HYPERCALL_VECTOR,
> - SYS_DESC_trap_gate, 1, entry_int82);
> -
> - /* Fast trap for int80 (faster than taking the #GP-fixup path). */
> - _set_gate(idt_table + 0x80, SYS_DESC_trap_gate, 3, &int80_direct_trap);
> -
> for ( vector = 0; vector < NR_VECTORS; ++vector )
> {
> if ( autogen_entrypoints[vector] )
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |