x86: Address MIRSA R8.4 (declaration visibility) issues

set_guest_*_trapbounce() are only called from assembly so gain asmlinkage to
identify them.

xen_msr_s_cet_value() is called by assembly and C, so asmlinkage isn't
appropriate.  Make the declaration unconditional, which silences the
complaint.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Andrew Cooper committed 2025-12-30 16:02:38 +00:00
1 parent 2c0d554387
commit c36ddba28e
2 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -99,7 +99,7 @@ void pv_inject_event(const struct x86_event *event)
* Called from asm to set up the MCE trapbounce info.
* Returns false no callback is set up, else true.
*/
bool set_guest_machinecheck_trapbounce(void)
bool asmlinkage set_guest_machinecheck_trapbounce(void)
{
struct vcpu *curr = current;
struct trap_bounce *tb = &curr->arch.pv.trap_bounce;
@@ -114,7 +114,7 @@ bool set_guest_machinecheck_trapbounce(void)
* Called from asm to set up the NMI trapbounce info.
* Returns false if no callback is set up, else true.
*/
bool set_guest_nmi_trapbounce(void)
bool asmlinkage set_guest_nmi_trapbounce(void)
{
struct vcpu *curr = current;
struct trap_bounce *tb = &curr->arch.pv.trap_bounce;
+2 -2
View File
@@ -877,6 +877,8 @@ static void noreturn init_done(void)
startup_cpu_idle_loop();
}
unsigned int xen_msr_s_cet_value(void); /* To avoid ifdefary, and placate MISRA */
#if defined(CONFIG_XEN_SHSTK) || defined(CONFIG_XEN_IBT)
/*
* Used by AP and S3 asm code to calcualte the appropriate MSR_S_CET setting.
@@ -888,8 +890,6 @@ unsigned int xen_msr_s_cet_value(void)
return ((cpu_has_xen_shstk ? CET_SHSTK_EN | CET_WRSS_EN : 0) |
(cpu_has_xen_ibt ? CET_ENDBR_EN : 0));
}
#else
unsigned int xen_msr_s_cet_value(void); /* To avoid ifdefary */
#endif
/* Reinitalise all state referring to the old virtual address of the stack. */
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.