Lines Matching +full:- +full:- +full:disable +full:- +full:sparse
11 * the COPYING file in the top-level directory.
13 * Based on qemu-kvm device-assignment:
19 * Copyright (C) 2008, IBM, Muli Ben-Yehuda (muli@il.ibm.com)
26 #include "hw/vfio/vfio-device.h"
29 #include "vfio-helpers.h"
33 vbmap->pages = REAL_HOST_PAGE_ALIGN(size) / qemu_real_host_page_size();
34 vbmap->size = ROUND_UP(vbmap->pages, sizeof(__u64) * BITS_PER_BYTE) /
36 vbmap->bitmap = g_try_malloc0(vbmap->size);
37 if (!vbmap->bitmap) {
38 return -ENOMEM;
49 for (hdr = ptr + cap_offset; hdr != ptr; hdr = ptr + hdr->next) {
50 if (hdr->id == id) {
61 if (!(info->flags & VFIO_REGION_INFO_FLAG_CAPS)) {
65 return vfio_get_cap((void *)info, info->cap_offset, id);
71 if (!(info->flags & VFIO_DEVICE_FLAGS_CAPS)) {
75 return vfio_get_cap((void *)info, info->cap_offset, id);
81 if (!(info->flags & VFIO_IOMMU_INFO_CAPS)) {
85 return vfio_get_cap((void *)info, info->cap_offset, id);
103 *avail = cap->avail;
115 * we'll re-use it should another vfio device be attached before then.
117 int vfio_kvm_device_fd = -1;
124 if (vfio_kvm_device_fd != -1) {
126 vfio_kvm_device_fd = -1;
151 return -errno;
160 return -errno;
177 return -EINVAL;
183 return -errno;
197 info->argsz = argsz;
204 if (info->argsz > argsz) {
205 argsz = info->argsz;
217 * non-iterables loading phase) is required for ARM64 due to this platform