From ed517d1bfe028564076ee45bd9412882c85ebbe7 Mon Sep 17 00:00:00 2001 From: Sonny Rao Date: Tue, 13 Feb 2018 22:09:43 -0800 Subject: crosvm: create a LinuxArch trait and use it for x86 This creates a trait that different architectures can implement to support running Linux VMs. In the implementation on X86 we remove some error and return errors from lower-level modules as appropriate. These modules now implement the Error trait so we can get meaningful descriptions without an extra error from the calling function. This still keeps all the ifdefs in linux.rs for now until we have another implementation to use for ARM. BUG=chromium:797868 TEST=./build_test passes on all architectures TEST=crosvm runs on caroline Change-Id: If24bcc83e25f9127d6aea68f9272e639296aad8b Reviewed-on: https://chromium-review.googlesource.com/952368 Commit-Ready: Sonny Rao Tested-by: Sonny Rao Reviewed-by: Zach Reizner --- Cargo.lock | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Cargo.lock') diff --git a/Cargo.lock b/Cargo.lock index 9e15b85..a911969 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,3 +1,15 @@ +[[package]] +name = "arch" +version = "0.1.0" +dependencies = [ + "device_manager 0.1.0", + "devices 0.1.0", + "kernel_cmdline 0.1.0", + "kvm 0.1.0", + "libc 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)", + "sys_util 0.1.0", +] + [[package]] name = "bitflags" version = "1.0.1" @@ -17,6 +29,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "crosvm" version = "0.1.0" dependencies = [ + "arch 0.1.0", "byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "crosvm_plugin 0.12.0", "data_model 0.1.0", @@ -289,6 +302,7 @@ dependencies = [ name = "x86_64" version = "0.1.0" dependencies = [ + "arch 0.1.0", "byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "data_model 0.1.0", "device_manager 0.1.0", -- cgit 1.4.1