]> git.ipfire.org Git - thirdparty/linux.git/commit
tpm/tpm_svsm: support TPM_CHIP_FLAG_SYNC
authorStefano Garzarella <sgarzare@redhat.com>
Fri, 20 Jun 2025 13:08:10 +0000 (15:08 +0200)
committerJarkko Sakkinen <jarkko@kernel.org>
Tue, 22 Jul 2025 23:23:18 +0000 (02:23 +0300)
commitfaddec84aa8a600f5f6857cdd9b9ea29f7cf60fb
tree60adabc5f7d0be868af29de0c2318aab5bf71716
parent0637c10e72ef4b0645cb45873d21fd5f711ba041
tpm/tpm_svsm: support TPM_CHIP_FLAG_SYNC

This driver does not support interrupts, and receiving the response is
synchronous with sending the command.

Enable synchronous send() with TPM_CHIP_FLAG_SYNC, which implies that
->send() already fills the provided buffer with a response, and ->recv()
is not implemented.

Keep using the same pre-allocated buffer to avoid having to allocate
it for each command. We need the buffer to have the header required by
the SVSM protocol and the command contiguous in memory.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
drivers/char/tpm/tpm_svsm.c