x86/entry: Adjustments to "reduce assembly code size of entry points"

Some retroactive review, for if I'd got to the patch in time.

 * The new ASM-friendly BUILD_BUG_ON() should be in a header file.
 * entry_int82() wants the movl->movb treatment too.

Fixes: c144b9e324 ("x86: Reduce assembly code size of entry points")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Andrew Cooper committed 2024-02-26 18:20:27 +00:00
1 parent 6f1b280876
commit 7d3c91377d
3 files changed
+9 -9

No files matched your search

+8
View File
@@ -82,6 +82,14 @@ register unsigned long current_stack_pointer asm("rsp");
#ifdef __ASSEMBLY__
.macro BUILD_BUG_ON condstr cond:vararg
.if \cond
.error "Condition \"\condstr\" not satisfied"
.endif
.endm
/* preprocessor macro to make error message more user friendly */
#define BUILD_BUG_ON(cond) BUILD_BUG_ON #cond cond
#ifdef HAVE_AS_QUOTED_SYM
#define SUBSECTION_LBL(tag) \
.ifndef .L.tag; \
+1 -1
View File
@@ -15,7 +15,7 @@ FUNC(entry_int82)
ENDBR64
ALTERNATIVE "", clac, X86_FEATURE_XEN_SMAP
pushq $0
movl $HYPERCALL_VECTOR, 4(%rsp)
movb $HYPERCALL_VECTOR, 4(%rsp)
SAVE_ALL compat=1 /* DPL1 gate, restricted to 32bit PV guests only. */
SPEC_CTRL_ENTRY_FROM_PV /* Req: %rsp=regs/cpuinfo, %rdx=0, Clob: acd */
-8
View File
@@ -22,14 +22,6 @@
#endif
.endm
.macro BUILD_BUG_ON condstr cond:vararg
.if \cond
.error "Condition \"\condstr\" not satisfied"
.endif
.endm
/* preprocessor macro to make error message more user friendly */
#define BUILD_BUG_ON(cond) BUILD_BUG_ON #cond cond
#ifdef CONFIG_PV
/* %rbx: struct vcpu */
FUNC_LOCAL(switch_to_kernel)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.