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: amarnath.valluri@intel.com
Subject: Re: [Qemu-devel] [PATCH v2 02/28] tpm: move TpmIf in include/sysemu/tpm.h
Date: Mon, 6 Nov 2017 13:58:12 -0500	[thread overview]
Message-ID: <fe8b09e1-eb10-c151-f951-4e030998d5cc@linux.vnet.ibm.com> (raw)
In-Reply-To: <20171106183925.16747-3-marcandre.lureau@redhat.com>

On 11/06/2017 01:38 PM, Marc-André Lureau wrote:
> This is a better location than hw/tpm, since we are going to use the
> interface from outside hw/tpm.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>

Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com>

> ---
>   hw/tpm/tpm_int.h     | 22 +---------------------
>   include/sysemu/tpm.h | 19 +++++++++++++++++++
>   backends/tpm.c       |  1 -
>   3 files changed, 20 insertions(+), 22 deletions(-)
>
> diff --git a/hw/tpm/tpm_int.h b/hw/tpm/tpm_int.h
> index 9c045b6691..1df5883f3c 100644
> --- a/hw/tpm/tpm_int.h
> +++ b/hw/tpm/tpm_int.h
> @@ -13,28 +13,8 @@
>   #define TPM_TPM_INT_H
>
>   #include "qemu/osdep.h"
> -#include "qom/object.h"
>
> -#define TYPE_TPM_IF "tpm-if"
> -#define TPM_IF_CLASS(klass) \
> -    OBJECT_CLASS_CHECK(TPMIfClass, (klass), TYPE_TPM_IF)
> -#define TPM_IF_GET_CLASS(obj) \
> -    OBJECT_GET_CLASS(TPMIfClass, (obj), TYPE_TPM_IF)
> -#define TPM_IF(obj) \
> -    INTERFACE_CHECK(TPMIf, (obj), TYPE_TPM_IF)
> -
> -typedef struct TPMIf {
> -    Object parent_obj;
> -} TPMIf;
> -
> -typedef struct TPMIfClass {
> -    InterfaceClass parent_class;
> -
> -    /* run in thread pool by backend */
> -    void (*request_completed)(TPMIf *obj);
> -} TPMIfClass;
> -
> -#define TPM_STANDARD_CMDLINE_OPTS               \
> +#define TPM_STANDARD_CMDLINE_OPTS \
>       { \
>           .name = "type", \
>           .type = QEMU_OPT_STRING, \
> diff --git a/include/sysemu/tpm.h b/include/sysemu/tpm.h
> index d7a2bd8556..452cdb9cb7 100644
> --- a/include/sysemu/tpm.h
> +++ b/include/sysemu/tpm.h
> @@ -27,6 +27,25 @@ typedef enum  TPMVersion {
>       TPM_VERSION_2_0 = 2,
>   } TPMVersion;
>
> +#define TYPE_TPM_IF "tpm-if"
> +#define TPM_IF_CLASS(klass)                                 \
> +    OBJECT_CLASS_CHECK(TPMIfClass, (klass), TYPE_TPM_IF)
> +#define TPM_IF_GET_CLASS(obj)                           \
> +    OBJECT_GET_CLASS(TPMIfClass, (obj), TYPE_TPM_IF)
> +#define TPM_IF(obj)                             \
> +    INTERFACE_CHECK(TPMIf, (obj), TYPE_TPM_IF)
> +
> +typedef struct TPMIf {
> +    Object parent_obj;
> +} TPMIf;
> +
> +typedef struct TPMIfClass {
> +    InterfaceClass parent_class;
> +
> +    /* run in thread pool by backend */
> +    void (*request_completed)(TPMIf *obj);
> +} TPMIfClass;
> +
>   TPMVersion tpm_tis_get_tpm_version(Object *obj);
>
>   #define TYPE_TPM_TIS                "tpm-tis"
> diff --git a/backends/tpm.c b/backends/tpm.c
> index 5763f6f369..1e416d7f90 100644
> --- a/backends/tpm.c
> +++ b/backends/tpm.c
> @@ -17,7 +17,6 @@
>   #include "qapi/error.h"
>   #include "qapi/qmp/qerror.h"
>   #include "sysemu/tpm.h"
> -#include "hw/tpm/tpm_int.h"
>   #include "qemu/thread.h"
>
>   static void tpm_backend_worker_thread(gpointer data, gpointer user_data)

  reply	other threads:[~2017-11-06 18:58 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-06 18:38 [Qemu-devel] [PATCH v2 00/28] TPM: code cleanup (not 2.11) Marc-André Lureau
2017-11-06 18:38 ` [Qemu-devel] [PATCH v2 01/28] tpm-tis: remove unused locty_number Marc-André Lureau
2017-11-06 18:57   ` Stefan Berger
2017-11-06 18:38 ` [Qemu-devel] [PATCH v2 02/28] tpm: move TpmIf in include/sysemu/tpm.h Marc-André Lureau
2017-11-06 18:58   ` Stefan Berger [this message]
2017-11-06 18:39 ` [Qemu-devel] [PATCH v2 03/28] tpm-backend: store TPMIf interface, improve backend_init() Marc-André Lureau
2017-11-06 19:02   ` Stefan Berger
2017-11-06 18:39 ` [Qemu-devel] [PATCH v2 04/28] tpm-tis: no longer expose TPMState Marc-André Lureau
2017-11-06 18:39 ` [Qemu-devel] [PATCH v2 05/28] tpm-be: call request_completed() out of thread Marc-André Lureau
2017-11-06 19:22   ` Stefan Berger
2017-11-06 18:39 ` [Qemu-devel] [PATCH v2 06/28] tpm-be: report error instead of front-end Marc-André Lureau
2017-11-06 18:39 ` [Qemu-devel] [PATCH v2 07/28] tpm-be: ask model to the TPM interface Marc-André Lureau
2017-11-06 18:39 ` [Qemu-devel] [PATCH v2 08/28] tpm: remove unused opened code Marc-André Lureau
2017-11-06 18:39 ` [Qemu-devel] [PATCH v2 09/28] tpm-passthrough: don't save guessed cancel_path in options Marc-André Lureau
2017-11-06 18:39 ` [Qemu-devel] [PATCH v2 10/28] tpm-be: update optional function pointers Marc-André Lureau
2017-11-06 18:39 ` [Qemu-devel] [PATCH v2 11/28] tpm-passthrough: pass TPMPassthruState to handle_device_opts Marc-André Lureau
2017-11-06 18:39 ` [Qemu-devel] [PATCH v2 12/28] tpm-backend: move set 'id' to common code Marc-André Lureau
2017-11-06 18:39 ` [Qemu-devel] [PATCH v2 13/28] tpm-passthrough: make it safer to destroy after creation Marc-André Lureau
2017-11-06 18:39 ` [Qemu-devel] [PATCH v2 14/28] tpm-passthrough: simplify create() Marc-André Lureau
2017-11-06 18:39 ` [Qemu-devel] [PATCH v2 15/28] tpm-passthrough: workaround a possible race Marc-André Lureau
2017-11-06 18:39 ` [Qemu-devel] [PATCH v2 16/28] tpm-tis: simplify header inclusion Marc-André Lureau
2017-11-06 18:39 ` [Qemu-devel] [PATCH v2 17/28] tpm: rename qemu_find_tpm() -> qemu_find_tpm_be() Marc-André Lureau
2017-11-06 18:39 ` [Qemu-devel] [PATCH v2 18/28] tpm: lookup the the TPM interface instead of TIS device Marc-André Lureau
2017-11-06 18:39 ` [Qemu-devel] [PATCH v2 19/28] tpm: add TPM interface to lookup TPM version Marc-André Lureau
2017-11-06 18:39 ` [Qemu-devel] [PATCH v2 20/28] tpm: add tpm_cmd_get_size() to tpm_util Marc-André Lureau
2017-11-06 18:39 ` [Qemu-devel] [PATCH v2 21/28] acpi: change TPM TIS data conditions Marc-André Lureau
2017-11-06 18:39 ` [Qemu-devel] [PATCH v2 22/28] tpm-emulator: add a FIXME comment about blocking cancel Marc-André Lureau
2017-11-06 18:39 ` [Qemu-devel] [PATCH v2 23/28] tpm-tis: remove redundant 'tpm_tis:' in error messages Marc-André Lureau
2017-11-06 19:24   ` Stefan Berger
2017-11-06 18:39 ` [Qemu-devel] [PATCH v2 24/28] tpm-tis: check that at most one TPM device exists Marc-André Lureau
2017-11-06 19:25   ` Stefan Berger
2017-11-06 18:39 ` [Qemu-devel] [PATCH v2 25/28] tpm-emulator: protect concurrent ctrl_chr access Marc-André Lureau
2017-11-06 19:32   ` Stefan Berger
2017-11-06 22:11     ` Marc-André Lureau
2017-11-07  1:11       ` Stefan Berger
2017-11-07 11:08         ` Marc-André Lureau
2017-11-06 18:39 ` [Qemu-devel] [PATCH v2 26/28] qdev: add DEFINE_PROP_TPMBE Marc-André Lureau
2017-11-06 20:31   ` Stefan Berger
2017-11-07 10:58     ` Marc-André Lureau
2017-11-06 18:39 ` [Qemu-devel] [PATCH v2 27/28] tpm-tis: use DEFINE_PROP_TPMBE Marc-André Lureau
2017-11-06 20:31   ` Stefan Berger
2017-11-06 18:39 ` [Qemu-devel] [PATCH v2 28/28] tpm: remove tpm_register_model() Marc-André Lureau
2017-11-06 20:33   ` Stefan Berger
2017-11-07  1:05 ` [Qemu-devel] [PATCH v2 00/28] TPM: code cleanup (not 2.11) 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=fe8b09e1-eb10-c151-f951-4e030998d5cc@linux.vnet.ibm.com \
    --to=stefanb@linux.vnet.ibm.com \
    --cc=amarnath.valluri@intel.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).