x86/sev: Share the sev_secrets_pa value again
authorTom Lendacky <thomas.lendacky@amd.com>
Wed, 23 Apr 2025 15:22:31 +0000 (10:22 -0500)
committerIngo Molnar <mingo@kernel.org>
Thu, 24 Apr 2025 15:20:52 +0000 (17:20 +0200)
commit18ea89eae404d119ced26d80ac3e62255ce15409
treec0493c50189970dfaa6f9773116737eee0255426
parent121c335b36e02d6aefb72501186e060474fdf33c
x86/sev: Share the sev_secrets_pa value again

This commits breaks SNP guests:

  234cf67fc3bd ("x86/sev: Split off startup code from core code")

The SNP guest boots, but no longer has access to the VMPCK keys needed
to communicate with the ASP, which is used, for example, to obtain an
attestation report.

The secrets_pa value is defined as static in both startup.c and
core.c. It is set by a function in startup.c and so when used in
core.c its value will be 0.

Share it again and add the sev_ prefix to put it into the global
SEV symbols namespace.

[ mingo: Renamed to sev_secrets_pa ]

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Cc: Dionna Amalie Glaze <dionnaglaze@google.com>
Cc: Kevin Loughlin <kevinloughlin@google.com>
Link: https://lore.kernel.org/r/cf878810-81ed-3017-52c6-ce6aa41b5f01@amd.com
arch/x86/boot/startup/sev-startup.c
arch/x86/coco/sev/core.c
arch/x86/include/asm/sev-internal.h