diff options
Diffstat (limited to 'arch/x86/kernel/entry_64.S')
-rw-r--r-- | arch/x86/kernel/entry_64.S | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index c7341e81941c..6be39a387c5a 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S | |||
@@ -581,16 +581,24 @@ retint_restore_args: /* return to kernel space */ | |||
581 | */ | 581 | */ |
582 | TRACE_IRQS_IRETQ | 582 | TRACE_IRQS_IRETQ |
583 | restore_args: | 583 | restore_args: |
584 | RESTORE_ARGS 0,8,0 | 584 | RESTORE_ARGS 0,8,0 |
585 | #ifdef CONFIG_PARAVIRT | 585 | |
586 | ENTRY(irq_return) | ||
586 | INTERRUPT_RETURN | 587 | INTERRUPT_RETURN |
587 | #endif | 588 | |
589 | .section __ex_table, "a" | ||
590 | .quad irq_return, bad_iret | ||
591 | .previous | ||
592 | |||
593 | #ifdef CONFIG_PARAVIRT | ||
588 | ENTRY(native_iret) | 594 | ENTRY(native_iret) |
589 | iretq | 595 | iretq |
590 | 596 | ||
591 | .section __ex_table,"a" | 597 | .section __ex_table,"a" |
592 | .quad native_iret, bad_iret | 598 | .quad native_iret, bad_iret |
593 | .previous | 599 | .previous |
600 | #endif | ||
601 | |||
594 | .section .fixup,"ax" | 602 | .section .fixup,"ax" |
595 | bad_iret: | 603 | bad_iret: |
596 | /* | 604 | /* |
@@ -804,7 +812,7 @@ paranoid_swapgs\trace: | |||
804 | SWAPGS_UNSAFE_STACK | 812 | SWAPGS_UNSAFE_STACK |
805 | paranoid_restore\trace: | 813 | paranoid_restore\trace: |
806 | RESTORE_ALL 8 | 814 | RESTORE_ALL 8 |
807 | INTERRUPT_RETURN | 815 | jmp irq_return |
808 | paranoid_userspace\trace: | 816 | paranoid_userspace\trace: |
809 | GET_THREAD_INFO(%rcx) | 817 | GET_THREAD_INFO(%rcx) |
810 | movl threadinfo_flags(%rcx),%ebx | 818 | movl threadinfo_flags(%rcx),%ebx |
@@ -919,7 +927,7 @@ error_kernelspace: | |||
919 | iret run with kernel gs again, so don't set the user space flag. | 927 | iret run with kernel gs again, so don't set the user space flag. |
920 | B stepping K8s sometimes report an truncated RIP for IRET | 928 | B stepping K8s sometimes report an truncated RIP for IRET |
921 | exceptions returning to compat mode. Check for these here too. */ | 929 | exceptions returning to compat mode. Check for these here too. */ |
922 | leaq native_iret(%rip),%rbp | 930 | leaq irq_return(%rip),%rbp |
923 | cmpq %rbp,RIP(%rsp) | 931 | cmpq %rbp,RIP(%rsp) |
924 | je error_swapgs | 932 | je error_swapgs |
925 | movl %ebp,%ebp /* zero extend */ | 933 | movl %ebp,%ebp /* zero extend */ |