Attribute Macro panda_macros::guest_hypercall [−][src]
#[guest_hypercall]
Expand description
(Callback) Called when a program inside the guest makes a hypercall to pass information from inside the guest to a plugin
Callback ID: PANDA_CB_GUEST_HYPERCALL Arguments: CPUState *env: the current CPU state Helper call location: target/i386/misc_helper.c Return value: true if the callback has processed the hypercall, false if the hypercall has been ignored. Notes: On x86, this is called whenever CPUID is executed. On ARM, the MCR instructions is used. Plugins should check for magic values in the registers to determine if it really is a guest hypercall. Parameters can be passed in other registers. If the plugin processes the hypercall, it should return true so the execution of the normal instruction is skipped.
Callback arguments: (&mut CPUState
, )
Example
use panda::prelude::*; #[panda::guest_hypercall] fn callback(_: &mut CPUState, ) { // do stuff }