summary refs log tree commit diff
path: root/hypervisor/src
diff options
context:
space:
mode:
authorColin Downs-Razouk <colindr@google.com>2020-04-30 15:48:47 -0700
committerCommit Bot <commit-bot@chromium.org>2020-05-18 23:56:23 +0000
commit43b1bc8f8ff7ff04b054374538ecad4a4525d283 (patch)
tree221f4deb7e88cf746f8af1c091660657ce48406f /hypervisor/src
parent73665866a047c4602ab25ae6e20ce1f98f1f8e6e (diff)
downloadcrosvm-43b1bc8f8ff7ff04b054374538ecad4a4525d283.tar
crosvm-43b1bc8f8ff7ff04b054374538ecad4a4525d283.tar.gz
crosvm-43b1bc8f8ff7ff04b054374538ecad4a4525d283.tar.bz2
crosvm-43b1bc8f8ff7ff04b054374538ecad4a4525d283.tar.lz
crosvm-43b1bc8f8ff7ff04b054374538ecad4a4525d283.tar.xz
crosvm-43b1bc8f8ff7ff04b054374538ecad4a4525d283.tar.zst
crosvm-43b1bc8f8ff7ff04b054374538ecad4a4525d283.zip
devices: irqchip: new irqchip module
This new module contains the irqchip trait and it's implementations. The
irqchips will work with the new hypervisor crate to abstract the
interaction between crosvm and kvm.

This just defines the irqchip trait and an empty implementation of the
KvmKernelIrqChip.

BUG=chromium:1077058
TEST=added test for creating a KvmKernelIrqChip and adding a Vcpu to it

Change-Id: Ic1609c965e0a057f5a9d4d74f1cae46edb46dcb4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2197398
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Stephen Barber <smbarber@chromium.org>
Commit-Queue: Colin Downs-Razouk <colindr@google.com>
Diffstat (limited to 'hypervisor/src')
-rw-r--r--hypervisor/src/aarch64.rs2
-rw-r--r--hypervisor/src/kvm/aarch64.rs2
-rw-r--r--hypervisor/src/lib.rs2
3 files changed, 4 insertions, 2 deletions
diff --git a/hypervisor/src/aarch64.rs b/hypervisor/src/aarch64.rs
index dc06d8d..875941b 100644
--- a/hypervisor/src/aarch64.rs
+++ b/hypervisor/src/aarch64.rs
@@ -7,7 +7,7 @@ use sys_util::Result;
 
 /// A wrapper for using a VM on aarch64 and getting/setting its state.
 pub trait VmAArch64: Vm {
-    type Vcpu: VcpuArm;
+    type Vcpu: VcpuAArch64;
 
     /// Create a Vcpu with the specified Vcpu ID.
     fn create_vcpu(&self, id: usize) -> Result<Self::Vcpu>;
diff --git a/hypervisor/src/kvm/aarch64.rs b/hypervisor/src/kvm/aarch64.rs
index f674671..6e9f9f7 100644
--- a/hypervisor/src/kvm/aarch64.rs
+++ b/hypervisor/src/kvm/aarch64.rs
@@ -5,7 +5,7 @@
 use sys_util::Result;
 
 use super::{KvmVcpu, KvmVm};
-use crate::{Regs, VcpuAArch64, VmAarch64};
+use crate::{VcpuAArch64, VmAArch64};
 
 impl VmAArch64 for KvmVm {
     type Vcpu = KvmVcpu;
diff --git a/hypervisor/src/lib.rs b/hypervisor/src/lib.rs
index 0f4c278..f17528b 100644
--- a/hypervisor/src/lib.rs
+++ b/hypervisor/src/lib.rs
@@ -63,3 +63,5 @@ pub trait RunnableVcpu: Deref<Target = <Self as RunnableVcpu>::Vcpu> + DerefMut
 pub enum VcpuExit {
     Unknown,
 }
+
+pub struct IrqRoute {}