diff options
author | Zach Reizner <zachr@google.com> | 2018-02-01 19:12:32 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-02-12 22:42:36 -0800 |
commit | 7a4d7b1f50d07e7f0ae350c27659c6e852da62c7 (patch) | |
tree | 5efb7e9cb9d7f32e90985a19b7875f9f6936470b /plugin_proto | |
parent | 53528e33eda615ef309915447b227d2dcacb2090 (diff) | |
download | crosvm-7a4d7b1f50d07e7f0ae350c27659c6e852da62c7.tar crosvm-7a4d7b1f50d07e7f0ae350c27659c6e852da62c7.tar.gz crosvm-7a4d7b1f50d07e7f0ae350c27659c6e852da62c7.tar.bz2 crosvm-7a4d7b1f50d07e7f0ae350c27659c6e852da62c7.tar.lz crosvm-7a4d7b1f50d07e7f0ae350c27659c6e852da62c7.tar.xz crosvm-7a4d7b1f50d07e7f0ae350c27659c6e852da62c7.tar.zst crosvm-7a4d7b1f50d07e7f0ae350c27659c6e852da62c7.zip |
add plugin support for model specific registers
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>
Diffstat (limited to 'plugin_proto')
-rw-r--r-- | plugin_proto/Cargo.toml | 2 | ||||
-rw-r--r-- | plugin_proto/protos/plugin.proto | 27 |
2 files changed, 28 insertions, 1 deletions
diff --git a/plugin_proto/Cargo.toml b/plugin_proto/Cargo.toml index 74082b6..c9d771d 100644 --- a/plugin_proto/Cargo.toml +++ b/plugin_proto/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "plugin_proto" -version = "0.6.0" +version = "0.7.0" authors = ["The Chromium OS Authors"] build = "build.rs" diff --git a/plugin_proto/protos/plugin.proto b/plugin_proto/protos/plugin.proto index e287581..7e7f137 100644 --- a/plugin_proto/protos/plugin.proto +++ b/plugin_proto/protos/plugin.proto @@ -206,6 +206,21 @@ message VcpuRequest { bytes state = 2; } + message GetMsrs { + // The entry data will be returned in the same order as this in the + // VcpuResponse::GetMsrs::entry_data array. + repeated uint32 entry_indices = 1; + } + + message MsrEntry { + uint32 index = 1; + uint64 data = 2; + } + + message SetMsrs { + repeated MsrEntry entries = 1; + } + // The type of the message is determined by which of these oneof fields is present in the // protobuf. oneof message { @@ -213,6 +228,8 @@ message VcpuRequest { Resume resume = 2; GetState get_state = 3; SetState set_state = 4; + GetMsrs get_msrs = 5; + SetMsrs set_msrs = 6; } } @@ -257,6 +274,14 @@ message VcpuResponse { message SetState { } + message GetMsrs { + // The order of the entry_data values is the same order as the array of indices given in the + // corresponding request. + repeated uint64 entry_data = 1; + } + + message SetMsrs {} + // This is zero on success, and a negative integer on failure. sint32 errno = 1; // The field present here is always the same as the one present in the corresponding @@ -266,5 +291,7 @@ message VcpuResponse { Resume resume = 3; GetState get_state = 4; SetState set_state = 5; + GetMsrs get_msrs = 6; + SetMsrs set_msrs = 7; } } |