# \[PATCH v2 15/27\] x86/xen: Ignore noreturn status of weak mem\_map\_via\_hcall()

- From: Josh Poimboeuf \<jpoimboe@kernel.org\>
- Date: 2026-09-08 20:34:36 
- List: rust-for-linux
- Page: https://ratatoskr.run/rust-for-linux/2026/09/17533671
- Thread: https://ratatoskr.run/rust-for-linux/2026/09/17533657/t.md

```text
Unlike the non-weak version, the weak version of mem_map_via_hcall()
doesn't return.  Tell objtool to ignore that, as the protoype (and the
non-weak version) aren't noreturn so its callers can't assume it.

Reported-by: kernel test robot <redacted>
Closes: https://lore.kernel.org/oe-kbuild-all/202608280214.c28GlIx6-lkp@intel.com/
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
---
 arch/x86/platform/pvh/enlighten.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/platform/pvh/enlighten.c b/arch/x86/platform/pvh/enlighten.c
index f2053cbe9b0ce..9f227f06cbaf5 100644
--- a/arch/x86/platform/pvh/enlighten.c
+++ b/arch/x86/platform/pvh/enlighten.c
@@ -37,6 +37,7 @@ void __init __weak mem_map_via_hcall(struct boot_params *ptr __maybe_unused)
 	xen_raw_printk("Error: Could not find memory map\n");
 	BUG();
 }
+ANNOTATE_IGNORE_NORETURN(mem_map_via_hcall);
 
 static void __init init_pvh_bootparams(bool xen_guest)
 {
-- 
2.55.0

```
