qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: dan tan <dantan@linux.vnet.ibm.com>, qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org, stefanb@linux.vnet.ibm.com,
	pbonzini@redhat.com, farosas@suse.de, lvivier@redhat.com,
	dantan@linux.ibm.com
Subject: Re: [PATCH v9 1/3] tpm/tpm_tis_spi: Support TPM for SPI (Serial Peripheral Interface)
Date: Mon, 17 Feb 2025 08:31:50 +0100	[thread overview]
Message-ID: <b13a02f2-c41f-4d51-8f60-5c97cd96c488@linaro.org> (raw)
In-Reply-To: <20250216221155.30013-2-dantan@linux.vnet.ibm.com>

Hi,

On 16/2/25 23:11, dan tan wrote:
> Implement support for TPM via SPI interface. The SPI bus master
> is provided by PowerNV SPI device which is an SSI peripheral.
> It can uses the tpm_emulator driver backend with the external
> swtpm.
> 
> Signed-off-by: dan tan <dantan@linux.ibm.com>
> ---
> 
> v3:
> - moved variable tis_addr from TPMStateSPI struct to local
> - added the VM suspend/resume support:
>    - added vmstate_tpm_tis_spi declaration
>    - added tpm_tis_spi_pre_save() function
> - fixed trace formatting string
> 
> v4:
> - git commit amend only
> 
> v5:
> - removed DEFINE_PROP_UINT32("irq", TPMStateSPI, tpm_state.irq_num, 0)
>    from tpm_tis_spi_properties
> - In tpm.rst document, under section 'The QEMU TPM emulator device',
>    moved the 'PowerNV machine' section to immeidately below 'pSeriese
>    machine'.
> 
> v6:
> - amend commit description
> - amend hw/tpm/tpm_tis_spi.c prolog to reflect the generic nature
>    of the implementation
> - remove irrelevant define of IBM_PONQ
> - correct the function names to comply with the convention of
>    beginning with tpm_tis_spi_xxxx()
> 
> v7:
> - Reduce SPI wait states to improve performace.
>    Although the real SPI buses have four wait states to accomodate
>    the timing of various slave devices, there is no need to emulate
>    that for this behavior model.
> 
> v8:
> - re-package the email to comply with the convention.
> 
> v9:
> - conform with the latest device property definition after rebase
> 
> ---
>   docs/specs/tpm.rst   |  15 ++
>   include/system/tpm.h |   3 +
>   hw/tpm/tpm_tis_spi.c | 358 +++++++++++++++++++++++++++++++++++++++++++
>   hw/tpm/Kconfig       |   6 +
>   hw/tpm/meson.build   |   1 +
>   hw/tpm/trace-events  |   7 +
>   6 files changed, 390 insertions(+)
>   create mode 100644 hw/tpm/tpm_tis_spi.c


> diff --git a/hw/tpm/Kconfig b/hw/tpm/Kconfig
> index a46663288c..5951c225cc 100644
> --- a/hw/tpm/Kconfig
> +++ b/hw/tpm/Kconfig
> @@ -5,6 +5,12 @@ config TPM_TIS_I2C
>       select I2C
>       select TPM_TIS
>   
> +config TPM_TIS_SPI
> +    bool
> +    depends on TPM
> +    select TPM_BACKEND
> +    select TPM_TIS

        depends on SSI?

>   config TPM_TIS_ISA
>       bool
>       depends on TPM && ISA_BUS



  reply	other threads:[~2025-02-17  7:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-16 22:11 [PATCH v9 0/3] TPM TIS SPI Support dan tan
2025-02-16 22:11 ` [PATCH v9 1/3] tpm/tpm_tis_spi: Support TPM for SPI (Serial Peripheral Interface) dan tan
2025-02-17  7:31   ` Philippe Mathieu-Daudé [this message]
2025-02-17 15:45     ` dan tan
2025-02-16 22:11 ` [PATCH v9 2/3] tpm/tpm_tis_spi: activation for the PowerNV machines dan tan
2025-02-16 22:11 ` [PATCH v9 3/3] tests/qtest/tpm: add unit test to tis-spi dan tan
2025-02-17 20:12 ` [PATCH v9 0/3] TPM TIS SPI Support Stefan Berger
2025-02-17 20:24   ` dan tan
2025-02-18 18:55     ` Stefan Berger

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=b13a02f2-c41f-4d51-8f60-5c97cd96c488@linaro.org \
    --to=philmd@linaro.org \
    --cc=dantan@linux.ibm.com \
    --cc=dantan@linux.vnet.ibm.com \
    --cc=farosas@suse.de \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=stefanb@linux.vnet.ibm.com \
    /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).