From db6edff22f8bddabd6985c11a8f9456d2bc21c1f Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Tue, 9 Oct 2018 12:44:21 -0700 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/1271836 Commit-Ready: ChromeOS CL Exonerator Bot Reviewed-by: Zach Reizner --- vm_control/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vm_control/src') 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), } -- cgit 1.4.1