mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: Use definition of MmioDeviceInfo from arch
Remove duplicated copies from vmm. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
committed by
Sebastien Boeuf
parent
e4e2b5d89f
commit
431c16dc44
+1
-19
@@ -2422,29 +2422,11 @@ mod tests {
|
||||
use arch::aarch64::fdt::create_fdt;
|
||||
use arch::aarch64::gic::kvm::create_gic;
|
||||
use arch::aarch64::{layout, DeviceInfoForFdt};
|
||||
use arch::DeviceType;
|
||||
use arch::{DeviceType, MmioDeviceInfo};
|
||||
use vm_memory::{GuestAddress, GuestMemoryMmap};
|
||||
|
||||
const LEN: u64 = 4096;
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct MmioDeviceInfo {
|
||||
addr: u64,
|
||||
irq: u32,
|
||||
}
|
||||
|
||||
impl DeviceInfoForFdt for MmioDeviceInfo {
|
||||
fn addr(&self) -> u64 {
|
||||
self.addr
|
||||
}
|
||||
fn irq(&self) -> u32 {
|
||||
self.irq
|
||||
}
|
||||
fn length(&self) -> u64 {
|
||||
LEN
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_create_fdt_with_devices() {
|
||||
let mut regions = Vec::new();
|
||||
|
||||
Reference in New Issue
Block a user