Hi all, After merging the tip tree, today's linux-next build (x86_64 allmodconfig) failed like this: In file included from arch/x86/coco/sev/svsm.c:8: arch/x86/include/asm/sev.h:393:9: error: unknown type name 'pte_t' 393 | pte_t *kpte; | ^~~~~ arch/x86/include/asm/sev.h:404:9: error: unknown type name 'pgprot_t' 404 | pgprot_t new_pgprot; | ^~~~~~~~ arch/x86/include/asm/sev.h:464:44: error: unknown type name 'pgd_t'; did you mean 'pid_t'? 464 | extern int __init sev_es_efi_map_ghcbs_cas(pgd_t *pgd); | ^~~~~ | pid_t arch/x86/include/asm/sev.h:521:23: error: unknown type name 'pte_t' 521 | void set_pte_enc_mask(pte_t *kpte, unsigned long pfn, pgprot_t new_prot); | ^~~~~ arch/x86/include/asm/sev.h:521:55: error: unknown type name 'pgprot_t' 521 | void set_pte_enc_mask(pte_t *kpte, unsigned long pfn, pgprot_t new_prot); | ^~~~~~~~ arch/x86/include/asm/sev.h:655:45: error: 'enum pg_level' declared inside parameter list will not be visible outside of this definition or declaration [-Werror] 655 | int rmp_make_private(u64 pfn, u64 gpa, enum pg_level level, u32 asid, bool immutable); | ^~~~~~~~ arch/x86/include/asm/sev.h:656:35: error: 'enum pg_level' declared inside parameter list will not be visible outside of this definition or declaration [-Werror] 656 | int rmp_make_shared(u64 pfn, enum pg_level level); | ^~~~~~~~ In file included from arch/x86/coco/sev/svsm.c:10: arch/x86/coco/sev/internal.h:56:46: error: unknown type name 'runtime_data' 56 | DECLARE_PER_CPU(struct sev_es_runtime_data*, runtime_data); | ^~~~~~~~~~~~ arch/x86/coco/sev/internal.h:57:44: error: unknown type name 'sev_vmsa' 57 | DECLARE_PER_CPU(struct sev_es_save_area *, sev_vmsa); | ^~~~~~~~ arch/x86/coco/sev/internal.h:62:35: error: unknown type name 'svsm_caa' 62 | DECLARE_PER_CPU(struct svsm_ca *, svsm_caa); | ^~~~~~~~ arch/x86/coco/sev/internal.h:63:22: error: unknown type name 'svsm_caa_pa' 63 | DECLARE_PER_CPU(u64, svsm_caa_pa); | ^~~~~~~~~~~ arch/x86/coco/sev/internal.h: In function 'sev_es_rd_ghcb_msr': arch/x86/coco/sev/internal.h:75:16: error: implicit declaration of function 'native_rdmsrq' [-Wimplicit-function-declaration] 75 | return native_rdmsrq(MSR_AMD64_SEV_ES_GHCB); | ^~~~~~~~~~~~~ arch/x86/coco/sev/internal.h:75:30: error: 'MSR_AMD64_SEV_ES_GHCB' undeclared (first use in this function) 75 | return native_rdmsrq(MSR_AMD64_SEV_ES_GHCB); | ^~~~~~~~~~~~~~~~~~~~~ arch/x86/coco/sev/internal.h:75:30: note: each undeclared identifier is reported only once for each function it appears in arch/x86/coco/sev/internal.h: In function 'sev_es_wr_ghcb_msr': arch/x86/coco/sev/internal.h:85:9: error: implicit declaration of function 'native_wrmsr' [-Wimplicit-function-declaration] 85 | native_wrmsr(MSR_AMD64_SEV_ES_GHCB, low, high); | ^~~~~~~~~~~~ arch/x86/coco/sev/internal.h:85:22: error: 'MSR_AMD64_SEV_ES_GHCB' undeclared (first use in this function) 85 | native_wrmsr(MSR_AMD64_SEV_ES_GHCB, low, high); | ^~~~~~~~~~~~~~~~~~~~~ arch/x86/coco/sev/internal.h: In function 'svsm_get_caa': arch/x86/coco/sev/internal.h:97:24: error: implicit declaration of function 'this_cpu_read' [-Wimplicit-function-declaration] 97 | return this_cpu_read(svsm_caa); | ^~~~~~~~~~~~~ arch/x86/coco/sev/internal.h:97:38: error: 'svsm_caa' undeclared (first use in this function); did you mean 'svsm_ca'? 97 | return this_cpu_read(svsm_caa); | ^~~~~~~~ | svsm_ca arch/x86/coco/sev/internal.h: In function 'svsm_get_caa_pa': arch/x86/coco/sev/internal.h:105:38: error: 'svsm_caa_pa' undeclared (first use in this function); did you mean 'svsm_get_caa_pa'? 105 | return this_cpu_read(svsm_caa_pa); | ^~~~~~~~~~~ | svsm_get_caa_pa arch/x86/coco/sev/svsm.c: At top level: arch/x86/coco/sev/svsm.c:24:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__ro_after_init' 24 | u64 boot_svsm_caa_pa __ro_after_init; | ^~~~~~~~~~~~~~~ arch/x86/coco/sev/svsm.c:27:34: error: unknown type name 'svsm_caa' 27 | DEFINE_PER_CPU(struct svsm_ca *, svsm_caa); | ^~~~~~~~ arch/x86/coco/sev/svsm.c:28:21: error: unknown type name 'svsm_caa_pa' 28 | DEFINE_PER_CPU(u64, svsm_caa_pa); | ^~~~~~~~~~~ arch/x86/coco/sev/svsm.c: In function 'svsm_perform_call_protocol': arch/x86/coco/sev/svsm.c:75:17: error: implicit declaration of function 'native_local_irq_save' [-Wimplicit-function-declaration] 75 | flags = native_local_irq_save(); | ^~~~~~~~~~~~~~~~~~~~~ arch/x86/coco/sev/svsm.c:92:9: error: implicit declaration of function 'native_local_irq_restore' [-Wimplicit-function-declaration] 92 | native_local_irq_restore(flags); | ^~~~~~~~~~~~~~~~~~~~~~~~ arch/x86/coco/sev/svsm.c: In function 'snp_issue_svsm_attest_req': arch/x86/coco/sev/svsm.c:280:9: error: implicit declaration of function 'local_irq_save' [-Wimplicit-function-declaration] 280 | local_irq_save(flags); | ^~~~~~~~~~~~~~ arch/x86/coco/sev/svsm.c:300:9: error: implicit declaration of function 'local_irq_restore' [-Wimplicit-function-declaration] 300 | local_irq_restore(flags); | ^~~~~~~~~~~~~~~~~ In file included from : arch/x86/coco/sev/svsm.c: At top level: arch/x86/include/asm/linkage.h:151:60: error: '__pi_boot_svsm_caa_pa' aliased to undefined symbol 'boot_svsm_caa_pa' 151 | #define SYM_PIC_ALIAS(sym) extern typeof(sym) __PASTE(__pi_, sym) __alias(sym) | ^~~~~ include/linux/compiler_types.h:15:24: note: in definition of macro '___PASTE' 15 | #define ___PASTE(a, b) a##b | ^ arch/x86/include/asm/linkage.h:151:52: note: in expansion of macro '__PASTE' 151 | #define SYM_PIC_ALIAS(sym) extern typeof(sym) __PASTE(__pi_, sym) __alias(sym) | ^~~~~~~ arch/x86/coco/sev/svsm.c:25:1: note: in expansion of macro 'SYM_PIC_ALIAS' 25 | SYM_PIC_ALIAS(boot_svsm_caa_pa); | ^~~~~~~~~~~~~ arch/x86/coco/sev/internal.h: In function 'svsm_get_caa': arch/x86/coco/sev/internal.h:100:1: error: control reaches end of non-void function [-Werror=return-type] 100 | } | ^ arch/x86/coco/sev/internal.h: In function 'svsm_get_caa_pa': arch/x86/coco/sev/internal.h:108:1: error: control reaches end of non-void function [-Werror=return-type] 108 | } | ^ cc1: all warnings being treated as errors Caused by commit e21279b73ef6 ("x86/sev: Carve out the SVSM code into a separate compilation unit") Clearly, arch/x86/include/asm/sev.h and arch/x86/coco/sev/internal.h assume some header files are included before them that are now missing from arch/x86/coco/sev/svsm.c but should probably be explicitly included in these headers files. I realise that these dependencies may have been exposed by other changes in linux-next. I have used the tip tree from next-20260106 for today. -- Cheers, Stephen Rothwell