qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Stefan Berger <stefanb@linux.ibm.com>
Cc: philmd@redhat.com, qemu-devel@nongnu.org
Subject: Re: [RFC PATCH V1 0/3] tpm: Eliminate TPM related code if CONFIG_TPM is not set
Date: Mon, 14 Jun 2021 10:34:13 +0200	[thread overview]
Message-ID: <87y2bc4zga.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <20210612012102.1820063-1-stefanb@linux.ibm.com> (Stefan Berger's message of "Fri, 11 Jun 2021 21:20:59 -0400")

Stefan Berger <stefanb@linux.ibm.com> writes:

> The following patches entirely elimiante TPM related code if CONFIG_TPM
> is not set.
>
>   Stefan

I believe this is on top of Philippe's "[PATCH v2 2/2] tpm: Return QMP
error when TPM is disabled in build"

Based-on: <20210609184955.1193081-3-philmd@redhat.com>

However, it should probably go *first*, so the additional 'if' to
suppress warnings about unused qmp_marshal_output_TpmFOO() can be
squashed into Philippe's patch.

Apart from that, this looks good to me!

Additional 'if':

diff --git a/qapi/tpm.json b/qapi/tpm.json
index 09332e6f99..e74c881ea6 100644
--- a/qapi/tpm.json
+++ b/qapi/tpm.json
@@ -17,7 +17,9 @@
 #
 # Since: 1.5
 ##
-{ 'enum': 'TpmModel', 'data': [ 'tpm-tis', 'tpm-crb', 'tpm-spapr' ] }
+{ 'enum': 'TpmModel', 'data': [ 'tpm-tis', 'tpm-crb', 'tpm-spapr' ],
+  'if': 'defined(CONFIG_TPM)' }
+
 ##
 # @query-tpm-models:
 #
@@ -47,7 +49,8 @@
 #
 # Since: 1.5
 ##
-{ 'enum': 'TpmType', 'data': [ 'passthrough', 'emulator' ] }
+{ 'enum': 'TpmType', 'data': [ 'passthrough', 'emulator' ],
+  'if': 'defined(CONFIG_TPM)' }
 
 ##
 # @query-tpm-types:
@@ -124,7 +127,8 @@
 { 'struct': 'TPMInfo',
   'data': {'id': 'str',
            'model': 'TpmModel',
-           'options': 'TpmTypeOptions' } }
+           'options': 'TpmTypeOptions' },
+  'if': 'defined(CONFIG_TPM)' }
 
 ##
 # @query-tpm:



  parent reply	other threads:[~2021-06-14  8:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-12  1:20 [RFC PATCH V1 0/3] tpm: Eliminate TPM related code if CONFIG_TPM is not set Stefan Berger
2021-06-12  1:21 ` [RFC PATCH V1 1/3] acpi: Eliminate all " Stefan Berger
2021-06-14  8:09   ` Markus Armbruster
2021-06-14  9:53   ` Philippe Mathieu-Daudé
2021-06-14 18:12     ` Stefan Berger
2021-06-12  1:21 ` [RFC PATCH V1 2/3] arm: " Stefan Berger
2021-06-12  1:21 ` [RFC PATCH V1 3/3] sysemu: Make TPM structures inaccessible if CONFIG_TPM is not defined Stefan Berger
2021-06-14  9:46   ` Philippe Mathieu-Daudé
2021-06-14  8:34 ` Markus Armbruster [this message]
2021-06-14 19:12   ` [RFC PATCH V1 0/3] tpm: Eliminate TPM related code if CONFIG_TPM is not set 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=87y2bc4zga.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanb@linux.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).