DeviceRelocation

Trait DeviceRelocation 

Source
pub trait DeviceRelocation: Send + Sync {
    // Required method
    fn move_bar(
        &self,
        old_base: u64,
        new_base: u64,
        len: u64,
        pci_dev: &mut dyn PciDevice,
    ) -> Result<(), DeviceRelocationError>;
}
Expand description

This trait defines a set of functions which can be triggered whenever a PCI device is modified in any way.

Required Methods§

Source

fn move_bar( &self, old_base: u64, new_base: u64, len: u64, pci_dev: &mut dyn PciDevice, ) -> Result<(), DeviceRelocationError>

The BAR needs to be moved to a different location in the guest address space. This follows a decision from the software running in the guest.

Implementors§