qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Berger <stefanb@linux.vnet.ibm.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>, qemu-devel@nongnu.org
Cc: Eduardo Habkost <ehabkost@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Igor Mammedov <imammedo@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH v4 1/5] tpm: add a "ppi" boolean property
Date: Thu, 21 Jun 2018 08:11:04 -0400	[thread overview]
Message-ID: <f500f7df-3eff-c9d6-2630-0c00f2360d6e@linux.vnet.ibm.com> (raw)
In-Reply-To: <20180621115530.11069-2-marcandre.lureau@redhat.com>

On 06/21/2018 07:55 AM, Marc-André Lureau wrote:
> The following patches implement the TPM Physical Presence Interface,
> and makes use of new memory region and fw_cfg entries. Enable it by
> default on >2.12 machine type.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>   include/hw/compat.h | 10 ++++++++++
>   hw/tpm/tpm_crb.c    |  3 +++
>   hw/tpm/tpm_tis.c    |  3 +++
>   3 files changed, 16 insertions(+)
>
> diff --git a/include/hw/compat.h b/include/hw/compat.h
> index 563908b874..dac847548b 100644
> --- a/include/hw/compat.h
> +++ b/include/hw/compat.h
> @@ -2,6 +2,16 @@
>   #define HW_COMPAT_H
>   
>   #define HW_COMPAT_2_12 \
> +    {\
> +        .driver   = "tpm-crb",\
> +        .property = "ppi",\
> +        .value    = "false",\
> +    },\
> +    {\
> +        .driver   = "tpm-tis",\
> +        .property = "ppi",\
> +        .value    = "false",\
> +    },\
>       {\
>           .driver   = "migration",\
>           .property = "decompress-error-check",\
> 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(),
>   };

Wouldn't we have to bump up the version of teh VMStateDescription?

    Stefan
>   
> diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
> index 12f5c9a759..d9ddf9b723 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(),
>   };
>   

  reply	other threads:[~2018-06-21 12:11 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-21 11:55 [Qemu-devel] [PATCH v4 0/5] Add support for TPM Physical Presence interface Marc-André Lureau
2018-06-21 11:55 ` [Qemu-devel] [PATCH v4 1/5] tpm: add a "ppi" boolean property Marc-André Lureau
2018-06-21 12:11   ` Stefan Berger [this message]
2018-06-21 12:19     ` Stefan Berger
2018-06-28 11:21     ` Marc-André Lureau
2018-06-21 11:55 ` [Qemu-devel] [PATCH v4 2/5] tpm: implement virtual memory device for TPM PPI Marc-André Lureau
2018-06-21 12:10   ` Stefan Berger
2018-06-21 12:24     ` Marc-André Lureau
2018-06-21 11:55 ` [Qemu-devel] [PATCH v4 3/5] acpi: add fw_cfg file for TPM and PPI virtual memory device Marc-André Lureau
2018-06-21 11:55 ` [Qemu-devel] [PATCH v4 4/5] acpi: build TPM Physical Presence interface Marc-André Lureau
2018-06-21 20:11   ` Stefan Berger
2018-06-22  9:03     ` Igor Mammedov
2018-06-22 13:26       ` Stefan Berger
2018-06-22 13:56         ` Igor Mammedov
2018-06-22 14:23           ` Stefan Berger
2018-06-25  9:31             ` Igor Mammedov
2018-06-25 13:57               ` Stefan Berger
2018-06-25 14:23               ` Stefan Berger
2018-06-21 11:55 ` [Qemu-devel] [PATCH v4 5/5] tpm: add a fake ACPI memory clear interface Marc-André Lureau

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=f500f7df-3eff-c9d6-2630-0c00f2360d6e@linux.vnet.ibm.com \
    --to=stefanb@linux.vnet.ibm.com \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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).