x86/sev: Cache the secrets page address
authorNikunj A Dadhania <nikunj@amd.com>
Wed, 9 Oct 2024 09:28:34 +0000 (14:58 +0530)
committerBorislav Petkov (AMD) <bp@alien8.de>
Wed, 16 Oct 2024 16:24:51 +0000 (18:24 +0200)
commit6068754a4fff67654e87b37cdecd5275a372110f
tree78532df57b56c2b25fda9b277f0ffa44125c02f6
parentf75ff17fb48b1991d7a2822de5acc12bba240dc1
x86/sev: Cache the secrets page address

Instead of calling get_secrets_page(), which parses the CC blob every time
to get the secrets page physical address (secrets_pa), save the secrets
page physical address during snp_init() from the CC blob. Since
get_secrets_page() is no longer used, remove the function.

Signed-off-by: Nikunj A Dadhania <nikunj@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Link: https://lore.kernel.org/r/20241009092850.197575-4-nikunj@amd.com
arch/x86/coco/sev/core.c