Skip to content

Commit

Permalink
Restore pc before calling into tlb fill hook
Browse files Browse the repository at this point in the history
In my application it is important to have correct pc values available
from this hook.
  • Loading branch information
tbodt committed Nov 2, 2024
1 parent d6b2f43 commit dd62e60
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions qemu/softmmu/unicorn_vtlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ bool unicorn_fill_tlb(CPUState *cs, vaddr address, int size,
struct hook *hook;
HOOK_FOREACH_VAR_DECLARE;

cpu_restore_state(cs, retaddr, false);

HOOK_FOREACH(uc, hook, UC_HOOK_TLB_FILL) {
if (hook->to_delete) {
continue;
Expand Down

0 comments on commit dd62e60

Please sign in to comment.