On 10/26/21 3:22 AM, Alex Bennée wrote:
Currently we make the assumption that the guest frontend loads all
op code bytes sequentially. This mostly holds up for regular fixed
encodings but some architectures like s390x like to re-read the
instruction which causes weirdness to occur. Rather than changing the
frontends make the plugin API a little more ergonomic and able to
handle the re-read case.

Stuff will still get strange if we read ahead of the opcode but so far
no front ends have done that and this patch asserts the case so we can
catch it early if they do.

Signed-off-by: Alex Bennée<[email protected]>
Suggested-by: Richard Henderson<[email protected]>
---
  include/exec/plugin-gen.h | 12 ++++++++++--
  include/qemu/plugin.h     |  7 +++++--
  accel/tcg/plugin-gen.c    |  3 +--
  accel/tcg/translator.c    |  2 +-
  4 files changed, 17 insertions(+), 7 deletions(-)

Reviewed-by: Richard Henderson <[email protected]>

r~

Reply via email to