aboutsummaryrefslogtreecommitdiff
path: root/hw/tpm/tpm_passthrough.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-03-08 12:56:39 +0000
committerPeter Maydell <peter.maydell@linaro.org>2018-03-08 12:56:39 +0000
commit0ab4537f08e09b13788db67efd760592fb7db769 (patch)
tree0fd47e86cb4ef9c9147f6beaf731bb3764985f18 /hw/tpm/tpm_passthrough.c
parent3ef91576b96de7051dacc2132cddfb486b46e863 (diff)
parentfcbed221ff7230c6a5ebfb2ed27dc114ff5a30b0 (diff)
Merge remote-tracking branch 'remotes/stefanberger/tags/pull-tpm-2018-03-07-1' into staging
Merge tpm 2018/03/07 # gpg: Signature made Wed 07 Mar 2018 12:42:13 GMT # gpg: using RSA key 75AD65802A0B4211 # 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-2018-03-07-1: tpm: convert tpm_tis.c to use trace-events tpm: convert tpm_emulator.c to use trace-events tpm: convert tpm_util.c to use trace-events tpm: convert tpm_passthrough.c to use trace-events tpm: convert tpm_crb.c to use trace-events Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/tpm/tpm_passthrough.c')
-rw-r--r--hw/tpm/tpm_passthrough.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/hw/tpm/tpm_passthrough.c b/hw/tpm/tpm_passthrough.c
index 211df3191c..479317ee50 100644
--- a/hw/tpm/tpm_passthrough.c
+++ b/hw/tpm/tpm_passthrough.c
@@ -32,14 +32,7 @@
#include "qapi/clone-visitor.h"
#include "qapi/qapi-visit-tpm.h"
#include "tpm_util.h"
-
-#define DEBUG_TPM 0
-
-#define DPRINTF(fmt, ...) do { \
- if (DEBUG_TPM) { \
- fprintf(stderr, fmt, ## __VA_ARGS__); \
- } \
-} while (0)
+#include "trace.h"
#define TYPE_TPM_PASSTHROUGH "tpm-passthrough"
#define TPM_PASSTHROUGH(obj) \
@@ -138,7 +131,7 @@ static void tpm_passthrough_handle_request(TPMBackend *tb, TPMBackendCmd *cmd,
{
TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb);
- DPRINTF("tpm_passthrough: processing command %p\n", cmd);
+ trace_tpm_passthrough_handle_request(cmd);
tpm_passthrough_unix_tx_bufs(tpm_pt, cmd->in, cmd->in_len,
cmd->out, cmd->out_len, &cmd->selftest_done,
@@ -147,7 +140,7 @@ static void tpm_passthrough_handle_request(TPMBackend *tb, TPMBackendCmd *cmd,
static void tpm_passthrough_reset(TPMBackend *tb)
{
- DPRINTF("tpm_passthrough: CALL TO TPM_RESET!\n");
+ trace_tpm_passthrough_reset();
tpm_passthrough_cancel_cmd(tb);
}