diff options
author | Daniel Verkamp <dverkamp@chromium.org> | 2018-10-09 12:44:21 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-10-11 13:25:38 -0700 |
commit | db6edff22f8bddabd6985c11a8f9456d2bc21c1f (patch) | |
tree | bea5a65c92d3eed9e878a6b1cd6064a094d29a38 /vm_control/src | |
parent | 9357ceab6ac207498fc2cff4be70aa6975e9c79f (diff) | |
download | crosvm-db6edff22f8bddabd6985c11a8f9456d2bc21c1f.tar crosvm-db6edff22f8bddabd6985c11a8f9456d2bc21c1f.tar.gz crosvm-db6edff22f8bddabd6985c11a8f9456d2bc21c1f.tar.bz2 crosvm-db6edff22f8bddabd6985c11a8f9456d2bc21c1f.tar.lz crosvm-db6edff22f8bddabd6985c11a8f9456d2bc21c1f.tar.xz crosvm-db6edff22f8bddabd6985c11a8f9456d2bc21c1f.tar.zst crosvm-db6edff22f8bddabd6985c11a8f9456d2bc21c1f.zip |
kvm: refactor ioeventfd datamatch interface
This allows the caller to specify the full range of datamatch options defined in the KVM ioeventfd API, including matching accesses of a particular size with or without matching a specific data value. BUG=None TEST=cargo test -p kvm Change-Id: I28b543f7c0b35eb2a6d47a14a33145ea00d09d1d Signed-off-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1271836 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Zach Reizner <zachr@chromium.org>
Diffstat (limited to 'vm_control/src')
-rw-r--r-- | vm_control/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vm_control/src/lib.rs b/vm_control/src/lib.rs index 47e9d8c..4d1d036 100644 --- a/vm_control/src/lib.rs +++ b/vm_control/src/lib.rs @@ -27,7 +27,7 @@ use libc::{EINVAL, ENODEV, ERANGE}; use byteorder::{LittleEndian, WriteBytesExt}; use data_model::{DataInit, Le32, Le64, VolatileMemory}; -use kvm::{IoeventAddress, Vm}; +use kvm::{Datamatch, IoeventAddress, Vm}; use resources::{GpuMemoryDesc, GpuMemoryPlaneDesc, SystemAllocator}; use sys_util::{ Error as SysError, EventFd, GuestAddress, MemoryMapping, MmapError, Result, ScmSocket, @@ -248,7 +248,7 @@ impl VmRequest { VmResponse::Ok } &VmRequest::RegisterIoevent(ref evt, addr, datamatch) => { - match vm.register_ioevent(evt, addr, datamatch) { + match vm.register_ioevent(evt, addr, Datamatch::U32(Some(datamatch))) { Ok(_) => VmResponse::Ok, Err(e) => VmResponse::Err(e), } |