diff --git a/hypervisor/src/kvm/mod.rs b/hypervisor/src/kvm/mod.rs index 86e247712d..d6a6e0c726 100644 --- a/hypervisor/src/kvm/mod.rs +++ b/hypervisor/src/kvm/mod.rs @@ -166,7 +166,7 @@ impl KvmVm { pub fn new(kvm: &Kvm, guest_mem: GuestMemory) -> Result { // Safe because we know kvm is a real kvm fd as this module is the only one that can make // Kvm objects. - let ret = unsafe { ioctl(kvm, KVM_CREATE_VM()) }; + let ret = unsafe { ioctl_with_val(kvm, KVM_CREATE_VM(), 0) }; if ret < 0 { return errno_result(); } diff --git a/kvm/src/lib.rs b/kvm/src/lib.rs index 4b75c1cdc8..d571ec4885 100644 --- a/kvm/src/lib.rs +++ b/kvm/src/lib.rs @@ -274,7 +274,7 @@ impl Vm { pub fn new(kvm: &Kvm, guest_mem: GuestMemory) -> Result { // Safe because we know kvm is a real kvm fd as this module is the only one that can make // Kvm objects. - let ret = unsafe { ioctl(kvm, KVM_CREATE_VM()) }; + let ret = unsafe { ioctl_with_val(kvm, KVM_CREATE_VM(), 0) }; if ret >= 0 { // Safe because we verify the value of ret and we are the owners of the fd. let vm_file = unsafe { File::from_raw_descriptor(ret) };