lkml.org 
[lkml]   [2021]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
SubjectRe: [PATCH] x86/paravirt: Fix build PARAVIRT_XXL=y without XEN_PV
On Fri, Nov 19, 2021 at 6:20 PM Kirill A. Shutemov <kirill@shutemov.name> wrote:

> > It is part of what CONFIG_PARAVIRT_XXL was designed for to enable
> > pv-aware INTERRUPT_RETURN.
>
> That's very vague statement.
>
> Could you elaborate on what is wrong with proposed fix?
>

Although CONFIG_PARAVIRT_XXL is enabled only when XEN, but they are
separated configs. There is no wrong with the patch, but it is not
justified to narrow the scope of INTERRUPT_RETURN.

How about:

diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h
index cebec95a7124..4459f853f77b 100644
--- a/arch/x86/include/asm/paravirt.h
+++ b/arch/x86/include/asm/paravirt.h
@@ -746,10 +746,16 @@ extern void default_banner(void);
#define PARA_SITE(ptype, ops) _PVSITE(ptype, ops, .quad, 8)
#define PARA_INDIRECT(addr) *addr(%rip)

+#ifdef CONFIG_XEN_PV
+#define XEN_IRET "jmp xen_iret;"
+#else
+#define XEN_IRET ""
+#endif
+
#define INTERRUPT_RETURN \
ANNOTATE_RETPOLINE_SAFE; \
ALTERNATIVE_TERNARY("jmp *paravirt_iret(%rip);", \
- X86_FEATURE_XENPV, "jmp xen_iret;", "jmp native_iret;")
+ X86_FEATURE_XENPV, XEN_IRET, "jmp native_iret;")

#ifdef CONFIG_DEBUG_ENTRY
.macro PARA_IRQ_save_fl
And in the patch, INTERRUPT_RETURN is moved at the definition
of SWAPGS, but SWAPGS is going to be removed:

https://lore.kernel.org/lkml/20211026143436.19071-2-jiangshanlai@gmail.com/

\
 
 \ /
  Last update: 2021-11-20 02:24    [W:0.068 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site