diff options
author | Matt Delco <delco@chromium.org> | 2019-11-01 16:45:46 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-11-06 23:01:15 +0000 |
commit | a52b2a6c8167eebb285b70b54077919bbf113a35 (patch) | |
tree | 600d2fec69fd89e3216a84b2bc64de510c7f9207 /protos | |
parent | 1de9cb53e1eccfaf138553c45a800f26927663bb (diff) | |
download | crosvm-a52b2a6c8167eebb285b70b54077919bbf113a35.tar crosvm-a52b2a6c8167eebb285b70b54077919bbf113a35.tar.gz crosvm-a52b2a6c8167eebb285b70b54077919bbf113a35.tar.bz2 crosvm-a52b2a6c8167eebb285b70b54077919bbf113a35.tar.lz crosvm-a52b2a6c8167eebb285b70b54077919bbf113a35.tar.xz crosvm-a52b2a6c8167eebb285b70b54077919bbf113a35.tar.zst crosvm-a52b2a6c8167eebb285b70b54077919bbf113a35.zip |
crosvm: add plugin API for async writes
A plugin might care to be immediately notified when a write is made to a port, but it doesn't care to have the VM stopped while the plugin calls back to resume the VM. Unfortunately this means that multiple messages can be queued up in the pipe and read() together by the plugin API. Protobuf's parsing function doesn't report how many bytes it read, so I've resorted to having crosvm prefix every message with a length and then have the plugin lib parse this number. Impact on performance has not been measured. BUG=b:143294496 TEST=Local build and run of build_test. Verified that new unit test was executed, exercised the case where multiple msgs are received together, and completed successfully. Change-Id: If6ef463e7b4d2e688e649f832a764fa644bf2d36 Signed-off-by: Matt Delco <delco@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1896376 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Stephen Barber <smbarber@chromium.org>
Diffstat (limited to 'protos')
-rw-r--r-- | protos/src/plugin.proto | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/protos/src/plugin.proto b/protos/src/plugin.proto index 7b0600d..e2838b0 100644 --- a/protos/src/plugin.proto +++ b/protos/src/plugin.proto @@ -84,6 +84,7 @@ message MainRequest { AddressSpace space = 1; uint64 start = 2; uint64 length = 3; + bool async_write = 4; } message SetIrq { @@ -384,12 +385,13 @@ message VcpuResponse { AddressSpace space = 1; uint64 address = 2; bool is_write = 3; - bytes data = 4; + bool no_resume = 4; + bytes data = 5; // The following can be eagerly provided. - bytes regs = 5; - bytes sregs = 6; - bytes debugregs = 7; + bytes regs = 6; + bytes sregs = 7; + bytes debugregs = 8; } // This type of wait reason is only generated after a PuaseVcpus request on this VCPU. |