summary refs log tree commit diff
path: root/plugin_proto
Commit message (Collapse)AuthorAge
* require protobuf version match that of top-level Cargo.tomlZach Reizner2019-03-25
| | | | | | | | | | | | | | | | | | When compiling unit tests in the pre-cq, the Cargo.lock file is deleted. Testing a sub-crate without a lock file will cause the protobuf dependency to resolve to the latest version of protobuf, which varies based on whatever other cros-rust.eclass based ebuilds have been run beforehand. This change fixes that source of flake. BUG=None TEST=pre-cq Change-Id: Ief951391c08b0f0cc9ff035437824d89860455e2 Reviewed-on: https://chromium-review.googlesource.com/1534962 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: kokoro <noreply+kokoro@google.com> Tested-by: Zach Reizner <zachr@chromium.org> Reviewed-by: Stephen Barber <smbarber@chromium.org>
* plugin: allow retrieving and setting VM clockDmitry Torokhov2019-01-22
| | | | | | | | | | | | | Add crossvm plugin API to allow reading and setting guest clock. BUG=b:122878975 TEST=cargo test -p kvm; cargo test --features=plugin Change-Id: I3fd656c06b0e7e43ac88a337ac5d0caec8c59dba Signed-off-by: Dmitry Torokhov <dtor@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1419373 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Zach Reizner <zachr@chromium.org>
* crosvm: Support cros-rust version crosvm ebuildpaulhsia2019-01-22
| | | | | | | | | | | | | | | | | | | | | | | To support eclass migration for crosvm ebuild from crate to cros-rust. This CL need to be built with cros-rust version crosvm ebuild. - Upgrage crate cc from 1.0.15 to 1.0.25. - Change local tempdir version from 0.3.5 to 0.3.7 for ebuild integration. - Remove 9s directory since it's moved to platform2. BUG=chromium:781398 BUG=chromium:907520 TEST=Run $ FEATURES=test emerge-eve crosvm in a clean chroot CQ-DEPEND=CL:1421303 Change-Id: Iab615b555a51f8020e5efae1cc40ac6b54ea87f2 Reviewed-on: https://chromium-review.googlesource.com/1421237 Commit-Ready: Chih-Yang Hsia <paulhsia@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Tested-by: Chih-Yang Hsia <paulhsia@chromium.org> Reviewed-by: Zach Reizner <zachr@chromium.org>
* toolchain: Update to Rust 1.31.0David Tolnay2018-12-13
| | | | | | | | | | | | | | | | | | We updated the production toolchain from 1.30 to 1.31 in CL:1366446. This CL does the same upgrade for the local developer toolchain and Kokoro. The relevant changes are in rust-toolchain and kokoro/Dockerfile. The rest are from rustfmt. TEST=cargo fmt --all -- --check TEST=as described in kokoro/README.md Change-Id: I3b4913f3e237baa36c664b4953be360c09efffd4 Reviewed-on: https://chromium-review.googlesource.com/1374376 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: David Tolnay <dtolnay@chromium.org> Reviewed-by: Zach Reizner <zachr@chromium.org>
* cargo fmt all source codeZach Reizner2018-10-09
| | | | | | | | | | | | | | Now that cargo fmt has landed, run it over everything at once to bring rust source to the standard formatting. TEST=cargo test BUG=None Change-Id: Ic95a48725e5a40dcbd33ba6d5aef2bd01e91865b Reviewed-on: https://chromium-review.googlesource.com/1259287 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Zach Reizner <zachr@chromium.org> Reviewed-by: Zach Reizner <zachr@chromium.org>
* plugin: allow retrieving list of supported MSRsDmitry Torokhov2018-07-31
| | | | | | | | | | | | Add crossvm plugin API to allow fetching list of supported MSRs. BUG=b:111083877 TEST=cargo test -p kvm; cargo test --features=plugin Change-Id: I178c7bc33d606bef10422faac6bb9afb3fe0a014 Signed-off-by: Dmitry Torokhov <dtor@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1152229 Reviewed-by: Zach Reizner <zachr@chromium.org>
* plugin: allow retrieving and setting VCPU eventsSlava Malyugin2018-07-11
| | | | | | | | | | | | | Add crosvm plugin API to allow fetching and setting VCPU events. BUG=b:110056268 TEST=cargo test --features plugin -p kvm Change-Id: Id66230f180f4bdb95bd1850ed050e439083701cc Reviewed-on: https://chromium-review.googlesource.com/1128045 Commit-Ready: Slava Malyugin <slavamn@chromium.org> Tested-by: Slava Malyugin <slavamn@chromium.org> Reviewed-by: Zach Reizner <zachr@chromium.org>
* crosvm: Switch to cc crate.Manoj Gupta2018-05-18
| | | | | | | | | | | | | | | | We do not want to add dependencies on GCC. Switch to cc crate instead of gcc to honor CC setting. CQ-DEPEND=CL:1066462 BUG=chromium:814480 TEST=emerge-{eve,kevin} crosvm works. Change-Id: I4e846b2080503e5617ed66e709f7af5263c98fba Reviewed-on: https://chromium-review.googlesource.com/1066461 Commit-Ready: Manoj Gupta <manojgupta@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: Zach Reizner <zachr@chromium.org>
* plugin: allow retrieving and setting XCR VCPU statesDmitry Torokhov2018-05-18
| | | | | | | | | | | | | Add crossvm plugin API to allow fetching and setting XCRs for VCPU. BUG=b:79692549 TEST=cargo test -p kvm Change-Id: I2a988279c08051a8d8865efc1e60f9692fa26272 Signed-off-by: Dmitry Torokhov <dtor@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1062646 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Zach Reizner <zachr@chromium.org>
* plugin: allow retrieving and setting VM and VCPU statesDmitry Torokhov2018-03-30
| | | | | | | | | | | | | This change allows plugin to retrieve and set various VM and VCPU states: interrupt controller, PIT, LAPIC and MP state. BUG=b:76083711 TEST=cargo test -p kvm Change-Id: Ie32a67b0cd4a1f0a19ccd826a6e1c9dc25670f95 Signed-off-by: Dmitry Torokhov <dtor@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/986511 Reviewed-by: Zach Reizner <zachr@chromium.org>
* plugin: add crosvm_net_get_configStephen Barber2018-03-08
| | | | | | | | | | | BUG=none TEST=sudo cargo test --features plugin Change-Id: Ib38fad250295d73529dff0451345b4274a261073 Reviewed-on: https://chromium-review.googlesource.com/911943 Commit-Ready: Stephen Barber <smbarber@chromium.org> Tested-by: Stephen Barber <smbarber@chromium.org> Reviewed-by: Zach Reizner <zachr@chromium.org>
* allow plugin to query KVM for supported/emulated CPUIDsDmitry Torokhov2018-02-28
| | | | | | | | | | | | | This plumbs calls to KVM_GET_SUPPORTED_CPUID and KVM_GET_EMULATED_CPUID to be available to plugins. TEST=cargo test --features plugin; cargo test -p kvm BUG=chromium:800626 Change-Id: I98879599b5f970c6c2720772658689a505d8abe1 Signed-off-by: Dmitry Torokhov <dtor@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/938674 Reviewed-by: Zach Reizner <zachr@chromium.org>
* plugin_proto: add helpers to convert CPUID data between KVM and protobufDmitry Torokhov2018-02-27
| | | | | | | | | | | | | We need to convert between protobuf and KVM format of cpuid data in several places, so let's add helpers to plugin_proto crate. TEST=cargo test --features plugin; cargo test -p kvm BUG=chromium:800626 Change-Id: Ida7b59825d2146b0d02711e441f477d90dd4263a Signed-off-by: Dmitry Torokhov <dtor@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/939660 Reviewed-by: Zach Reizner <zachr@chromium.org>
* allow plugin to query for KVM extensionsZach Reizner2018-02-12
| | | | | | | | | | | | | | The guest may need to check for KVM extensions before blindly using them. TEST=cargo test --features plugin; cargo test -p kvm; ./build_test BUG=chromium:800626 Change-Id: If87b928753cd71adeabac4fc7732c3fce7265834 Reviewed-on: https://chromium-review.googlesource.com/906008 Commit-Ready: Zach Reizner <zachr@chromium.org> Tested-by: Zach Reizner <zachr@chromium.org> Reviewed-by: Dylan Reid <dgreid@chromium.org>
* add plugin support for configuring CPUIDZach Reizner2018-02-12
| | | | | | | | | | | | | | The guest expects to be able to read the CPUID, so the plugin process needs to specify what the CPUID for each VCPU will have. TEST=cargo test --features plugin; ./build_test BUG=chromium:800626 Change-Id: I9258540ab2501126c3d8cadbd09b7fc01d19f7a9 Reviewed-on: https://chromium-review.googlesource.com/906006 Commit-Ready: Zach Reizner <zachr@chromium.org> Tested-by: Zach Reizner <zachr@chromium.org> Reviewed-by: Dylan Reid <dgreid@chromium.org>
* allow non-dirty log memory regions from the plugin processZach Reizner2018-02-12
| | | | | | | | | | | | | | | Dirty logging is not necessary for every memory region, so the plugin process should be able to specific exactly which regions it would like dirty logging enabled for. TEST=cargo test --features plugin BUG=chromium:800626 Change-Id: I28b8285357e7de1c8c3a1392bdfdb4853ec5a654 Reviewed-on: https://chromium-review.googlesource.com/900294 Commit-Ready: Zach Reizner <zachr@chromium.org> Tested-by: Zach Reizner <zachr@chromium.org> Reviewed-by: Dylan Reid <dgreid@chromium.org>
* add plugin support for model specific registersZach Reizner2018-02-12
| | | | | | | | | | | | | | The MSRs are useful for booting a full operating system that requires them. TEST=cargo test --features plugin; cargo test -p kvm; ./build_test BUG=chromium:800626 Change-Id: I817fbf3e6868c85b373808bd48e568b5b2b458eb Reviewed-on: https://chromium-review.googlesource.com/897412 Commit-Ready: Zach Reizner <zachr@chromium.org> Tested-by: Zach Reizner <zachr@chromium.org> Reviewed-by: Zach Reizner <zachr@chromium.org>
* add support for accessing debug registers in the plugin processZach Reizner2018-02-12
| | | | | | | | | | | | | | The debug registers are useful to access for the plugin process in some cases. TEST=cargo test --features plugin; cargo test -p kvm; ./build_test BUG=chromium:800626 Change-Id: I8f3f6c31c6989061a43cef948cf5b4e64bd52d30 Reviewed-on: https://chromium-review.googlesource.com/896945 Commit-Ready: Zach Reizner <zachr@chromium.org> Tested-by: Zach Reizner <zachr@chromium.org> Reviewed-by: Zach Reizner <zachr@chromium.org>
* crosvm: add support for plugin processZach Reizner2018-02-09
| | | | | | | | | | | | | | The plugin process is good for running a VM that depends substantially on devices that aren't implemented inside of crosvm. TEST=cargo build --features plugin; ./build_test BUG=chromium:800626 Change-Id: I7b4f656563742cd0bedc837205dd1240d497941d Reviewed-on: https://chromium-review.googlesource.com/869357 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Zach Reizner <zachr@chromium.org> Reviewed-by: Dylan Reid <dgreid@chromium.org>
* add plugin_proto crateZach Reizner2018-01-30
This module defines the protocol shared between the crosvm plugin process and main crosvm process. TEST=cargo build --features plugin BUG=chromium:800626 CQ-DEPEND=CL:892048 Change-Id: I5dfbe845644b7489f1918cecfcc07f28a223aa42 Reviewed-on: https://chromium-review.googlesource.com/869355 Commit-Ready: Zach Reizner <zachr@chromium.org> Tested-by: Zach Reizner <zachr@chromium.org> Reviewed-by: Zach Reizner <zachr@chromium.org>