On 4/15/25 16:17, Borislav Petkov wrote:
On Tue, Apr 15, 2025 at 01:06:49PM -0600, Shuah Khan wrote:
Does your arch/x86/realmode/rm/pasyms.h has reference to sev_es_trampoline_start?
The one in my tree has it.
arch/x86/realmode/rm/pasyms.h:pa_sev_es_trampoline_start = sev_es_trampoline_start
# ./tools/testing/kunit/kunit.py run --arch x86_64
...
[00:15:36] Elapsed time: 58.840s total, 2.096s configuring, 53.170s building, 3.487s running
# cat arch/x86/realmode/rm/pasyms.h
cat: arch/x86/realmode/rm/pasyms.h: No such file or directory
Could explain why I don't see the issue...
I see arch/x86/realmode/rm/pasyms.h on my system. It is a generated
file from arch/x86/realmode/rm Makefile
Here is the target information.
REALMODE_OBJS = $(addprefix $(obj)/,$(realmode-y))
sed-pasyms := -n -r -e 's/^([0-9a-fA-F]+) [ABCDGRSTVW] (.+)$$/pa_\2 = \2;/p'
quiet_cmd_pasyms = PASYMS $@
cmd_pasyms = $(NM) $(real-prereqs) | sed $(sed-pasyms) | sort | uniq > $@
targets += pasyms.h
$(obj)/pasyms.h: $(REALMODE_OBJS) FORCE
$(call if_changed,pasyms)
The key is how and why this file gets generated and why the reference
pa_sev_es_trampoline_start = sev_es_trampoline_start
is added unconditionally even when CONFIG_AMD_MEM_ENCRYPT is not
enabled. I think the logic should be fixed to take AMD_MEM_ENCRYPT
enabled or disabled into account when this pasyms.h file is generated.