qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

trace: Eliminate use of TARGET_FMT_plx

hw/tpm/trace-events uses TARGET_FMT_plx formats with uint64_t
arguments. That's wrong, TARGET_FMT_plx takes hwaddr. Since hwaddr
happens to be uint64_t, it works anyway. Messed up in commit
ec427498da5, v2.12.0. Clean up by replacing TARGET_FMT_plx with its
macro expansion.

scripts/tracetool/format/log_stap.py (commit 62dd1048c0b, v4.0.0) has
a special case for TARGET_FMT_plx. Delete it.

Cc: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20190812052359.30071-7-armbru@redhat.com>

+2 -5
+2 -2
hw/tpm/trace-events
··· 1 1 # See docs/devel/tracing.txt for syntax documentation. 2 2 3 3 # tpm_crb.c 4 - tpm_crb_mmio_read(uint64_t addr, unsigned size, uint32_t val) "CRB read 0x" TARGET_FMT_plx " len:%u val: 0x%" PRIx32 5 - tpm_crb_mmio_write(uint64_t addr, unsigned size, uint32_t val) "CRB write 0x" TARGET_FMT_plx " len:%u val: 0x%" PRIx32 4 + tpm_crb_mmio_read(uint64_t addr, unsigned size, uint32_t val) "CRB read 0x%016" PRIx64 " len:%u val: 0x%" PRIx32 5 + tpm_crb_mmio_write(uint64_t addr, unsigned size, uint32_t val) "CRB write 0x%016" PRIx64 " len:%u val: 0x%" PRIx32 6 6 7 7 # tpm_passthrough.c 8 8 tpm_passthrough_handle_request(void *cmd) "processing command %p"
-3
scripts/tracetool/format/log_stap.py
··· 30 30 if macro.startswith("PRI"): 31 31 return macro[3] 32 32 33 - if macro == "TARGET_FMT_plx": 34 - return "%016x" 35 - 36 33 raise Exception("Unhandled macro '%s'" % macro) 37 34 38 35 def c_fmt_to_stap(fmt):