qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Detecting Faulting Instructions From Plugins


From: Aaron Lindsay
Subject: Detecting Faulting Instructions From Plugins
Date: Fri, 29 Jan 2021 22:23:52 -0500

Hello,

I appear to be seeing that if I register a callback for an instruction
via `qemu_plugin_register_vcpu_insn_exec_cb` I receive a callback even
if the instruction faults. For example, if an instruction attempts to
load memory from a page which isn't currently mapped by the OS, I
receive two calls for that instruction - one before the page fault, and
one afterwards when the load succeeds.

Two questions:
1. Is this considered a bug or a "feature"?
2.a. If a bug, is there a good way to detect this from inside the
         tcg/plugin infrastructure and avoid calling the callback for the
         faulting execution of the instruction?
2.b. If a "feature", is there a good way to detect this from my plugin?

Thanks!

-Aaron



reply via email to

[Prev in Thread] Current Thread [Next in Thread]