Merge tpm 2017/10/24
cover Merge tpm 2017/10/24
*The following changes since commit 3d7196d43bfe12efe98568cb60057e273652b99b:
Merge remote-tracking branch 'remotes/kraxel/tags/usb-20171023-pull-request' into staging (2017-10-24 16:05:57 +0100)
are available in the git repository at:
git://github.com/stefanberger/qemu-tpm.git tags/pull-tpm-2017-10-24-1
for you to fetch changes up to 298d8b81d45d2297f88d93604bd5eebfd653d6cf:
tpm: print buffers received from TPM when debugging (2017-10-25 01:05:53 -0400)
----------------------------------------------------------------
Merge tpm 2017/10/24 v1
----------------------------------------------------------------
Philippe Mathieu-Daudé (4):
tpm: add missing include
tpm: add stubs
tpm: remove unnecessary #ifdef CONFIG_TPM
vl: remove unnecessary #ifdef CONFIG_TPM
Stefan Berger (1):
tpm: print buffers received from TPM when debugging
MAINTAINERS | 1 + Makefile.objs | 2 +- hw/tpm/tpm_tis.c | 2 ++ include/sysemu/tpm.h | 1 + stubs/Makefile.objs | 1 + stubs/tpm.c | 33 +++++++++++++++++++++++++++++++++ tpm.c | 4 ---- vl.c | 2 -- 8 files changed, 39 insertions(+), 7 deletions(-) create mode 100644 stubs/tpm.c
Signature · 1 line
2.5.5
PATCH 1/5 tpm: add missing include
From: Philippe Mathieu-Daudé <[email protected]>
else file including "sysemu/tpm.h" fails to compile:
In file included from qemu/stubs/tpm.c:2:0:
qemu/include/sysemu/tpm.h:36:19: error: implicit declaration of function ‘object_resolve_path_type’ [-Werror=implicit-function-declaration]
Object *obj = object_resolve_path_type("", TYPE_TPM_TIS, NULL);
^~~~~~~~~~~~~~~~~~~~~~~~--- include/sysemu/tpm.h | 1 + 1 file changed, 1 insertion(+)
include/sysemu/tpm.h +1 -0
@@ -13,6 +13,7 @@#define QEMU_TPM_H #include "qemu/option.h" +#include "qom/object.h" typedef struct TPMState TPMState ;
Signature · 1 line
2.5.5
PATCH 2/5 tpm: add stubs
In reply to Stefan BergerFrom: Philippe Mathieu-Daudé <[email protected]>
Commit c37cacabf22 moved tpm_cleanup() in the main loop exit, however this function is not available when compiling with --disable-tpm.
Provides necessary stubs to keep code clean of #ifdef'fery.
Message-Id: <[email protected]>
--- MAINTAINERS | 1 + Makefile.objs | 2 +- stubs/Makefile.objs | 1 + stubs/tpm.c | 33 +++++++++++++++++++++++++++++++++ 4 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 stubs/tpm.c
MAINTAINERS +1 -0
@@ -1544,6 +1544,7 @@ TPM M: Stefan Berger <[email protected]> S: Maintained F: tpm.c +F: stubs/tpm.c F: hw/tpm/* F: include/hw/acpi/tpm.h F: include/sysemu/tpm*
Makefile.objs +1 -1
@@ -62,7 +62,7 @@ bt-host.o-cflags := $(BLUEZ_CFLAGS) common-obj-y += dma-helpers.o common-obj-y += vl.o vl.o-cflags := $(GPROF_CFLAGS) $(SDL_CFLAGS) -common-obj-y += tpm.o +common-obj-$(CONFIG_TPM) += tpm.o common-obj-$(CONFIG_SLIRP) += slirp/
stubs/Makefile.objs +1 -0
@@ -28,6 +28,7 @@ stub-obj-y += runstate-check.o stub-obj-y += set-fd-handler.o stub-obj-y += slirp.o stub-obj-y += sysbus.o +stub-obj-y += tpm.o stub-obj-y += trace-control.o stub-obj-y += uuid.o stub-obj-y += vm-stop.o
stubs/tpm.c new file +33 -0
@@ -0,0 +1,33 @@ +/* +* TPM stubs +* +* This work is licensed under the terms of the GNU GPL, version 2 or later. +* See the COPYING file in the top-level directory. +*/ +#include "qemu/osdep.h" +#include "sysemu/tpm.h" +#include "qmp-commands.h" + +int tpm_init (void ) +{ +return 0 ; +} + +void tpm_cleanup (void ) +{ +} + +TPMInfoList *qmp_query_tpm (Error **errp) +{ +return NULL ; +} + +TpmTypeList *qmp_query_tpm_types (Error **errp) +{ +return NULL ; +} + +TpmModelList *qmp_query_tpm_models (Error **errp) +{ +return NULL ; +}
Signature · 1 line
2.5.5
PATCH 3/5 tpm: remove unnecessary #ifdef CONFIG_TPM
In reply to Stefan BergerFrom: Philippe Mathieu-Daudé <[email protected]>
Makefile.objs now checks for $(CONFIG_TPM).
--- tpm.c | 4 ---- 1 file changed, 4 deletions(-)
tpm.c +0 -4
@@ -30,8 +30,6 @@ void tpm_register_model(enum TpmModel model) tpm_models[model] = true; } -#ifdef CONFIG_TPM -static const TPMBackendClass *tpm_be_find_by_type (enum TpmType type) {
@@ -192,8 +190,6 @@ int tpm_config_parse(QemuOptsList *opts_list, const char *optarg)return 0 ; } -#endif /* CONFIG_TPM */ -/* * Walk the list of active TPM backends and collect information about them * following the schema description in qapi-schema.json.
Signature · 1 line
2.5.5
PATCH 4/5 vl: remove unnecessary #ifdef CONFIG_TPM
In reply to Stefan BergerFrom: Philippe Mathieu-Daudé <[email protected]>
a stub is now provided.
--- vl.c | 2 -- 1 file changed, 2 deletions(-)
vl.c +0 -2
@@ -4624,11 +4624,9 @@ int main(int argc, char **argv, char **envp)exit (1 ); } -#ifdef CONFIG_TPM if (tpm_init () <0 ) {exit (1 ); } -#endif /* init the bluetooth world */ if (foreach_device_config (DEV_BT , bt_parse))
Signature · 1 line
2.5.5
PATCH 5/5 tpm: print buffers received from TPM when debugging
In reply to Stefan Berger--- hw/tpm/tpm_tis.c | 2 ++ 1 file changed, 2 insertions(+)
hw/tpm/tpm_tis.c +2 -0
@@ -422,6 +422,8 @@ static void tpm_tis_receive_bh(void *opaque) s->loc[locty].r_offset =0 ; s->loc[locty].w_offset =0 ; +tpm_tis_show_buffer (&s->loc[locty].r_buffer,"tpm_tis: From TPM" ); +if (TPM_TIS_IS_VALID_LOCTY (s->next_locty)) {tpm_tis_abort (s, locty); }
Signature · 1 line
2.5.5
Hi Stefan,
Quoted 9 lines · Stefan Berger
*The following changes since commit
3d7196d43bfe12efe98568cb60057e273652b99b:Merge remote-tracking branch 'remotes/kraxel/tags/usb-20171023-pull-request' into staging (2017-10-24 16:05:57 +0100)
are available in the git repository at:
git://github.com/stefanberger/qemu-tpm.gittags/pull-tpm-2017-10-24-1for you to fetch changes up to
298d8b81d45d2297f88d93604bd5eebfd653d6cf:
The tag is correct,
$ git tag -v pull-tpm-2017-10-24-1 tag pull-tpm-2017-10-24-1 tagger Stefan Berger <[email protected]> 1508908015 -0400 gpg: Good signature from "Stefan Berger <[email protected]>" Merge tpm 2017/10/24 v1
However you sent it as a PATCH series, I'm not sure this will correctly trigger Peter's farm-building scripts.
Also I suggest you to add some description such "This fixes a build issue using --disable-tpm" in the cover letter.
Regards,
Phil.
Quoted 14 lines · Philippe Mathieu-Daudé
Hi Stefan,
Quoted 9 lines · Stefan Berger
*The following changes since commit
3d7196d43bfe12efe98568cb60057e273652b99b:Merge remote-tracking branch 'remotes/kraxel/tags/usb-20171023-pull-request' into staging (2017-10-24 16:05:57 +0100)are available in the git repository at:
git://github.com/stefanberger/qemu-tpm.git tags/pull-tpm-2017-10-24-1for you to fetch changes up to
298d8b81d45d2297f88d93604bd5eebfd653d6cf:The tag is correct,
Quoted 8 lines
$ git tag -v pull-tpm-2017-10-24-1 tag pull-tpm-2017-10-24-1 tagger Stefan Berger <[email protected]> 1508908015 -0400 gpg: Good signature from "Stefan Berger <[email protected]>" Merge tpm 2017/10/24 v1However you sent it as a PATCH series, I'm not sure this will correctly trigger Peter's farm-building scripts.
Will resend. Was late last night...
Quoted 3 lines
Also I suggest you to add some description such "This fixes a build issue using --disable-tpm" in the cover letter.
Good idea.
Cheers,
Stefan
Quoted 6 lines
Regards,
Phil.