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:
Samuel Ortiz
2019-07-03 01:22:43 +02:00
parent 42e545806c
commit 8173e1ccd7
6 changed files with 18 additions and 18 deletions

View File

@@ -189,7 +189,7 @@ impl Serial {
}
impl BusDevice for Serial {
fn read(&mut self, offset: u64, data: &mut [u8]) {
fn read(&mut self, _base: u64, offset: u64, data: &mut [u8]) {
if data.len() != 1 {
return;
}
@@ -219,7 +219,7 @@ impl BusDevice for Serial {
};
}
fn write(&mut self, offset: u64, data: &[u8]) {
fn write(&mut self, _base: u64, offset: u64, data: &[u8]) {
if data.len() != 1 {
return;
}