.userspace_addr = (uint64_t) ram,
.flags = 0
};
- ioctl(vmfd, KVM_SET_USER_MEMORY_REGION, ®ion);
+ if (ioctl(vmfd, KVM_SET_USER_MEMORY_REGION, ®ion) == -1)
+ abort();
region.slot = 1;
region.guest_phys_addr = PROGSTART;
region.memory_size = binlen;
region.userspace_addr = (uint64_t) progmem;
region.flags = KVM_MEM_READONLY;
- ioctl(vmfd, KVM_SET_USER_MEMORY_REGION, ®ion);
+ if (ioctl(vmfd, KVM_SET_USER_MEMORY_REGION, ®ion) == -1)
+ abort();
vcpu = ioctl(vmfd, KVM_CREATE_VCPU, (unsigned long)0);
const unsigned vcpulen = ioctl(kvm, KVM_GET_VCPU_MMAP_SIZE, NULL);