Re: [PATCH 1/3] x86/entry: Fix ELF metadata for NMI and handle_ist_exception

2024-01-23 Thread Jan Beulich
On 22.01.2024 19:17, Andrew Cooper wrote:
> handle_ist_exception isn't part of the NMI handler, just like handle_exception
> isn't part of #PF.
> 
> Fixes: b3a9037550df ("x86: annotate entry points with type and size")
> Signed-off-by: Andrew Cooper 

Reviewed-by: Jan Beulich 

It's a matter of consistency, yes, but personally I wouldn't consider this a
bug (and hence I see no reason for Fixes:). But I can see how different
perspectives here are possible. One this went in, I'll have to remember to
also deal with this case in "common: honor CONFIG_CC_SPLIT_SECTIONS also for
assembly functions".

Jan



[PATCH 1/3] x86/entry: Fix ELF metadata for NMI and handle_ist_exception

2024-01-22 Thread Andrew Cooper
handle_ist_exception isn't part of the NMI handler, just like handle_exception
isn't part of #PF.

Fixes: b3a9037550df ("x86: annotate entry points with type and size")
Signed-off-by: Andrew Cooper 
---
CC: Jan Beulich 
CC: Roger Pau Monné 
CC: Wei Liu 
CC: Konrad Rzeszutek Wilk 
CC: Ross Lagerwall 
---
 xen/arch/x86/x86_64/entry.S | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/x86_64/entry.S b/xen/arch/x86/x86_64/entry.S
index 482c91d4f533..c3f6b667a72a 100644
--- a/xen/arch/x86/x86_64/entry.S
+++ b/xen/arch/x86/x86_64/entry.S
@@ -1023,7 +1023,9 @@ FUNC(entry_NMI)
 ENDBR64
 pushq $0
 movl  $X86_EXC_NMI, 4(%rsp)
-handle_ist_exception:
+END(entry_NMI)
+
+FUNC(handle_ist_exception)
 ALTERNATIVE "", clac, X86_FEATURE_XEN_SMAP
 SAVE_ALL
 
@@ -1150,7 +1152,7 @@ handle_ist_exception:
 ASSERT_CONTEXT_IS_XEN
 jmp   restore_all_xen
 #endif
-END(entry_NMI)
+END(handle_ist_exception)
 
 FUNC(entry_MC)
 ENDBR64
-- 
2.30.2