Skip to content

Commit e59451f

Browse files
committed
Merge tag 'x86_paravirt_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 paravirtualization fix from Borislav Petkov: "Define the INTERRUPT_RETURN macro only when CONFIG_XEN_PV is enabled as it is its only user" * tag 'x86_paravirt_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/paravirt: Fix build PARAVIRT_XXL=y without XEN_PV
2 parents 191cf7f + 6da5175 commit e59451f

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

arch/x86/include/asm/irqflags.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,6 @@ static __always_inline unsigned long arch_local_irq_save(void)
114114
#define SAVE_FLAGS pushfq; popq %rax
115115
#endif
116116

117-
#define INTERRUPT_RETURN jmp native_iret
118-
119117
#endif
120118

121119
#endif /* __ASSEMBLY__ */
@@ -143,8 +141,13 @@ static __always_inline void arch_local_irq_restore(unsigned long flags)
143141
#ifdef CONFIG_X86_64
144142
#ifdef CONFIG_XEN_PV
145143
#define SWAPGS ALTERNATIVE "swapgs", "", X86_FEATURE_XENPV
144+
#define INTERRUPT_RETURN \
145+
ANNOTATE_RETPOLINE_SAFE; \
146+
ALTERNATIVE_TERNARY("jmp *paravirt_iret(%rip);", \
147+
X86_FEATURE_XENPV, "jmp xen_iret;", "jmp native_iret;")
146148
#else
147149
#define SWAPGS swapgs
150+
#define INTERRUPT_RETURN jmp native_iret
148151
#endif
149152
#endif
150153
#endif /* !__ASSEMBLY__ */

arch/x86/include/asm/paravirt.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -752,11 +752,6 @@ extern void default_banner(void);
752752
#define PARA_SITE(ptype, ops) _PVSITE(ptype, ops, .quad, 8)
753753
#define PARA_INDIRECT(addr) *addr(%rip)
754754

755-
#define INTERRUPT_RETURN \
756-
ANNOTATE_RETPOLINE_SAFE; \
757-
ALTERNATIVE_TERNARY("jmp *paravirt_iret(%rip);", \
758-
X86_FEATURE_XENPV, "jmp xen_iret;", "jmp native_iret;")
759-
760755
#ifdef CONFIG_DEBUG_ENTRY
761756
.macro PARA_IRQ_save_fl
762757
PARA_SITE(PARA_PATCH(PV_IRQ_save_fl),

0 commit comments

Comments
 (0)