cputlb: ensure we save the IOTLB data in case of reset
authorAlex Bennée <alex.bennee@linaro.org>
Mon, 13 Jul 2020 20:04:10 +0000 (21:04 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Wed, 15 Jul 2020 10:52:43 +0000 (11:52 +0100)
commit2f3a57ee47df970d19fa5b324d44aab857d43517
treeb39673bfb5f3c67c13a513e07ffe33e089724b73
parent777dddc501fa31bc9afff6de5e55dbf799e1703b
cputlb: ensure we save the IOTLB data in case of reset

Any write to a device might cause a re-arrangement of memory
triggering a TLB flush and potential re-size of the TLB invalidating
previous entries. This would cause users of qemu_plugin_get_hwaddr()
to see the warning:

  invalid use of qemu_plugin_get_hwaddr

because of the failed tlb_lookup which should always succeed. To
prevent this we save the IOTLB data in case it is later needed by a
plugin doing a lookup.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200713200415.26214-7-alex.bennee@linaro.org>
accel/tcg/cputlb.c
include/hw/core/cpu.h
include/qemu/typedefs.h