[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v13 1/6] tpm: add a "ppi" boolean property
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [Qemu-devel] [PATCH v13 1/6] tpm: add a "ppi" boolean property |
Date: |
Thu, 13 Dec 2018 12:07:32 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 |
On 12/12/18 11:26 PM, Marc-André Lureau wrote:
> The following patches implement the TPM Physical Presence Interface,
> make use of a new memory region and a fw_cfg entry. Enable PPI by
> default with >=4.0 machine type, to avoid migration issues.
>
> Signed-off-by: Marc-André Lureau <address@hidden>
> Reviewed-by: Igor Mammedov <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> include/hw/compat.h | 11 ++++++++++-
> hw/tpm/tpm_crb.c | 3 +++
> hw/tpm/tpm_tis.c | 3 +++
> 3 files changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/include/hw/compat.h b/include/hw/compat.h
> index 70958328fe..db368c5c74 100644
> --- a/include/hw/compat.h
> +++ b/include/hw/compat.h
> @@ -2,7 +2,16 @@
> #define HW_COMPAT_H
>
> #define HW_COMPAT_3_1 \
> - /* empty */
> + { \
> + .driver = "tpm-crb", \
> + .property = "ppi", \
> + .value = "false", \
> + }, \
> + { \
> + .driver = "tpm-tis", \
> + .property = "ppi", \
> + .value = "false", \
> + },
>
> #define HW_COMPAT_3_0 \
> /* empty */
> diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c
> index a92dd50437..d5b0ac5920 100644
> --- a/hw/tpm/tpm_crb.c
> +++ b/hw/tpm/tpm_crb.c
> @@ -41,6 +41,8 @@ typedef struct CRBState {
> MemoryRegion cmdmem;
>
> size_t be_buffer_size;
> +
> + bool ppi_enabled;
> } CRBState;
>
> #define CRB(obj) OBJECT_CHECK(CRBState, (obj), TYPE_TPM_CRB)
> @@ -221,6 +223,7 @@ static const VMStateDescription vmstate_tpm_crb = {
>
> static Property tpm_crb_properties[] = {
> DEFINE_PROP_TPMBE("tpmdev", CRBState, tpmbe),
> + DEFINE_PROP_BOOL("ppi", CRBState, ppi_enabled, true),
> DEFINE_PROP_END_OF_LIST(),
> };
>
> diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
> index d9322692ee..cbb9a84a5b 100644
> --- a/hw/tpm/tpm_tis.c
> +++ b/hw/tpm/tpm_tis.c
> @@ -81,6 +81,8 @@ typedef struct TPMState {
> TPMVersion be_tpm_version;
>
> size_t be_buffer_size;
> +
> + bool ppi_enabled;
> } TPMState;
>
> #define TPM(obj) OBJECT_CHECK(TPMState, (obj), TYPE_TPM_TIS)
> @@ -950,6 +952,7 @@ static const VMStateDescription vmstate_tpm_tis = {
> static Property tpm_tis_properties[] = {
> DEFINE_PROP_UINT32("irq", TPMState, irq_num, TPM_TIS_IRQ),
> DEFINE_PROP_TPMBE("tpmdev", TPMState, be_driver),
> + DEFINE_PROP_BOOL("ppi", TPMState, ppi_enabled, true),
> DEFINE_PROP_END_OF_LIST(),
> };
>
>
- [Qemu-devel] [PATCH v13 0/6] Add support for TPM Physical Presence interface, Marc-André Lureau, 2018/12/12
- [Qemu-devel] [PATCH v13 1/6] tpm: add a "ppi" boolean property, Marc-André Lureau, 2018/12/12
- Re: [Qemu-devel] [PATCH v13 1/6] tpm: add a "ppi" boolean property,
Philippe Mathieu-Daudé <=
- [Qemu-devel] [PATCH v13 2/6] tpm: allocate/map buffer for TPM Physical Presence interface, Marc-André Lureau, 2018/12/12
- [Qemu-devel] [PATCH v13 3/6] acpi: expose TPM/PPI configuration parameters to firmware via fw_cfg, Marc-André Lureau, 2018/12/12
- [Qemu-devel] [PATCH v13 4/6] acpi: build TPM Physical Presence interface, Marc-André Lureau, 2018/12/12
- [Qemu-devel] [PATCH v13 5/6] acpi: add ACPI memory clear interface, Marc-André Lureau, 2018/12/12
- [Qemu-devel] [PATCH v13 6/6] tpm: clear RAM when "memory overwrite" requested, Marc-André Lureau, 2018/12/12
- Re: [Qemu-devel] [PATCH v13 0/6] Add support for TPM Physical Presence interface, Michael S. Tsirkin, 2018/12/17