Trait qemu_plugin::plugin::HasCallbacks
source · pub trait HasCallbacks: Send + Sync + 'static {
// Provided methods
fn on_vcpu_init(
&mut self,
id: PluginId,
vcpu_id: VCPUIndex
) -> Result<(), Error> { ... }
fn on_vcpu_exit(
&mut self,
id: PluginId,
vcpu_id: VCPUIndex
) -> Result<(), Error> { ... }
fn on_vcpu_idle(
&mut self,
id: PluginId,
vcpu_id: VCPUIndex
) -> Result<(), Error> { ... }
fn on_vcpu_resume(
&mut self,
id: PluginId,
vcpu_id: VCPUIndex
) -> Result<(), Error> { ... }
fn on_translation_block_translate(
&mut self,
id: PluginId,
tb: TranslationBlock<'_>
) -> Result<(), Error> { ... }
fn on_flush(&mut self, id: PluginId) -> Result<(), Error> { ... }
fn on_syscall(
&mut self,
id: PluginId,
vcpu_index: VCPUIndex,
num: i64,
a1: u64,
a2: u64,
a3: u64,
a4: u64,
a5: u64,
a6: u64,
a7: u64,
a8: u64
) -> Result<(), Error> { ... }
fn on_syscall_return(
&mut self,
id: PluginId,
vcpu_index: VCPUIndex,
num: i64,
ret: i64
) -> Result<(), Error> { ... }
}Expand description
Trait implemented by structs which have callbacks which should be registered with QEMU
Provided Methods§
sourcefn on_translation_block_translate(
&mut self,
id: PluginId,
tb: TranslationBlock<'_>
) -> Result<(), Error>
fn on_translation_block_translate( &mut self, id: PluginId, tb: TranslationBlock<'_> ) -> Result<(), Error>
Callback triggered on translation block translation
Arguments
id- The ID of the plugintb- The translation block
sourcefn on_syscall(
&mut self,
id: PluginId,
vcpu_index: VCPUIndex,
num: i64,
a1: u64,
a2: u64,
a3: u64,
a4: u64,
a5: u64,
a6: u64,
a7: u64,
a8: u64
) -> Result<(), Error>
fn on_syscall( &mut self, id: PluginId, vcpu_index: VCPUIndex, num: i64, a1: u64, a2: u64, a3: u64, a4: u64, a5: u64, a6: u64, a7: u64, a8: u64 ) -> Result<(), Error>
Callback triggered on syscall
Arguments
id- The ID of the pluginvcpu_index- The ID of the vCPUnum- The syscall numbera1- The first syscall argumenta2- The second syscall argumenta3- The third syscall argumenta4- The fourth syscall argumenta5- The fifth syscall argumenta6- The sixth syscall argumenta7- The seventh syscall argumenta8- The eighth syscall argument