FAILED: patch "[PATCH] x86/sev: Ensure SVSM reserved fields in a page validation" failed to apply to 6.12-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 6.12-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y
git checkout FETCH_HEAD
git cherry-pick -x 3ee9cebd0a5e7ea47eb35cec95eaa1a866af982d
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2025081852-debtless-penniless-395d@gregkh' --subject-prefix 'PATCH 6.12.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 3ee9cebd0a5e7ea47eb35cec95eaa1a866af982d Mon Sep 17 00:00:00 2001
From: Tom Lendacky <[email protected]>
Date: Wed, 13 Aug 2025 10:26:59 -0500
Subject: [PATCH] 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.
arch/x86/boot/startup/sev-shared.c +1 -0
@@ -785,6 +785,7 @@ static void __head svsm_pval_4k_page(unsigned long paddr, bool validate) pc->entry[0 ].page_size =RMP_PG_SIZE_4K ; pc->entry[0 ].action = validate; pc->entry[0 ].ignore_cf =0 ; + pc->entry[0 ].rsvd =0 ; pc->entry[0 ].pfn = paddr >>PAGE_SHIFT ;/* Protocol 0, Call ID 1 */
arch/x86/coco/sev/core.c +2 -0
@@ -227,6 +227,7 @@ static u64 svsm_build_ca_from_pfn_range(u64 pfn, u64 pfn_end, bool action, pe->page_size =RMP_PG_SIZE_4K ; pe->action = action; pe->ignore_cf =0 ; + pe->rsvd =0 ; pe->pfn = pfn; pe++;
@@ -257,6 +258,7 @@ static int svsm_build_ca_from_psc_desc(struct snp_psc_desc *desc, unsigned int d pe->page_size = e->pagesize ?RMP_PG_SIZE_2M :RMP_PG_SIZE_4K ; pe->action = e->operation ==SNP_PAGE_STATE_PRIVATE ; pe->ignore_cf =0 ; + pe->rsvd =0 ; pe->pfn = e->gfn; pe++;
PATCH 1/1 x86/sev: Ensure SVSM reserved fields in a page validation entry are initialized to zero
commit 3ee9cebd0a5e7ea47eb35cec95eaa1a866af982d upstream.
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.
--- arch/x86/coco/sev/shared.c | 3 +++ 1 file changed, 3 insertions(+)
arch/x86/coco/sev/shared.c +3 -0
@@ -1285,6 +1285,7 @@ static void svsm_pval_4k_page(unsigned long paddr, bool validate) pc->entry[0 ].page_size =RMP_PG_SIZE_4K ; pc->entry[0 ].action = validate; pc->entry[0 ].ignore_cf =0 ; + pc->entry[0 ].rsvd =0 ; pc->entry[0 ].pfn = paddr >>PAGE_SHIFT ;/* Protocol 0, Call ID 1 */
@@ -1373,6 +1374,7 @@ static u64 svsm_build_ca_from_pfn_range(u64 pfn, u64 pfn_end, bool action, pe->page_size =RMP_PG_SIZE_4K ; pe->action = action; pe->ignore_cf =0 ; + pe->rsvd =0 ; pe->pfn = pfn; pe++;
@@ -1403,6 +1405,7 @@ static int svsm_build_ca_from_psc_desc(struct snp_psc_desc *desc, unsigned int d pe->page_size = e->pagesize ?RMP_PG_SIZE_2M :RMP_PG_SIZE_4K ; pe->action = e->operation ==SNP_PAGE_STATE_PRIVATE ; pe->ignore_cf =0 ; + pe->rsvd =0 ; pe->pfn = e->gfn; pe++;
Signature · 1 line
2.46.2