summary refs log tree commit diff
path: root/src/main.rs
diff options
context:
space:
mode:
authorMiriam Zimmerman <mutexlox@google.com>2019-01-29 21:21:48 -0800
committerchrome-bot <chrome-bot@chromium.org>2019-02-06 08:31:58 -0800
commit26ac928925e006b82c7b563803689529197ee824 (patch)
tree9367fa519028ba8a3d70b91e7cbe53891ae14dcf /src/main.rs
parent825ba5298f20fab956f555c928b6c1f3ce7c78e3 (diff)
downloadcrosvm-26ac928925e006b82c7b563803689529197ee824.tar
crosvm-26ac928925e006b82c7b563803689529197ee824.tar.gz
crosvm-26ac928925e006b82c7b563803689529197ee824.tar.bz2
crosvm-26ac928925e006b82c7b563803689529197ee824.tar.lz
crosvm-26ac928925e006b82c7b563803689529197ee824.tar.xz
crosvm-26ac928925e006b82c7b563803689529197ee824.tar.zst
crosvm-26ac928925e006b82c7b563803689529197ee824.zip
Add logic to set up PIT (guarded by flag).
BUG=chromium:908689
TEST=None

Change-Id: I625bab235f740d1d2ae256de61a25d560025b751
Reviewed-on: https://chromium-review.googlesource.com/1444501
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Miriam Zimmerman <mutexlox@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Zach Reizner <zachr@chromium.org>
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index 8e83621..31019f9 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -120,6 +120,7 @@ pub struct Config {
     virtio_mouse: Option<PathBuf>,
     virtio_keyboard: Option<PathBuf>,
     virtio_input_evdevs: Vec<PathBuf>,
+    split_irqchip: bool,
 }
 
 impl Default for Config {
@@ -153,6 +154,7 @@ impl Default for Config {
             virtio_mouse: None,
             virtio_keyboard: None,
             virtio_input_evdevs: Vec::new(),
+            split_irqchip: false,
         }
     }
 }
@@ -564,6 +566,9 @@ fn set_argument(cfg: &mut Config, name: &str, value: Option<&str>) -> argument::
             }
             cfg.virtio_input_evdevs.push(dev_path);
         }
+        "split-irqchip" => {
+            cfg.split_irqchip = true;
+        }
         "help" => return Err(argument::Error::PrintHelp),
         _ => unreachable!(),
     }
@@ -627,6 +632,8 @@ fn run_vm(args: std::env::Args) -> std::result::Result<(), ()> {
           Argument::value("trackpad", "PATH:WIDTH:HEIGHT", "Path to a socket from where to read trackpad input events and write status updates to, optionally followed by screen width and height (defaults to 800x1280)."),
           Argument::value("mouse", "PATH", "Path to a socket from where to read mouse input events and write status updates to."),
           Argument::value("keyboard", "PATH", "Path to a socket from where to read keyboard input events and write status updates to."),
+          #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
+          Argument::flag("split-irqchip", "(EXPERIMENTAL) enable split-irqchip support"),
           Argument::short_flag('h', "help", "Print help message.")];
 
     let mut cfg = Config::default();