This series is a follow-up to the discussion we had about whether or not to add send_recv() op in tpm_class_ops[1]. Some devices do not support interrupts and provide a single operation to send the command and receive the response on the same buffer. In order to simplify these drivers and avoid temporary buffers to be used between the .send() and .recv() callbacks, introduce a new callback send_recv(). This was suggested by Jason Gunthorpe while reviewing the new SVSM vTPM driver, but the same callback can be used also for the fTPM driver to simplify it a bit (second patch of this series). I only successfully compiled fTPM, but I don't know how to test, if anyone can test or suggest how to do it, I would be grateful. This series is based on "[PATCH v3 0/4] Enlightened vTPM support for SVSM on SEV-SNP" [2] (actually only the last patch in this series). [1] https://lore.kernel.org/linux-integrity/Z8sfiDEhsG6RATiQ@xxxxxxxxxx/ [2] https://lore.kernel.org/linux-integrity/20250311094225.35129-1-sgarzare@xxxxxxxxxx/ Stefano Garzarella (3): tpm: add send_recv() op in tpm_class_ops tpm/tpm_ftpm_tee: use send_recv() op tpm/tpm_svsm: use send_recv() op drivers/char/tpm/tpm_ftpm_tee.h | 4 -- include/linux/tpm.h | 2 + drivers/char/tpm/tpm-interface.c | 7 +++ drivers/char/tpm/tpm_ftpm_tee.c | 86 ++++++++------------------------ drivers/char/tpm/tpm_svsm.c | 46 ++++------------- 5 files changed, 39 insertions(+), 106 deletions(-) base-commit: f2cb83b7f8c58952b424a83bf86680f1263ad417 -- 2.48.1