aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/asm-offsets_64.c1
-rw-r--r--arch/x86/kernel/entry_64.S2
-rw-r--r--arch/x86/kernel/paravirt.c3
-rw-r--r--arch/x86/xen/enlighten.c3
-rw-r--r--include/asm-x86/paravirt.h9
-rw-r--r--include/asm-x86/processor.h2
6 files changed, 20 insertions, 0 deletions
diff --git a/arch/x86/kernel/asm-offsets_64.c b/arch/x86/kernel/asm-offsets_64.c
index 06c451af979a..3295e7c08fe7 100644
--- a/arch/x86/kernel/asm-offsets_64.c
+++ b/arch/x86/kernel/asm-offsets_64.c
@@ -61,6 +61,7 @@ int main(void)
61 OFFSET(PARAVIRT_PATCH_pv_irq_ops, paravirt_patch_template, pv_irq_ops); 61 OFFSET(PARAVIRT_PATCH_pv_irq_ops, paravirt_patch_template, pv_irq_ops);
62 OFFSET(PV_IRQ_irq_disable, pv_irq_ops, irq_disable); 62 OFFSET(PV_IRQ_irq_disable, pv_irq_ops, irq_disable);
63 OFFSET(PV_IRQ_irq_enable, pv_irq_ops, irq_enable); 63 OFFSET(PV_IRQ_irq_enable, pv_irq_ops, irq_enable);
64 OFFSET(PV_IRQ_adjust_exception_frame, pv_irq_ops, adjust_exception_frame);
64 OFFSET(PV_CPU_iret, pv_cpu_ops, iret); 65 OFFSET(PV_CPU_iret, pv_cpu_ops, iret);
65 OFFSET(PV_CPU_usergs_sysret32, pv_cpu_ops, usergs_sysret32); 66 OFFSET(PV_CPU_usergs_sysret32, pv_cpu_ops, usergs_sysret32);
66 OFFSET(PV_CPU_usergs_sysret64, pv_cpu_ops, usergs_sysret64); 67 OFFSET(PV_CPU_usergs_sysret64, pv_cpu_ops, usergs_sysret64);
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
index 880ffe510a11..70fe13a1c41d 100644
--- a/arch/x86/kernel/entry_64.S
+++ b/arch/x86/kernel/entry_64.S
@@ -736,6 +736,7 @@ END(spurious_interrupt)
736 */ 736 */
737 .macro zeroentry sym 737 .macro zeroentry sym
738 INTR_FRAME 738 INTR_FRAME
739 PARAVIRT_ADJUST_EXCEPTION_FRAME
739 pushq $0 /* push error code/oldrax */ 740 pushq $0 /* push error code/oldrax */
740 CFI_ADJUST_CFA_OFFSET 8 741 CFI_ADJUST_CFA_OFFSET 8
741 pushq %rax /* push real oldrax to the rdi slot */ 742 pushq %rax /* push real oldrax to the rdi slot */
@@ -748,6 +749,7 @@ END(spurious_interrupt)
748 749
749 .macro errorentry sym 750 .macro errorentry sym
750 XCPT_FRAME 751 XCPT_FRAME
752 PARAVIRT_ADJUST_EXCEPTION_FRAME
751 pushq %rax 753 pushq %rax
752 CFI_ADJUST_CFA_OFFSET 8 754 CFI_ADJUST_CFA_OFFSET 8
753 CFI_REL_OFFSET rax,0 755 CFI_REL_OFFSET rax,0
diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c
index bf1067e89cad..b20c369cb89d 100644
--- a/arch/x86/kernel/paravirt.c
+++ b/arch/x86/kernel/paravirt.c
@@ -296,6 +296,9 @@ struct pv_irq_ops pv_irq_ops = {
296 .irq_enable = native_irq_enable, 296 .irq_enable = native_irq_enable,
297 .safe_halt = native_safe_halt, 297 .safe_halt = native_safe_halt,
298 .halt = native_halt, 298 .halt = native_halt,
299#ifdef CONFIG_X86_64
300 .adjust_exception_frame = paravirt_nop,
301#endif
299}; 302};
300 303
301struct pv_cpu_ops pv_cpu_ops = { 304struct pv_cpu_ops pv_cpu_ops = {
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 119c88fa769d..3b980831602c 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -1123,6 +1123,9 @@ static const struct pv_irq_ops xen_irq_ops __initdata = {
1123 .irq_enable = xen_irq_enable, 1123 .irq_enable = xen_irq_enable,
1124 .safe_halt = xen_safe_halt, 1124 .safe_halt = xen_safe_halt,
1125 .halt = xen_halt, 1125 .halt = xen_halt,
1126#ifdef CONFIG_X86_64
1127 .adjust_exception_frame = paravirt_nop,
1128#endif
1126}; 1129};
1127 1130
1128static const struct pv_apic_ops xen_apic_ops __initdata = { 1131static const struct pv_apic_ops xen_apic_ops __initdata = {
diff --git a/include/asm-x86/paravirt.h b/include/asm-x86/paravirt.h
index 3286a0c63b42..3dc223da200b 100644
--- a/include/asm-x86/paravirt.h
+++ b/include/asm-x86/paravirt.h
@@ -189,6 +189,10 @@ struct pv_irq_ops {
189 void (*irq_enable)(void); 189 void (*irq_enable)(void);
190 void (*safe_halt)(void); 190 void (*safe_halt)(void);
191 void (*halt)(void); 191 void (*halt)(void);
192
193#ifdef CONFIG_X86_64
194 void (*adjust_exception_frame)(void);
195#endif
192}; 196};
193 197
194struct pv_apic_ops { 198struct pv_apic_ops {
@@ -1544,6 +1548,11 @@ static inline unsigned long __raw_local_irq_save(void)
1544 movq %rax, %rcx; \ 1548 movq %rax, %rcx; \
1545 xorq %rax, %rax; 1549 xorq %rax, %rax;
1546 1550
1551#define PARAVIRT_ADJUST_EXCEPTION_FRAME \
1552 PARA_SITE(PARA_PATCH(pv_irq_ops, PV_IRQ_adjust_exception_frame), \
1553 CLBR_NONE, \
1554 call PARA_INDIRECT(pv_irq_ops+PV_IRQ_adjust_exception_frame))
1555
1547#define USERGS_SYSRET64 \ 1556#define USERGS_SYSRET64 \
1548 PARA_SITE(PARA_PATCH(pv_cpu_ops, PV_CPU_usergs_sysret64), \ 1557 PARA_SITE(PARA_PATCH(pv_cpu_ops, PV_CPU_usergs_sysret64), \
1549 CLBR_NONE, \ 1558 CLBR_NONE, \
diff --git a/include/asm-x86/processor.h b/include/asm-x86/processor.h
index 12b5ede14c7a..df2459f5ebbb 100644
--- a/include/asm-x86/processor.h
+++ b/include/asm-x86/processor.h
@@ -532,6 +532,8 @@ static inline void load_sp0(struct tss_struct *tss,
532 532
533#define set_iopl_mask native_set_iopl_mask 533#define set_iopl_mask native_set_iopl_mask
534#define SWAPGS swapgs 534#define SWAPGS swapgs
535
536#define PARAVIRT_ADJUST_EXCEPTION_FRAME /* */
535#endif /* CONFIG_PARAVIRT */ 537#endif /* CONFIG_PARAVIRT */
536 538
537/* 539/*