Merge remote-tracking branch 'remotes/stefanberger/tags/pull-tpm-2017-10-24-1' into staging

Merge tpm 2017/10/24 v1

# gpg: Signature made Wed 25 Oct 2017 06:06:55 BST
# gpg:                using RSA key 0x75AD65802A0B4211
# gpg: Good signature from "Stefan Berger <stefanb@linux.vnet.ibm.com>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: B818 B9CA DF90 89C2 D5CE  C66B 75AD 6580 2A0B 4211

* remotes/stefanberger/tags/pull-tpm-2017-10-24-1:
  tpm: print buffers received from TPM when debugging
  vl: remove unnecessary #ifdef CONFIG_TPM
  tpm: remove unnecessary #ifdef CONFIG_TPM
  tpm: add stubs
  tpm: add missing include

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell
2017-10-26 09:20:11 +01:00
8 changed files with 39 additions and 7 deletions
+1
View File
@@ -1544,6 +1544,7 @@ TPM
M: Stefan Berger <stefanb@linux.vnet.ibm.com>
S: Maintained
F: tpm.c
F: stubs/tpm.c
F: hw/tpm/*
F: include/hw/acpi/tpm.h
F: include/sysemu/tpm*
+1 -1
View File
@@ -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/
+2
View File
@@ -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);
}
+1
View File
@@ -13,6 +13,7 @@
#define QEMU_TPM_H
#include "qemu/option.h"
#include "qom/object.h"
typedef struct TPMState TPMState;
+1
View File
@@ -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
+33
View File
@@ -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;
}
-4
View File
@@ -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.
-2
View File
@@ -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))