[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241211150048.GJ1888283@ziepe.ca>
Date: Wed, 11 Dec 2024 11:00:48 -0400
From: Jason Gunthorpe <jgg@...pe.ca>
To: Stefano Garzarella <sgarzare@...hat.com>
Cc: James Bottomley <James.Bottomley@...senpartnership.com>,
linux-coco@...ts.linux.dev, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Peter Huewe <peterhuewe@....de>, "H. Peter Anvin" <hpa@...or.com>,
linux-integrity@...r.kernel.org, x86@...nel.org,
Joerg Roedel <jroedel@...e.de>, Jarkko Sakkinen <jarkko@...nel.org>,
linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Claudio Carvalho <cclaudio@...ux.ibm.com>,
Dov Murik <dovmurik@...ux.ibm.com>,
Tom Lendacky <thomas.lendacky@....com>
Subject: Re: [PATCH 3/3] x86/sev: add a SVSM vTPM platform device
On Wed, Dec 11, 2024 at 09:19:04AM +0100, Stefano Garzarella wrote:
> > After that, there is no meaningful shared code here, and maybe the
> > TPM_CHIP_FLAG_IRQ hack can be avoided too.
>
> IIUC you are proposing the following steps:
> - extend tpm_class_ops to add a new send_recv() op and use it in
> tpm_try_transmit()
Yes, that seems to be the majority of your shared code.
> - call the code in tpm_platform_probe() directly in sev
Yes
> This would remove the intermediate driver, but at this point is it
> worth keeping tpm_platform_send() and tpm_platform_recv() in a header
> or module, since these are not related to sev, but to MSSIM?
Reuse *what* exactly? These are 10 both line funtions that just call
another function pointer. Where exactly is this common MSSIM stuff?
Stated another way, by adding send_Recv() op to tpm_class_ops you have
already allowed reuse of all the code in tpm_platform_send/recv().
Jason
Powered by blists - more mailing lists