[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <169987636342.3135.13474563880935419815.tip-bot2@tip-bot2>
Date: Mon, 13 Nov 2023 11:52:43 -0000
From: "tip-bot2 for Hou Wenlong" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Nadav Amit <namit@...are.com>,
Hou Wenlong <houwenlong.hwl@...group.com>,
"Borislav Petkov (AMD)" <bp@...en8.de>,
Juergen Gross <jgross@...e.com>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: x86/paravirt] x86/paravirt: Make the struct paravirt_patch_site packed
The following commit has been merged into the x86/paravirt branch of tip:
Commit-ID: fe22bc430c9d24394e541e16e0941a075f02fcb7
Gitweb: https://git.kernel.org/tip/fe22bc430c9d24394e541e16e0941a075f02fcb7
Author: Hou Wenlong <houwenlong.hwl@...group.com>
AuthorDate: Fri, 09 Jun 2023 17:45:32 +08:00
Committer: Borislav Petkov (AMD) <bp@...en8.de>
CommitterDate: Mon, 13 Nov 2023 12:43:50 +01:00
x86/paravirt: Make the struct paravirt_patch_site packed
Similar to struct alt_instr, make the struct paravirt_patch_site packed
and get rid of all the .align directives and save 2 bytes for one
PARA_SITE entry on X86_64.
[ bp: Massage commit message. ]
Suggested-by: Nadav Amit <namit@...are.com>
Signed-off-by: Hou Wenlong <houwenlong.hwl@...group.com>
Signed-off-by: Borislav Petkov (AMD) <bp@...en8.de>
Reviewed-by: Juergen Gross <jgross@...e.com>
Link: https://lore.kernel.org/r/6dcb20159ded36586c5f7f2ae159e4e030256627.1686301237.git.houwenlong.hwl@antgroup.com
---
arch/x86/include/asm/paravirt.h | 2 --
arch/x86/include/asm/paravirt_types.h | 4 +---
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h
index d9384e9..693c61d 100644
--- a/arch/x86/include/asm/paravirt.h
+++ b/arch/x86/include/asm/paravirt.h
@@ -748,11 +748,9 @@ void native_pv_lock_init(void) __init;
ops; \
772:; \
.pushsection .parainstructions,"a"; \
- .align 4; \
.long 771b-.; \
.byte ptype; \
.byte 772b-771b; \
- .align 4; \
.popsection
diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h
index e1bfb71..f4fb2e3 100644
--- a/arch/x86/include/asm/paravirt_types.h
+++ b/arch/x86/include/asm/paravirt_types.h
@@ -8,7 +8,7 @@ struct paravirt_patch_site {
s32 instr_offset; /* original instructions */
u8 type; /* type of this instruction */
u8 len; /* length of original instruction */
-};
+} __packed;
#endif
#ifdef CONFIG_PARAVIRT
@@ -263,11 +263,9 @@ extern struct paravirt_patch_template pv_ops;
#define _paravirt_alt(insn_string, type) \
"771:\n\t" insn_string "\n" "772:\n" \
".pushsection .parainstructions,\"a\"\n" \
- " .align 4\n" \
" .long 771b-.\n" \
" .byte " type "\n" \
" .byte 772b-771b\n" \
- " .align 4\n" \
".popsection\n"
/* Generate patchable code, with the default asm parameters. */
Powered by blists - more mailing lists