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.lur...@redhat.com> > Signed-off-by: Philippe Mathieu-Daudé <phi...@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 <stef...@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* ---