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

Yes, good point, Philippe!

I will send an update in a few days in case there are additional
changes to be made.

thank you,
---
dan tan
power simulation
phone:+1.7373.099.138
email:dantan@linux.ibm.com


On 2025-02-17 01:31, Philippe Mathieu-Daudé wrote:
> 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 15:46 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é
2025-02-17 15:45     ` dan tan [this message]
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=7a2d40456f37459e00e7d69bea27b342@linux.ibm.com \
    --to=dantan@linux.ibm.com \
    --cc=dantan@linux.vnet.ibm.com \
    --cc=farosas@suse.de \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.