qemu/accel
Alex Bennée 453d50ce75 accel/tcg: re-factor plugin_inject_cb so we can assert insn_idx is valid
Coverity doesn't know enough about how we have arranged our plugin TCG
ops to know we will always have incremented insn_idx before injecting
the callback. Let us assert it for the benefit of Coverity and protect
ourselves from accidentally breaking the assumption and triggering
harder to grok errors deeper in the code if we attempt a negative
indexed array lookup.

However to get to this point we re-factor the code and remove the
second hand instruction boundary detection in favour of scanning the
full set of ops and using the existing INDEX_op_insn_start to cleanly
detect when the instruction has started. As we no longer need the
plugin specific list of ops we delete that.

My initial benchmarks shows no discernible impact of dropping the
plugin specific ops list.

Fixes: Coverity 1459509
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Cc: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20210917162332.3511179-12-alex.bennee@linaro.org>
2021-10-12 08:38:10 +01:00
..
hvf memory: Name all the memory listeners 2021-09-30 15:30:24 +02:00
kvm memory: Name all the memory listeners 2021-09-30 15:30:24 +02:00
qtest
stubs
tcg accel/tcg: re-factor plugin_inject_cb so we can assert insn_idx is valid 2021-10-12 08:38:10 +01:00
xen
accel-common.c
accel-softmmu.c
accel-softmmu.h
accel-user.c
dummy-cpus.c
Kconfig
meson.build