trace: Avoid abuse of amdvi_mmio_read
commit0d3ef78829332f2fdc323d1b625b60fe9c89119c
authorEric Blake <eblake@redhat.com>
Mon, 13 Mar 2017 19:55:20 +0000 (13 14:55 -0500)
committerStefan Hajnoczi <stefanha@redhat.com>
Fri, 24 Mar 2017 09:21:42 +0000 (24 09:21 +0000)
treece750e37dc1615a77a3010bc3d5316b6f29c285d
parentd17e744848cac9a96c827be1f244ef9266710d8f
trace: Avoid abuse of amdvi_mmio_read

hw/i386/trace-events has an amdvi_mmio_read trace that is used for
both normal reads (listing the register name, address, size, and
offset) and for an error case (abusing the register name to show
an error message, the address to show the maximum value supported,
then shoehorning address and size into the size and offset
parameters).  The change from a wide address to a narrower size
parameter could truncate a (rather-large) bogus read attempt, so
it's better to create a separate dedicated trace with correct types,
rather than abusing the trace mechanism.  Broken since its
introduction in commit d29a09c.

[Change trace event argument type from hwaddr to uint64_t since
user-defined types should not be used for trace events.  This fixes a
build failure with LTTng UST.
--Stefan]

Signed-off-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
hw/i386/amd_iommu.c
hw/i386/trace-events