Re: [PATCH v3 4/4] x86/sev: register tpm-svsm platform device

2025-03-15 Thread Tom Lendacky
On 3/11/25 04:42, Stefano Garzarella wrote: > SNP platform can provide a vTPM device emulated by SVSM. > > The "tpm-svsm" device can be handled by the platform driver added > by the previous commit in drivers/char/tpm/tpm_svsm.c > > The driver will call snp_svsm_vtpm_probe() to check if SVSM is >

Re: [RFC PATCH v2 2/6] x86/sev: add SVSM vTPM probe/send_command functions

2025-03-15 Thread Borislav Petkov
On Fri, Feb 28, 2025 at 06:07:16PM +0100, Stefano Garzarella wrote: > +bool snp_svsm_vtpm_probe(void) > +{ > + struct svsm_call call = {}; > + u64 send_cmd_mask = 0; > + u64 platform_cmds; > + u64 features; > + int ret; > + > + /* The vTPM device is available only if we have

Re: [PATCH v3 3/4] tpm: add SNP SVSM vTPM driver

2025-03-15 Thread Tom Lendacky
On 3/11/25 04:42, Stefano Garzarella wrote: > Add driver for the vTPM defined by the AMD SVSM spec [1]. > > The specification defines a protocol that a SEV-SNP guest OS can use to > discover and talk to a vTPM emulated by the Secure VM Service Module (SVSM) > in the guest context, but at a more pr

Re: [RFC PATCH v2 2/6] x86/sev: add SVSM vTPM probe/send_command functions

2025-03-15 Thread Stefano Garzarella
On Mon, Mar 10, 2025 at 12:30:06PM +0100, Borislav Petkov wrote: On Fri, Feb 28, 2025 at 06:07:16PM +0100, Stefano Garzarella wrote: +bool snp_svsm_vtpm_probe(void) +{ + struct svsm_call call = {}; + u64 send_cmd_mask = 0; + u64 platform_cmds; + u64 features; + int