@@ -93,7 +93,8 @@ static bool __init sev_es_check_cpu_features(void)
9393 return true;
9494}
9595
96- static void __noreturn sev_es_terminate (unsigned int set , unsigned int reason )
96+ static void __head __noreturn
97+ sev_es_terminate (unsigned int set , unsigned int reason )
9798{
9899 u64 val = GHCB_MSR_TERM_REQ ;
99100
@@ -330,13 +331,7 @@ static int sev_cpuid_hv(struct ghcb *ghcb, struct es_em_ctxt *ctxt, struct cpuid
330331 */
331332static const struct snp_cpuid_table * snp_cpuid_get_table (void )
332333{
333- void * ptr ;
334-
335- asm ("lea cpuid_table_copy(%%rip), %0"
336- : "=r" (ptr )
337- : "p" (& cpuid_table_copy ));
338-
339- return ptr ;
334+ return & RIP_REL_REF (cpuid_table_copy );
340335}
341336
342337/*
@@ -395,7 +390,7 @@ static u32 snp_cpuid_calc_xsave_size(u64 xfeatures_en, bool compacted)
395390 return xsave_size ;
396391}
397392
398- static bool
393+ static bool __head
399394snp_cpuid_get_validated_func (struct cpuid_leaf * leaf )
400395{
401396 const struct snp_cpuid_table * cpuid_table = snp_cpuid_get_table ();
@@ -532,7 +527,8 @@ static int snp_cpuid_postprocess(struct ghcb *ghcb, struct es_em_ctxt *ctxt,
532527 * Returns -EOPNOTSUPP if feature not enabled. Any other non-zero return value
533528 * should be treated as fatal by caller.
534529 */
535- static int snp_cpuid (struct ghcb * ghcb , struct es_em_ctxt * ctxt , struct cpuid_leaf * leaf )
530+ static int __head
531+ snp_cpuid (struct ghcb * ghcb , struct es_em_ctxt * ctxt , struct cpuid_leaf * leaf )
536532{
537533 const struct snp_cpuid_table * cpuid_table = snp_cpuid_get_table ();
538534
@@ -574,7 +570,7 @@ static int snp_cpuid(struct ghcb *ghcb, struct es_em_ctxt *ctxt, struct cpuid_le
574570 * page yet, so it only supports the MSR based communication with the
575571 * hypervisor and only the CPUID exit-code.
576572 */
577- void __init do_vc_no_ghcb (struct pt_regs * regs , unsigned long exit_code )
573+ void __head do_vc_no_ghcb (struct pt_regs * regs , unsigned long exit_code )
578574{
579575 unsigned int subfn = lower_bits (regs -> cx , 32 );
580576 unsigned int fn = lower_bits (regs -> ax , 32 );
@@ -1025,7 +1021,8 @@ struct cc_setup_data {
10251021 * Search for a Confidential Computing blob passed in as a setup_data entry
10261022 * via the Linux Boot Protocol.
10271023 */
1028- static struct cc_blob_sev_info * find_cc_blob_setup_data (struct boot_params * bp )
1024+ static __head
1025+ struct cc_blob_sev_info * find_cc_blob_setup_data (struct boot_params * bp )
10291026{
10301027 struct cc_setup_data * sd = NULL ;
10311028 struct setup_data * hdr ;
@@ -1052,7 +1049,7 @@ static struct cc_blob_sev_info *find_cc_blob_setup_data(struct boot_params *bp)
10521049 * mapping needs to be updated in sync with all the changes to virtual memory
10531050 * layout and related mapping facilities throughout the boot process.
10541051 */
1055- static void __init setup_cpuid_table (const struct cc_blob_sev_info * cc_info )
1052+ static void __head setup_cpuid_table (const struct cc_blob_sev_info * cc_info )
10561053{
10571054 const struct snp_cpuid_table * cpuid_table_fw , * cpuid_table ;
10581055 int i ;
0 commit comments