summary refs log tree commit diff
path: root/plugin_proto
diff options
context:
space:
mode:
authorZach Reizner <zachr@google.com>2018-02-06 22:28:36 -0800
committerchrome-bot <chrome-bot@chromium.org>2018-02-12 22:42:40 -0800
commitdadb7625ea382b0372ec8be9fcae8f0aa3f0b6fd (patch)
tree038c55ce2ceac80b5a5af7518257a2c5b5497738 /plugin_proto
parent1d4a70029c849b7aff178dd1e4a00feb7a5c483b (diff)
downloadcrosvm-dadb7625ea382b0372ec8be9fcae8f0aa3f0b6fd.tar
crosvm-dadb7625ea382b0372ec8be9fcae8f0aa3f0b6fd.tar.gz
crosvm-dadb7625ea382b0372ec8be9fcae8f0aa3f0b6fd.tar.bz2
crosvm-dadb7625ea382b0372ec8be9fcae8f0aa3f0b6fd.tar.lz
crosvm-dadb7625ea382b0372ec8be9fcae8f0aa3f0b6fd.tar.xz
crosvm-dadb7625ea382b0372ec8be9fcae8f0aa3f0b6fd.tar.zst
crosvm-dadb7625ea382b0372ec8be9fcae8f0aa3f0b6fd.zip
allow plugin to query for KVM extensions
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>
Diffstat (limited to 'plugin_proto')
-rw-r--r--plugin_proto/Cargo.toml2
-rw-r--r--plugin_proto/protos/plugin.proto37
2 files changed, 24 insertions, 15 deletions
diff --git a/plugin_proto/Cargo.toml b/plugin_proto/Cargo.toml
index 0e5ead4..cb6c7fd 100644
--- a/plugin_proto/Cargo.toml
+++ b/plugin_proto/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "plugin_proto"
-version = "0.9.0"
+version = "0.10.0"
 authors = ["The Chromium OS Authors"]
 build = "build.rs"
 
diff --git a/plugin_proto/protos/plugin.proto b/plugin_proto/protos/plugin.proto
index 22f7be6..194b315 100644
--- a/plugin_proto/protos/plugin.proto
+++ b/plugin_proto/protos/plugin.proto
@@ -68,6 +68,10 @@ message MainRequest {
 
     message GetShutdownEventfd {}
 
+    message CheckExtension {
+        uint32 extension = 1;
+    }
+
     message ReserveRange {
         AddressSpace space = 1;
         uint64 start = 2;
@@ -126,13 +130,14 @@ message MainRequest {
         Destroy destroy = 2;
         NewConnection new_connection = 3;
         GetShutdownEventfd get_shutdown_eventfd = 4;
-        ReserveRange reserve_range = 5;
-        SetIrq set_irq = 6;
-        SetIrqRouting set_irq_routing = 7;
-        SetIdentityMapAddr set_identity_map_addr = 8;
-        PauseVcpus pause_vcpus = 9;
-        GetVcpus get_vcpus = 10;
-        Start start = 11;
+        CheckExtension check_extension = 5;
+        ReserveRange reserve_range = 6;
+        SetIrq set_irq = 7;
+        SetIrqRouting set_irq_routing = 8;
+        SetIdentityMapAddr set_identity_map_addr = 9;
+        PauseVcpus pause_vcpus = 10;
+        GetVcpus get_vcpus = 11;
+        Start start = 12;
         // Method for a Memory type object for retrieving the dirty bitmap. Only valid if the memory
         // object was created with dirty_log set.
         MemoryDirtyLog dirty_log = 101;
@@ -148,6 +153,9 @@ message MainResponse {
     // requests and responses independent of the other sockets.
     message NewConnection {}
     message GetShutdownEventfd {}
+    message CheckExtension {
+        bool has_extension = 1;
+    }
     message ReserveRange {}
     message SetIrq {}
     message SetIrqRouting {}
@@ -170,13 +178,14 @@ message MainResponse {
         Destroy destroy = 3;
         NewConnection new_connection = 4;
         GetShutdownEventfd get_shutdown_eventfd = 5;
-        ReserveRange reserve_range = 6;
-        SetIrq set_irq = 7;
-        SetIrqRouting set_irq_routing = 8;
-        SetIdentityMapAddr set_identity_map_addr = 9;
-        PauseVcpus pause_vcpus = 10;
-        GetVcpus get_vcpus = 11;
-        Start start = 12;
+        CheckExtension check_extension = 6;
+        ReserveRange reserve_range = 7;
+        SetIrq set_irq = 8;
+        SetIrqRouting set_irq_routing = 9;
+        SetIdentityMapAddr set_identity_map_addr = 10;
+        PauseVcpus pause_vcpus = 11;
+        GetVcpus get_vcpus = 12;
+        Start start = 13;
         MemoryDirtyLog dirty_log = 101;
     }
 }