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>
This commit is contained in:
parent
ec427498da
commit
49d302fe3d
|
@ -31,14 +31,7 @@
|
||||||
#include "hw/hw.h"
|
#include "hw/hw.h"
|
||||||
#include "qapi/clone-visitor.h"
|
#include "qapi/clone-visitor.h"
|
||||||
#include "tpm_util.h"
|
#include "tpm_util.h"
|
||||||
|
#include "trace.h"
|
||||||
#define DEBUG_TPM 0
|
|
||||||
|
|
||||||
#define DPRINTF(fmt, ...) do { \
|
|
||||||
if (DEBUG_TPM) { \
|
|
||||||
fprintf(stderr, fmt, ## __VA_ARGS__); \
|
|
||||||
} \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define TYPE_TPM_PASSTHROUGH "tpm-passthrough"
|
#define TYPE_TPM_PASSTHROUGH "tpm-passthrough"
|
||||||
#define TPM_PASSTHROUGH(obj) \
|
#define TPM_PASSTHROUGH(obj) \
|
||||||
|
@ -137,7 +130,7 @@ static void tpm_passthrough_handle_request(TPMBackend *tb, TPMBackendCmd *cmd,
|
||||||
{
|
{
|
||||||
TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb);
|
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,
|
tpm_passthrough_unix_tx_bufs(tpm_pt, cmd->in, cmd->in_len,
|
||||||
cmd->out, cmd->out_len, &cmd->selftest_done,
|
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)
|
static void tpm_passthrough_reset(TPMBackend *tb)
|
||||||
{
|
{
|
||||||
DPRINTF("tpm_passthrough: CALL TO TPM_RESET!\n");
|
trace_tpm_passthrough_reset();
|
||||||
|
|
||||||
tpm_passthrough_cancel_cmd(tb);
|
tpm_passthrough_cancel_cmd(tb);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,3 +3,7 @@
|
||||||
# hw/tpm/tpm_crb.c
|
# hw/tpm/tpm_crb.c
|
||||||
tpm_crb_mmio_read(uint64_t addr, unsigned size, uint32_t val) "CRB read 0x" TARGET_FMT_plx " len:%u val: 0x%" PRIx32
|
tpm_crb_mmio_read(uint64_t addr, unsigned size, uint32_t val) "CRB read 0x" TARGET_FMT_plx " len:%u val: 0x%" PRIx32
|
||||||
tpm_crb_mmio_write(uint64_t addr, unsigned size, uint32_t val) "CRB write 0x" TARGET_FMT_plx " len:%u val: 0x%" PRIx32
|
tpm_crb_mmio_write(uint64_t addr, unsigned size, uint32_t val) "CRB write 0x" TARGET_FMT_plx " len:%u val: 0x%" PRIx32
|
||||||
|
|
||||||
|
# hw/tpm/tpm_passthrough.c
|
||||||
|
tpm_passthrough_handle_request(void *cmd) "processing command %p"
|
||||||
|
tpm_passthrough_reset(void) "reset"
|
||||||
|
|
Loading…
Reference in a new issue