|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] x86/alternatives: Introduce init_or_livepatch_ro_after_init
commit 0dc67f3aab0a080b756f9e54b8a58a4a887f702b
Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Wed May 21 22:36:45 2025 +0100
Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Wed Aug 5 09:49:45 2026 +0100
x86/alternatives: Introduce init_or_livepatch_ro_after_init
... and use it for ideal_nops and toolchain_nops_are_ideal; both of which
are
invariant after arch_init_ideal_nops() has run.
No functional change.
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
xen/arch/x86/alternative.c | 4 ++--
xen/include/xen/init.h | 14 ++++++++------
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/xen/arch/x86/alternative.c b/xen/arch/x86/alternative.c
index 30c5ccaa8b..5709c0b514 100644
--- a/xen/arch/x86/alternative.c
+++ b/xen/arch/x86/alternative.c
@@ -47,7 +47,7 @@ static const unsigned char p6_nops[] init_or_livepatch_const
= {
};
#endif
-static const unsigned char *ideal_nops init_or_livepatch_data = p6_nops;
+static const unsigned char *init_or_livepatch_ro_after_init ideal_nops =
p6_nops;
#ifdef HAVE_AS_NOPS_DIRECTIVE
@@ -56,7 +56,7 @@ asm ( ".pushsection .init.rodata, \"a\", @progbits\n\t"
"toolchain_nops: .nops " __stringify(ASM_NOP_MAX) "\n\t"
".popsection\n\t");
extern char toolchain_nops[ASM_NOP_MAX];
-static bool init_or_livepatch_read_mostly toolchain_nops_are_ideal;
+static bool init_or_livepatch_ro_after_init toolchain_nops_are_ideal;
#else
# define toolchain_nops_are_ideal false
diff --git a/xen/include/xen/init.h b/xen/include/xen/init.h
index 2e5bea2bff..caf37fed0e 100644
--- a/xen/include/xen/init.h
+++ b/xen/include/xen/init.h
@@ -28,14 +28,16 @@
# define init_or_livepatch_const
# define init_or_livepatch_constrel
# define init_or_livepatch_data
-# define init_or_livepatch_read_mostly __read_mostly
+# define init_or_livepatch_read_mostly __read_mostly
+# define init_or_livepatch_ro_after_init __ro_after_init
# define init_or_livepatch
#else /* !CONFIG_LIVEPATCH */
-# define init_or_livepatch_const __initconst
-# define init_or_livepatch_constrel __initconstrel
-# define init_or_livepatch_data __initdata
-# define init_or_livepatch_read_mostly __initdata
-# define init_or_livepatch __init
+# define init_or_livepatch_const __initconst
+# define init_or_livepatch_constrel __initconstrel
+# define init_or_livepatch_data __initdata
+# define init_or_livepatch_read_mostly __initdata
+# define init_or_livepatch_ro_after_init __initdata
+# define init_or_livepatch __init
#endif /* !CONFIG_LIVEPATCH */
/* These macros are used to mark some functions or
--
generated by git-patchbot for /home/xen/git/xen.git#staging
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |