Attribute Macro panda_macros::replay_before_dma[][src]

#[replay_before_dma]
Expand description

(Callback) In replay only. We are about to dma between qemu buffer and guest memory.

Callback ID:     PANDA_CB_REPLAY_BEFORE_DMA,

   Arguments:
    CPUState *env:      pointer to CPUState
    const uint8_t *buf: pointer to the QEMU's device buffer ussed in the transfer
    hwaddr addr:        address written to in the guest RAM
    size_t size:        size of transfer
    bool is_write:      indicates whether the DMA transfer writes to memory

   Helper call location: exec.c

   Return value:
    none

Callback arguments: (&mut CPUState, *const u8, hwaddr, usize, bool, )

Example

use panda::prelude::*;

#[panda::replay_before_dma]
fn callback(_: &mut CPUState, _: *const u8, _: hwaddr, _: usize, _: bool, ) {
    // do stuff
}