fix(cpus): correct CVE-2025-11689/0647 combined trap handler on N2
The combined WORKAROUND_CVE_2025_0647 && CVE_2025_11689_DYNAMIC_WA path
in neoverse_n2_impl_defined_el3_handler had several porting bugs that
caused VM hangs and register corruption on Neoverse N2 (CN103/CN105):
- bl->b: handler used bl to tail-call workaround functions, clobbering
x30 and causing execution to fall into neoverse_n2_reset_func.
- SP misuse: wa_cve_2025_0647_do_cpp_wa requires SP==CTX_BASE but was
called from C, where SP is offset by the C frame. Refactored
handle_tcr_or_cpp_exception to return 0/1 so the assembly dispatcher
can tail-call it directly with SP restored to CTX_BASE.
- Register save: ea_delegate.S only saved x0-x5; the C handler clobbered
x6-x18, corrupting guest registers on ERET. Extended save/restore to
cover x0-x29 for the CVE_2025_11689_DYNAMIC_WA fast path.
Signed-off-by: Suman Ghosh <sumang@marvell.com>
4 files changed