diff options
author | Zhuocheng Ding <zhuocheng.ding@intel.corp-partner.google.com> | 2019-12-02 15:50:20 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-03-05 01:02:48 +0000 |
commit | f2e90bf0b0ca101d2925e91ca50d3e9e5ea2fdb7 (patch) | |
tree | 20a8210f21c3e530c80e45146fbb91f284064507 /arch | |
parent | 50740cece43671cc42035f92cde460aad3d29494 (diff) | |
download | crosvm-f2e90bf0b0ca101d2925e91ca50d3e9e5ea2fdb7.tar crosvm-f2e90bf0b0ca101d2925e91ca50d3e9e5ea2fdb7.tar.gz crosvm-f2e90bf0b0ca101d2925e91ca50d3e9e5ea2fdb7.tar.bz2 crosvm-f2e90bf0b0ca101d2925e91ca50d3e9e5ea2fdb7.tar.lz crosvm-f2e90bf0b0ca101d2925e91ca50d3e9e5ea2fdb7.tar.xz crosvm-f2e90bf0b0ca101d2925e91ca50d3e9e5ea2fdb7.tar.zst crosvm-f2e90bf0b0ca101d2925e91ca50d3e9e5ea2fdb7.zip |
Add logic to setup PIC/IOAPIC.
TODO: Route irqfd to PIC/IOAPIC to make them fully work. BUG=chromium:908689 TEST=None Change-Id: I301287b1cf32cfccffce6c52ebbb5e123931178e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1945796 Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Zhuocheng Ding <zhuocheng.ding@intel.corp-partner.google.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/Cargo.toml | 1 | ||||
-rw-r--r-- | arch/src/lib.rs | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/arch/Cargo.toml b/arch/Cargo.toml index bf28560..6b4e529 100644 --- a/arch/Cargo.toml +++ b/arch/Cargo.toml @@ -13,3 +13,4 @@ libc = "*" resources = { path = "../resources" } sync = { path = "../sync" } sys_util = { path = "../sys_util" } +vm_control = { path = "../vm_control" } diff --git a/arch/src/lib.rs b/arch/src/lib.rs index 6af78e3..5112798 100644 --- a/arch/src/lib.rs +++ b/arch/src/lib.rs @@ -25,6 +25,7 @@ use kvm::{IoeventAddress, Kvm, Vcpu, Vm}; use resources::SystemAllocator; use sync::Mutex; use sys_util::{syslog, EventFd, GuestAddress, GuestMemory, GuestMemoryError}; +use vm_control::VmIrqRequestSocket; pub enum VmImage { Kernel(File), @@ -60,6 +61,7 @@ pub struct RunnableLinuxVm { pub vcpus: Vec<Vcpu>, pub vcpu_affinity: Vec<usize>, pub irq_chip: Option<File>, + pub split_irqchip: Option<(Arc<Mutex<devices::Pic>>, Arc<Mutex<devices::Ioapic>>)>, pub io_bus: Bus, pub mmio_bus: Bus, pub pid_debug_label_map: BTreeMap<u32, String>, @@ -88,6 +90,7 @@ pub trait LinuxArch { fn build_vm<F, E>( components: VmComponents, split_irqchip: bool, + ioapic_device_socket: VmIrqRequestSocket, serial_parameters: &BTreeMap<u8, SerialParameters>, serial_jail: Option<Minijail>, create_devices: F, |