-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
qemu/tcg: fix UC_HOOK_MEM_READ on aarch64. #2028
qemu/tcg: fix UC_HOOK_MEM_READ on aarch64. #2028
Conversation
646985e
to
5b5a461
Compare
Directly jump into the slow path when there is any hookmem enabled. This fixes unicorn-engine#1908. Signed-off-by: Glenn Baker <[email protected]>
Directly jump into the slow path when there is any hookmem enabled. Signed-off-by: Glenn Baker <[email protected]>
5b5a461
to
bfe3acb
Compare
Hi, code updated to cover ppc64 as well. |
I think you missed at least Also it would be nice to use HOOK_EXISTS_BOUNDED. This way the fast way is taken when no hook exists at the used address. But I don't know if this is possible at this place (you need the emulated physical address). |
Use has_hookmem() helper to determine wether "slow-path" TLB read is needed. Add this helper to x86 architecture as well so that to check for all hookmem. Signed-off-by: Glenn Baker <[email protected]>
It's the same implementation for all architectures, so factor out has_hookmem() into tcg_uc_has_hookmem(). Signed-off-by: Glenn Baker <[email protected]>
Added check for |
fwiw, I'm using this fix as part of a bug fix stable branch on top of the What is needed to get this merged? |
Sorry for the delay. Thanks for the contributions! |
* qemu/tcg: fix UC_HOOK_MEM_READ on aarch64. Directly jump into the slow path when there is any hookmem enabled. This fixes unicorn-engine#1908. Signed-off-by: Glenn Baker <[email protected]> * qemu/tcg: fix UC_HOOK_MEM_READ on ppc64. Directly jump into the slow path when there is any hookmem enabled. Signed-off-by: Glenn Baker <[email protected]> * qemu/tcg: check for UC_HOOK_MEM_READ_AFTER. Use has_hookmem() helper to determine wether "slow-path" TLB read is needed. Add this helper to x86 architecture as well so that to check for all hookmem. Signed-off-by: Glenn Baker <[email protected]> * qemu/tcg: factor out has_hookmem(). It's the same implementation for all architectures, so factor out has_hookmem() into tcg_uc_has_hookmem(). Signed-off-by: Glenn Baker <[email protected]> --------- Signed-off-by: Glenn Baker <[email protected]>
* qemu/tcg: fix UC_HOOK_MEM_READ on aarch64. Directly jump into the slow path when there is any hookmem enabled. This fixes unicorn-engine#1908. Signed-off-by: Glenn Baker <[email protected]> * qemu/tcg: fix UC_HOOK_MEM_READ on ppc64. Directly jump into the slow path when there is any hookmem enabled. Signed-off-by: Glenn Baker <[email protected]> * qemu/tcg: check for UC_HOOK_MEM_READ_AFTER. Use has_hookmem() helper to determine wether "slow-path" TLB read is needed. Add this helper to x86 architecture as well so that to check for all hookmem. Signed-off-by: Glenn Baker <[email protected]> * qemu/tcg: factor out has_hookmem(). It's the same implementation for all architectures, so factor out has_hookmem() into tcg_uc_has_hookmem(). Signed-off-by: Glenn Baker <[email protected]> --------- Signed-off-by: Glenn Baker <[email protected]>
Directly jump into the slow path when there is any hookmem enabled. This fixes #1908.