aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/entry.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386/kernel/entry.S')
-rw-r--r--arch/i386/kernel/entry.S34
1 files changed, 27 insertions, 7 deletions
diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S
index 0220bc8cbb43..d274612e05cd 100644
--- a/arch/i386/kernel/entry.S
+++ b/arch/i386/kernel/entry.S
@@ -62,13 +62,6 @@ DF_MASK = 0x00000400
62NT_MASK = 0x00004000 62NT_MASK = 0x00004000
63VM_MASK = 0x00020000 63VM_MASK = 0x00020000
64 64
65/* These are replaces for paravirtualization */
66#define DISABLE_INTERRUPTS cli
67#define ENABLE_INTERRUPTS sti
68#define ENABLE_INTERRUPTS_SYSEXIT sti; sysexit
69#define INTERRUPT_RETURN iret
70#define GET_CR0_INTO_EAX movl %cr0, %eax
71
72#ifdef CONFIG_PREEMPT 65#ifdef CONFIG_PREEMPT
73#define preempt_stop DISABLE_INTERRUPTS; TRACE_IRQS_OFF 66#define preempt_stop DISABLE_INTERRUPTS; TRACE_IRQS_OFF
74#else 67#else
@@ -416,6 +409,20 @@ ldt_ss:
416 jnz restore_nocheck 409 jnz restore_nocheck
417 testl $0x00400000, %eax # returning to 32bit stack? 410 testl $0x00400000, %eax # returning to 32bit stack?
418 jnz restore_nocheck # allright, normal return 411 jnz restore_nocheck # allright, normal return
412
413#ifdef CONFIG_PARAVIRT
414 /*
415 * The kernel can't run on a non-flat stack if paravirt mode
416 * is active. Rather than try to fixup the high bits of
417 * ESP, bypass this code entirely. This may break DOSemu
418 * and/or Wine support in a paravirt VM, although the option
419 * is still available to implement the setting of the high
420 * 16-bits in the INTERRUPT_RETURN paravirt-op.
421 */
422 cmpl $0, paravirt_ops+PARAVIRT_enabled
423 jne restore_nocheck
424#endif
425
419 /* If returning to userspace with 16bit stack, 426 /* If returning to userspace with 16bit stack,
420 * try to fix the higher word of ESP, as the CPU 427 * try to fix the higher word of ESP, as the CPU
421 * won't restore it. 428 * won't restore it.
@@ -833,6 +840,19 @@ nmi_espfix_stack:
833.previous 840.previous
834KPROBE_END(nmi) 841KPROBE_END(nmi)
835 842
843#ifdef CONFIG_PARAVIRT
844ENTRY(native_iret)
8451: iret
846.section __ex_table,"a"
847 .align 4
848 .long 1b,iret_exc
849.previous
850
851ENTRY(native_irq_enable_sysexit)
852 sti
853 sysexit
854#endif
855
836KPROBE_ENTRY(int3) 856KPROBE_ENTRY(int3)
837 RING0_INT_FRAME 857 RING0_INT_FRAME
838 pushl $-1 # mark this as an int 858 pushl $-1 # mark this as an int