mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-06 20:00:54 +00:00
pci: Extend PciDevice trait with move_bar() function
In order to support PCI BAR reprogramming, the PciDevice trait defines a new method move_bar() dedicated for taking appropriate action when a BAR is moved to a different guest address. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
parent
3e37f59933
commit
c865f93c9b
@ -90,6 +90,8 @@ pub trait PciDevice: BusDevice {
|
||||
/// * `addr` - The guest address inside the BAR.
|
||||
/// * `data` - The data to write.
|
||||
fn write_bar(&mut self, _base: u64, _offset: u64, _data: &[u8]) {}
|
||||
/// Relocates the BAR to a different address in guest address space.
|
||||
fn move_bar(&mut self, _old_base: u64, _new_base: u64) {}
|
||||
}
|
||||
|
||||
/// This trait defines a set of functions which can be triggered whenever a
|
||||
|
Loading…
x
Reference in New Issue
Block a user