Message ID | 20250228170720.144739-2-sgarzare@redhat.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Enlightened vTPM support for SVSM on SEV-SNP | expand |
On Fri, Feb 28, 2025 at 06:07:15PM +0100, Stefano Garzarella wrote: > Add macros for SVSM_VTPM_QUERY and SVSM_VTPM_CMD calls as defined > in the "Secure VM Service Module for SEV-SNP Guests" > Publication # 58019 Revision: 1.00 > > Link: https://www.amd.com/content/dam/amd/en/documents/epyc-technical-docs/specifications/58019.pdf Those URLs are unstable - simply naming the document properly in the commit message so that a search engine can find it is enough. > Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> > --- > arch/x86/include/asm/sev.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/arch/x86/include/asm/sev.h b/arch/x86/include/asm/sev.h > index 1581246491b5..f6ebf4492606 100644 > --- a/arch/x86/include/asm/sev.h > +++ b/arch/x86/include/asm/sev.h > @@ -384,6 +384,10 @@ struct svsm_call { > #define SVSM_ATTEST_SERVICES 0 > #define SVSM_ATTEST_SINGLE_SERVICE 1 > > +#define SVSM_VTPM_CALL(x) ((2ULL << 32) | (x)) > +#define SVSM_VTPM_QUERY 0 > +#define SVSM_VTPM_CMD 1 > + > #ifdef CONFIG_AMD_MEM_ENCRYPT > > extern u8 snp_vmpl; > -- Merge this patch with the patch where those are used - no need for a separate patch. Thx.
On Mon, Mar 10, 2025 at 12:08:34PM +0100, Borislav Petkov wrote: >On Fri, Feb 28, 2025 at 06:07:15PM +0100, Stefano Garzarella wrote: >> Add macros for SVSM_VTPM_QUERY and SVSM_VTPM_CMD calls as defined >> in the "Secure VM Service Module for SEV-SNP Guests" >> Publication # 58019 Revision: 1.00 >> >> Link: https://www.amd.com/content/dam/amd/en/documents/epyc-technical-docs/specifications/58019.pdf > >Those URLs are unstable - simply naming the document properly in the commit >message so that a search engine can find it is enough. Ack, I'll do it all over the place in this series (commit descriptions, code comment blocks, etc.). > >> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> >> --- >> arch/x86/include/asm/sev.h | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/arch/x86/include/asm/sev.h b/arch/x86/include/asm/sev.h >> index 1581246491b5..f6ebf4492606 100644 >> --- a/arch/x86/include/asm/sev.h >> +++ b/arch/x86/include/asm/sev.h >> @@ -384,6 +384,10 @@ struct svsm_call { >> #define SVSM_ATTEST_SERVICES 0 >> #define SVSM_ATTEST_SINGLE_SERVICE 1 >> >> +#define SVSM_VTPM_CALL(x) ((2ULL << 32) | (x)) >> +#define SVSM_VTPM_QUERY 0 >> +#define SVSM_VTPM_CMD 1 >> + >> #ifdef CONFIG_AMD_MEM_ENCRYPT >> >> extern u8 snp_vmpl; >> -- > >Merge this patch with the patch where those are used - no need for a separate >patch. Yeah, it is left over from v1 when I had added this patch over James' patches, but now I agree that it no longer makes sense since I have reworked almost every patch in this series. I'm going to incorporate them! Thanks, Stefano
diff --git a/arch/x86/include/asm/sev.h b/arch/x86/include/asm/sev.h index 1581246491b5..f6ebf4492606 100644 --- a/arch/x86/include/asm/sev.h +++ b/arch/x86/include/asm/sev.h @@ -384,6 +384,10 @@ struct svsm_call { #define SVSM_ATTEST_SERVICES 0 #define SVSM_ATTEST_SINGLE_SERVICE 1 +#define SVSM_VTPM_CALL(x) ((2ULL << 32) | (x)) +#define SVSM_VTPM_QUERY 0 +#define SVSM_VTPM_CMD 1 + #ifdef CONFIG_AMD_MEM_ENCRYPT extern u8 snp_vmpl;
Add macros for SVSM_VTPM_QUERY and SVSM_VTPM_CMD calls as defined in the "Secure VM Service Module for SEV-SNP Guests" Publication # 58019 Revision: 1.00 Link: https://www.amd.com/content/dam/amd/en/documents/epyc-technical-docs/specifications/58019.pdf Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> --- arch/x86/include/asm/sev.h | 4 ++++ 1 file changed, 4 insertions(+)