mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
devices: Extend the Bus trait to carry the device range base
With the range base for the IO/MMIO vm exit address, a device with multiple ranges has all the needed information for resolving which of its range the exit is coming from Fixes: #87 Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
@@ -159,7 +159,7 @@ pub struct Ioapic {
|
||||
}
|
||||
|
||||
impl BusDevice for Ioapic {
|
||||
fn read(&mut self, offset: u64, data: &mut [u8]) {
|
||||
fn read(&mut self, _base: u64, offset: u64, data: &mut [u8]) {
|
||||
assert!(data.len() == 4);
|
||||
|
||||
debug!("IOAPIC_R @ offset 0x{:x}", offset);
|
||||
@@ -176,7 +176,7 @@ impl BusDevice for Ioapic {
|
||||
LittleEndian::write_u32(data, value);
|
||||
}
|
||||
|
||||
fn write(&mut self, offset: u64, data: &[u8]) {
|
||||
fn write(&mut self, _base: u64, offset: u64, data: &[u8]) {
|
||||
assert!(data.len() == 4);
|
||||
|
||||
debug!("IOAPIC_W @ offset 0x{:x}", offset);
|
||||
|
||||
Reference in New Issue
Block a user