From: "Jarkko Sakkinen" <jarkko@kernel.org>
To: "Jarkko Sakkinen" <jarkko@kernel.org>,
"Stefano Garzarella" <sgarzare@redhat.com>,
"Jarkko Sakkinen" <jarkko.sakkinen@iki.fi>
Cc: "Jason Gunthorpe" <jgg@ziepe.ca>,
"James Bottomley" <james.bottomley@hansenpartnership.com>,
<linux-coco@lists.linux.dev>, "Borislav Petkov" <bp@alien8.de>,
"Dave Hansen" <dave.hansen@linux.intel.com>,
"Peter Huewe" <peterhuewe@gmx.de>,
"H. Peter Anvin" <hpa@zytor.com>,
<linux-integrity@vger.kernel.org>, <x86@kernel.org>,
"Joerg Roedel" <jroedel@suse.de>, <linux-kernel@vger.kernel.org>,
"Ingo Molnar" <mingo@redhat.com>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Claudio Carvalho" <cclaudio@linux.ibm.com>,
"Dov Murik" <dovmurik@linux.ibm.com>,
"Tom Lendacky" <thomas.lendacky@amd.com>
Subject: Re: [PATCH 3/3] x86/sev: add a SVSM vTPM platform device
Date: Wed, 15 Jan 2025 01:12:28 +0200 [thread overview]
Message-ID: <D726DAWHLOGW.3TR2LCJ936OG7@kernel.org> (raw)
In-Reply-To: <D725V628UV87.31SUEYVF9IUUC@kernel.org>
On Wed Jan 15, 2025 at 12:48 AM EET, Jarkko Sakkinen wrote:
> On Wed Jan 15, 2025 at 12:46 AM EET, Jarkko Sakkinen wrote:
> > On Tue Jan 14, 2025 at 12:42 PM EET, Stefano Garzarella wrote:
> > > Hi Jarkko,
> > >
> > > On Thu, 19 Dec 2024 at 17:07, Stefano Garzarella <sgarzare@redhat.com> wrote:
> > > >
> > > > On Thu, Dec 19, 2024 at 05:40:58PM +0200, Jarkko Sakkinen wrote:
> > > > >On Thu Dec 19, 2024 at 5:35 PM EET, Stefano Garzarella wrote:
> > > > >> So to use them directly in sev, we would have to move these definitions
> > > > >> into include/linux/tpm.h or some other file in inlcude/. Is this
> > > > >> acceptable for TPM maintainers?
> > > > >
> > > > >There's only me.
> > > > >
> > > > >I don't know.
> > > > >
> > > > >What you want to put to include/linux/tpm.h anyway?
> > > >
> > > > At least tpmm_chip_alloc(), tpm2_probe(), and tpm_chip_register()
> > > >
> > > > >I have not followed this discussion.
> > > >
> > > > Let me try to summarize what we are doing: We are writing a small TPM
> > > > driver to support AMD SEV-SNP SVSM. Basically SVSM defines some sort of
> > > > hypercalls, which the guest OS can call to talk to the emulated vTPM.
> > > >
> > > > In the current version of this series, based on James' RFC, we have an
> > > > intermediate module (tpm_platform) and then another small driver
> > > > (platform_device) in arch/x86/coco/sev/core.c that registers the
> > > > callback to use.
> > > >
> > > > To avoid the intermediate driver (Jason correct me if I misunderstood),
> > > > we want to register the `tpm_chip` with its `tpm_class_ops` directly in
> > > > arch/x86/coco/sev/core.c where it's easy to use "SVSM calls" (i.e.
> > > > svsm_perform_call_protocol()).
> > > >
> > > > And here I have this problem, so I was proposing to expose these APIs.
> > > > BTW, we do have an alternative though that I proposed in the previous
> > > > email that might avoid this.
> > >
> > > Any thought on this?
> >
> > A redundant super low-quality TPM stack driver implemtation to support
> > only single vendor's vTPM with speculative generalization.
> >
> > It's a formula for destruction really.
> >
> > I don't know if I event want to comment on this. Figure out a better
> > solution I guess that works together sound with existing stack.
> >
> > If that helps we could make the main TPM driver only Y/N (instead of
> > tristate).
>
> Also e.g. James' hmac encryption: not a single bug fixed by the author,
> which does further reduce my ability to have any possible trust on this.
>
> I do care quality over features, sorry.
One more rant.
It's engineering problem to find **a fit** for the existing art. For
You can set the constraint here as "no two TPM stacks".
I know also almost nothing about SVSM. E.g. I don't understand why a
vTPM cannot be seen as fTPM by the guest, and why this needs user
space exported device (please do not answer here, do a better job
instead).
Even if I wanted to say how this should be changed, I could not
because it too far away to make any possible sense to begin with.
And I don't want to take the risk of those words being used as an
argument later on, when I don't even know what I'm looking.
BR, Jarkko
next prev parent reply other threads:[~2025-01-14 23:12 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-10 14:34 [PATCH 0/3] Enlightened vTPM support for SVSM on SEV-SNP Stefano Garzarella
2024-12-10 14:34 ` [PATCH 1/3] tpm: add generic platform device Stefano Garzarella
2024-12-12 9:51 ` Stefano Garzarella
2024-12-12 14:35 ` James Bottomley
2024-12-12 15:30 ` Stefano Garzarella
2024-12-12 15:41 ` James Bottomley
2024-12-12 16:12 ` Stefano Garzarella
2024-12-10 14:34 ` [PATCH 2/3] x86/sev: add SVSM call macros for the vTPM protocol Stefano Garzarella
2024-12-10 14:34 ` [PATCH 3/3] x86/sev: add a SVSM vTPM platform device Stefano Garzarella
2024-12-10 14:40 ` Jason Gunthorpe
2024-12-10 14:55 ` James Bottomley
2024-12-10 15:04 ` Jason Gunthorpe
2024-12-11 8:19 ` Stefano Garzarella
2024-12-11 15:00 ` Jason Gunthorpe
2024-12-11 15:38 ` Stefano Garzarella
2024-12-11 15:53 ` Jason Gunthorpe
2024-12-11 16:42 ` Stefano Garzarella
2024-12-19 15:35 ` Stefano Garzarella
2024-12-19 15:40 ` Jarkko Sakkinen
2024-12-19 16:06 ` Stefano Garzarella
2025-01-14 10:42 ` Stefano Garzarella
2025-01-14 13:07 ` Jason Gunthorpe
2025-01-14 16:51 ` Stefano Garzarella
2025-01-14 17:33 ` Jason Gunthorpe
2025-01-14 22:46 ` Jarkko Sakkinen
2025-01-14 22:48 ` Jarkko Sakkinen
2025-01-14 23:12 ` Jarkko Sakkinen [this message]
2025-01-22 21:29 ` Dionna Amalie Glaze
2025-01-23 9:50 ` Jarkko Sakkinen
2025-01-23 10:09 ` Stefano Garzarella
2025-01-23 11:46 ` Jarkko Sakkinen
2025-01-23 11:49 ` Jarkko Sakkinen
2025-01-23 12:29 ` Stefano Garzarella
2024-12-11 16:30 ` Tom Lendacky
2024-12-11 16:55 ` Stefano Garzarella
2024-12-11 17:02 ` James Bottomley
2024-12-13 11:48 ` Stefano Garzarella
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D726DAWHLOGW.3TR2LCJ936OG7@kernel.org \
--to=jarkko@kernel.org \
--cc=bp@alien8.de \
--cc=cclaudio@linux.ibm.com \
--cc=dave.hansen@linux.intel.com \
--cc=dovmurik@linux.ibm.com \
--cc=hpa@zytor.com \
--cc=james.bottomley@hansenpartnership.com \
--cc=jarkko.sakkinen@iki.fi \
--cc=jgg@ziepe.ca \
--cc=jroedel@suse.de \
--cc=linux-coco@lists.linux.dev \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterhuewe@gmx.de \
--cc=sgarzare@redhat.com \
--cc=tglx@linutronix.de \
--cc=thomas.lendacky@amd.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).