diff options
author | Stefan Berger <stefanb@linux.vnet.ibm.com> | 2018-03-02 20:28:30 -0500 |
---|---|---|
committer | Stefan Berger <stefanb@linux.vnet.ibm.com> | 2018-03-06 13:00:41 -0500 |
commit | 49d302fe3d4de2b02f77b41f4f7de6d15e392f36 (patch) | |
tree | 032e97f7cbfdaa8655c491e4ffc37c2ad68bb806 /hw/tpm/tpm_passthrough.c | |
parent | ec427498da5a1a0d2d2e807a2681a3d1c5a93b02 (diff) |
tpm: convert tpm_passthrough.c to use trace-events
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw/tpm/tpm_passthrough.c')
-rw-r--r-- | hw/tpm/tpm_passthrough.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/hw/tpm/tpm_passthrough.c b/hw/tpm/tpm_passthrough.c index a495fe07f4..2589c4de76 100644 --- a/hw/tpm/tpm_passthrough.c +++ b/hw/tpm/tpm_passthrough.c @@ -31,14 +31,7 @@ #include "hw/hw.h" #include "qapi/clone-visitor.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) \ @@ -137,7 +130,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, @@ -146,7 +139,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); } |