All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	"Stefan Berger" <stefanb@linux.vnet.ibm.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	qemu-arm@nongnu.org,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Igor Mammedov" <imammedo@redhat.com>,
	"Eric Blake" <eblake@redhat.com>
Subject: Re: [PATCH v3 5/5] tpm: Return QMP error when TPM is disabled in build
Date: Mon, 14 Jun 2021 22:12:08 +0200	[thread overview]
Message-ID: <270e0d89-f074-0713-6871-6e4a21791494@redhat.com> (raw)
In-Reply-To: <20210614200940.2056770-6-philmd@redhat.com>

On 6/14/21 10:09 PM, Philippe Mathieu-Daudé wrote:
> When the management layer queries a binary built using --disable-tpm
> for TPM devices, it gets confused by getting empty responses:
> 
>   { "execute": "query-tpm" }
>   {
>       "return": [
>       ]
>   }
>   { "execute": "query-tpm-types" }
>   {
>       "return": [
>       ]
>   }
>   { "execute": "query-tpm-models" }
>   {
>       "return": [
>       ]
>   }
> 
> To make it clearer by returning an error:
> - Make the TPM QAPI schema conditional
> - Adapt the HMP command
> - Remove stubs which became unnecessary
> 
> The management layer now gets a 'CommandNotFound' error:
> 
>   { "execute": "query-tpm" }
>   {
>       "error": {
>           "class": "CommandNotFound",
>           "desc": "The command query-tpm has not been found"
>       }
>   }
> 
> Suggested-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  qapi/tpm.json      | 28 +++++++++++++++++++---------
>  monitor/hmp-cmds.c |  4 ++++
>  stubs/tpm.c        | 25 -------------------------
>  stubs/meson.build  |  1 -
>  4 files changed, 23 insertions(+), 35 deletions(-)
>  delete mode 100644 stubs/tpm.c

Grrrr I forgot to commit:

-- >8 --
diff --git a/MAINTAINERS b/MAINTAINERS
index 7d9cd290426..636bf2f5365 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2707,7 +2707,6 @@ TPM
 M: Stefan Berger <stefanb@linux.ibm.com>
 S: Maintained
 F: tpm.c
-F: stubs/tpm.c
 F: hw/tpm/*
 F: include/hw/acpi/tpm.h
 F: include/sysemu/tpm*
---



  reply	other threads:[~2021-06-14 20:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-14 20:09 [PATCH v3 0/5] tpm: Eliminate TPM related code if CONFIG_TPM is not set Philippe Mathieu-Daudé
2021-06-14 20:09 ` [PATCH v3 1/5] i386: Eliminate all " Philippe Mathieu-Daudé
2021-06-14 20:09 ` [PATCH v3 2/5] arm: " Philippe Mathieu-Daudé
2021-06-14 20:09 ` [PATCH v3 3/5] acpi: " Philippe Mathieu-Daudé
2021-06-14 20:09 ` [PATCH v3 4/5] sysemu: Make TPM structures inaccessible if CONFIG_TPM is not defined Philippe Mathieu-Daudé
2021-06-14 20:09 ` [PATCH v3 5/5] tpm: Return QMP error when TPM is disabled in build Philippe Mathieu-Daudé
2021-06-14 20:12   ` Philippe Mathieu-Daudé [this message]
2021-06-14 21:57     ` Stefan Berger
2021-06-15  8:52       ` Markus Armbruster
2021-06-15  8:51   ` Markus Armbruster

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=270e0d89-f074-0713-6871-6e4a21791494@redhat.com \
    --to=philmd@redhat.com \
    --cc=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@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.