Allow TCG plugins to read registers
Goal
Access particular register values from the TCG plugin
Technical details
Currently there is QEMU_PLUGIN_CB_R_REGS enum value but it's never used anywhere. Adding a hook that has the access to register values is valuable in many different scenarios.
Additional information
include/qemu/plugin.hinclude/qemu/qemu-plugin.h
PANDA implemented this already but it is not a very clean solution:
- https://github.com/panda-re/qemu/commit/b97c5a56edd0ba3b5f6ab16bf531ac1f7abaac04 (mentioned in QPP patch series: https://lore.kernel.org/qemu-devel/20221213213757.4123265-1-fasano@mit.edu/)
I personally think the flag for the TB translation and execution callbacks makes more sense
Edited by Anton Kochkov