summary refs log tree commit diff
path: root/devices/src/irqchip/mod.rs
diff options
context:
space:
mode:
authorColin Downs-Razouk <colindr@google.com>2020-05-11 08:13:50 -0700
committerCommit Bot <commit-bot@chromium.org>2020-06-04 19:17:44 +0000
commitba7662437018e380bbf208c23fda39cb62907a62 (patch)
tree8cb7eed588647112a16f8fe792d62e3581aa61b1 /devices/src/irqchip/mod.rs
parent814a8da0ed70187bf06618ee3a545ca3361b5933 (diff)
downloadcrosvm-ba7662437018e380bbf208c23fda39cb62907a62.tar
crosvm-ba7662437018e380bbf208c23fda39cb62907a62.tar.gz
crosvm-ba7662437018e380bbf208c23fda39cb62907a62.tar.bz2
crosvm-ba7662437018e380bbf208c23fda39cb62907a62.tar.lz
crosvm-ba7662437018e380bbf208c23fda39cb62907a62.tar.xz
crosvm-ba7662437018e380bbf208c23fda39cb62907a62.tar.zst
crosvm-ba7662437018e380bbf208c23fda39cb62907a62.zip
devices: irqchip: IrqChipX86_64 trait
This trait handles the x86-specific features of an irqchip, including
getting and setting the state of the pic, ioapic, lapics, and pit.

Also includes an empty implementation of this trait for the
KvmKernelIrqChip.

BUG=chromium:1077058
TEST=cargo test -p devices

Change-Id: I36034661f4a2baedc7ac2b8f311cab6327afefba
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2197717
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Colin Downs-Razouk <colindr@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Stephen Barber <smbarber@chromium.org>
Diffstat (limited to 'devices/src/irqchip/mod.rs')
-rw-r--r--devices/src/irqchip/mod.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/devices/src/irqchip/mod.rs b/devices/src/irqchip/mod.rs
index a8023e9..3284bc6 100644
--- a/devices/src/irqchip/mod.rs
+++ b/devices/src/irqchip/mod.rs
@@ -10,6 +10,11 @@ use std::marker::{Send, Sized};
 use hypervisor::{IrqRoute, Vcpu};
 use sys_util::{EventFd, Result};
 
+#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
+mod x86_64;
+#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
+pub use x86_64::*;
+
 /// Trait that abstracts interactions with interrupt controllers.
 ///
 /// Each VM will have one IrqChip instance which is responsible for routing IRQ lines and