x86/sev: Ensure SVSM reserved fields in a page validation entry are initialized to zero

In order to support future versions of the SVSM_CORE_PVALIDATE call, all
reserved fields within a PVALIDATE entry must be set to zero as an SVSM should
be ensuring all reserved fields are zero in order to support future usage of
reserved areas based on the protocol version.

Fixes: fcd042e86422 ("x86/sev: Perform PVALIDATE using the SVSM when not at VMPL0")
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Joerg Roedel <joerg.roedel@amd.com>
Cc: <stable@kernel.org>
Link: https://lore.kernel.org/7cde412f8b057ea13a646fb166b1ca023f6a5031.1755098819.git.thomas.lendacky@amd.com

authored by Tom Lendacky and committed by Borislav Petkov (AMD) 3ee9cebd c08ba630

Changed files
+3
arch
x86
boot
startup
coco
sev
+1
arch/x86/boot/startup/sev-shared.c
··· 785 785 pc->entry[0].page_size = RMP_PG_SIZE_4K; 786 786 pc->entry[0].action = validate; 787 787 pc->entry[0].ignore_cf = 0; 788 + pc->entry[0].rsvd = 0; 788 789 pc->entry[0].pfn = paddr >> PAGE_SHIFT; 789 790 790 791 /* Protocol 0, Call ID 1 */
+2
arch/x86/coco/sev/core.c
··· 227 227 pe->page_size = RMP_PG_SIZE_4K; 228 228 pe->action = action; 229 229 pe->ignore_cf = 0; 230 + pe->rsvd = 0; 230 231 pe->pfn = pfn; 231 232 232 233 pe++; ··· 258 257 pe->page_size = e->pagesize ? RMP_PG_SIZE_2M : RMP_PG_SIZE_4K; 259 258 pe->action = e->operation == SNP_PAGE_STATE_PRIVATE; 260 259 pe->ignore_cf = 0; 260 + pe->rsvd = 0; 261 261 pe->pfn = e->gfn; 262 262 263 263 pe++;