Lines Matching +full:uv +full:- +full:shutdown
1 // SPDX-License-Identifier: GPL-2.0-only
5 * Interface to privileged domain-0 commands.
7 * Copyright (c) 2002-2004, K A Fraser, B Dragovic
47 #include <xen/xen-ops.h>
82 struct privcmd_data *data = file->private_data; in privcmd_ioctl_hypercall()
87 if (data->domid != DOMID_INVALID) in privcmd_ioctl_hypercall()
88 return -EPERM; in privcmd_ioctl_hypercall()
91 return -EFAULT; in privcmd_ioctl_hypercall()
132 while (nelem--) { in gather_array()
133 if (pageidx > PAGE_SIZE-size) { in gather_array()
136 ret = -ENOMEM; in gather_array()
142 list_add_tail(&page->lru, pagelist); in gather_array()
146 ret = -EFAULT; in gather_array()
178 while (nelem--) { in traverse_pages()
179 if (pageidx > PAGE_SIZE-size) { in traverse_pages()
181 pos = pos->next; in traverse_pages()
215 pos = pos->next; in traverse_pages_block()
221 nelem -= nr; in traverse_pages_block()
237 struct vm_area_struct *vma = st->vma; in mmap_gfn_range()
241 if ((msg->npages > (LONG_MAX >> PAGE_SHIFT)) || in mmap_gfn_range()
242 ((unsigned long)(msg->npages << PAGE_SHIFT) >= -st->va)) in mmap_gfn_range()
243 return -EINVAL; in mmap_gfn_range()
246 if ((msg->va != st->va) || in mmap_gfn_range()
247 ((msg->va+(msg->npages<<PAGE_SHIFT)) > vma->vm_end)) in mmap_gfn_range()
248 return -EINVAL; in mmap_gfn_range()
251 msg->va & PAGE_MASK, in mmap_gfn_range()
252 msg->mfn, msg->npages, in mmap_gfn_range()
253 vma->vm_page_prot, in mmap_gfn_range()
254 st->domain, NULL); in mmap_gfn_range()
258 st->va += msg->npages << PAGE_SHIFT; in mmap_gfn_range()
265 struct privcmd_data *data = file->private_data; in privcmd_ioctl_mmap()
267 struct mm_struct *mm = current->mm; in privcmd_ioctl_mmap()
273 /* We only support privcmd_ioctl_mmap_batch for non-auto-translated. */ in privcmd_ioctl_mmap()
275 return -ENOSYS; in privcmd_ioctl_mmap()
278 return -EFAULT; in privcmd_ioctl_mmap()
281 if (data->domid != DOMID_INVALID && data->domid != mmapcmd.dom) in privcmd_ioctl_mmap()
282 return -EPERM; in privcmd_ioctl_mmap()
298 vma = vma_lookup(mm, msg->va); in privcmd_ioctl_mmap()
299 rc = -EINVAL; in privcmd_ioctl_mmap()
301 if (!vma || (msg->va != vma->vm_start) || vma->vm_private_data) in privcmd_ioctl_mmap()
303 vma->vm_private_data = PRIV_VMA_LOCKED; in privcmd_ioctl_mmap()
306 state.va = vma->vm_start; in privcmd_ioctl_mmap()
332 * -ENOENT errors have happened)
333 * -ENOENT if at least 1 -ENOENT has happened.
338 /* User-space gfn array to store errors in the second pass for V1. */
340 /* User-space int array to store errors in the second pass for V2. */
351 struct vm_area_struct *vma = st->vma; in mmap_batch_fn()
352 struct page **pages = vma->vm_private_data; in mmap_batch_fn()
357 cur_pages = &pages[st->index]; in mmap_batch_fn()
360 ret = xen_remap_domain_gfn_array(st->vma, st->va & PAGE_MASK, gfnp, nr, in mmap_batch_fn()
361 (int *)gfnp, st->vma->vm_page_prot, in mmap_batch_fn()
362 st->domain, cur_pages); in mmap_batch_fn()
366 if (ret == -ENOENT) in mmap_batch_fn()
367 st->global_error = -ENOENT; in mmap_batch_fn()
370 if (st->global_error == 0) in mmap_batch_fn()
371 st->global_error = 1; in mmap_batch_fn()
374 st->va += XEN_PAGE_SIZE * nr; in mmap_batch_fn()
375 st->index += nr / XEN_PFN_PER_PAGE; in mmap_batch_fn()
384 if (st->version == 1) { in mmap_return_error()
388 ret = get_user(gfn, st->user_gfn); in mmap_return_error()
394 * limitations vis-a-vis 64 bit callers). in mmap_return_error()
396 gfn |= (err == -ENOENT) ? in mmap_return_error()
399 return __put_user(gfn, st->user_gfn++); in mmap_return_error()
401 st->user_gfn++; in mmap_return_error()
402 } else { /* st->version == 2 */ in mmap_return_error()
404 return __put_user(err, st->user_err++); in mmap_return_error()
406 st->user_err++; in mmap_return_error()
429 * Returns: 0 if success, otherwise -errno
438 return -ENOMEM; in alloc_empty_pages()
445 return -ENOMEM; in alloc_empty_pages()
447 BUG_ON(vma->vm_private_data != NULL); in alloc_empty_pages()
448 vma->vm_private_data = pages; in alloc_empty_pages()
458 struct privcmd_data *data = file->private_data; in privcmd_ioctl_mmap_batch()
461 struct mm_struct *mm = current->mm; in privcmd_ioctl_mmap_batch()
470 return -EFAULT; in privcmd_ioctl_mmap_batch()
471 /* Returns per-frame error in m.arr. */ in privcmd_ioctl_mmap_batch()
474 return -EFAULT; in privcmd_ioctl_mmap_batch()
478 return -EFAULT; in privcmd_ioctl_mmap_batch()
479 /* Returns per-frame error code in m.err. */ in privcmd_ioctl_mmap_batch()
481 return -EFAULT; in privcmd_ioctl_mmap_batch()
484 return -EINVAL; in privcmd_ioctl_mmap_batch()
488 if (data->domid != DOMID_INVALID && data->domid != m.dom) in privcmd_ioctl_mmap_batch()
489 return -EPERM; in privcmd_ioctl_mmap_batch()
493 return -EINVAL; in privcmd_ioctl_mmap_batch()
500 ret = -EINVAL; in privcmd_ioctl_mmap_batch()
507 ret = -EFAULT; in privcmd_ioctl_mmap_batch()
516 vma->vm_ops != &privcmd_vm_ops) { in privcmd_ioctl_mmap_batch()
517 ret = -EINVAL; in privcmd_ioctl_mmap_batch()
532 if (vma->vm_private_data == NULL) { in privcmd_ioctl_mmap_batch()
533 if (m.addr != vma->vm_start || in privcmd_ioctl_mmap_batch()
534 m.addr + (nr_pages << PAGE_SHIFT) != vma->vm_end) { in privcmd_ioctl_mmap_batch()
535 ret = -EINVAL; in privcmd_ioctl_mmap_batch()
543 vma->vm_private_data = PRIV_VMA_LOCKED; in privcmd_ioctl_mmap_batch()
545 if (m.addr < vma->vm_start || in privcmd_ioctl_mmap_batch()
546 m.addr + (nr_pages << PAGE_SHIFT) > vma->vm_end) { in privcmd_ioctl_mmap_batch()
547 ret = -EINVAL; in privcmd_ioctl_mmap_batch()
551 ret = -EINVAL; in privcmd_ioctl_mmap_batch()
579 /* If we have not had any EFAULT-like global errors then set the global in privcmd_ioctl_mmap_batch()
580 * error to -ENOENT if necessary. */ in privcmd_ioctl_mmap_batch()
581 if ((ret == 0) && (state.global_error == -ENOENT)) in privcmd_ioctl_mmap_batch()
582 ret = -ENOENT; in privcmd_ioctl_mmap_batch()
605 PAGE_SIZE) - off; in lock_pages()
607 return -ENOSPC; in lock_pages()
613 return page_count ? : -EFAULT; in lock_pages()
616 nr_pages -= page_count; in lock_pages()
633 struct privcmd_data *data = file->private_data; in privcmd_ioctl_dm_op()
644 return -EFAULT; in privcmd_ioctl_dm_op()
647 if (data->domid != DOMID_INVALID && data->domid != kdata.dom) in privcmd_ioctl_dm_op()
648 return -EPERM; in privcmd_ioctl_dm_op()
654 return -E2BIG; in privcmd_ioctl_dm_op()
658 return -ENOMEM; in privcmd_ioctl_dm_op()
662 rc = -EFAULT; in privcmd_ioctl_dm_op()
668 rc = -E2BIG; in privcmd_ioctl_dm_op()
674 rc = -EFAULT; in privcmd_ioctl_dm_op()
685 rc = -ENOMEM; in privcmd_ioctl_dm_op()
691 rc = -ENOMEM; in privcmd_ioctl_dm_op()
719 struct privcmd_data *data = file->private_data; in privcmd_ioctl_restrict()
723 return -EFAULT; in privcmd_ioctl_restrict()
726 if (data->domid == DOMID_INVALID) in privcmd_ioctl_restrict()
727 data->domid = dom; in privcmd_ioctl_restrict()
728 else if (data->domid != dom) in privcmd_ioctl_restrict()
729 return -EINVAL; in privcmd_ioctl_restrict()
737 struct privcmd_data *data = file->private_data; in privcmd_ioctl_mmap_resource()
738 struct mm_struct *mm = current->mm; in privcmd_ioctl_mmap_resource()
746 return -EFAULT; in privcmd_ioctl_mmap_resource()
749 if (data->domid != DOMID_INVALID && data->domid != kdata.dom) in privcmd_ioctl_mmap_resource()
750 return -EPERM; in privcmd_ioctl_mmap_resource()
754 return -EINVAL; in privcmd_ioctl_mmap_resource()
765 return __put_user(xdata.nr_frames, &udata->num); in privcmd_ioctl_mmap_resource()
771 if (!vma || vma->vm_ops != &privcmd_vm_ops) { in privcmd_ioctl_mmap_resource()
772 rc = -EINVAL; in privcmd_ioctl_mmap_resource()
778 rc = -ENOMEM; in privcmd_ioctl_mmap_resource()
792 pages = vma->vm_private_data; in privcmd_ioctl_mmap_resource()
801 vma->vm_private_data = PRIV_VMA_LOCKED; in privcmd_ioctl_mmap_resource()
827 vma->vm_page_prot, in privcmd_ioctl_mmap_resource()
857 return -EFAULT; in privcmd_ioctl_pcidev_get_gsi()
865 return -EFAULT; in privcmd_ioctl_pcidev_get_gsi()
869 return -EINVAL; in privcmd_ioctl_pcidev_get_gsi()
885 struct work_struct shutdown; member
895 list_del_init(&kirqfd->list); in irqfd_deactivate()
896 queue_work(irqfd_cleanup_wq, &kirqfd->shutdown); in irqfd_deactivate()
902 container_of(work, struct privcmd_kernel_irqfd, shutdown); in irqfd_shutdown()
908 eventfd_ctx_remove_wait_queue(kirqfd->eventfd, &kirqfd->wait, &cnt); in irqfd_shutdown()
909 eventfd_ctx_put(kirqfd->eventfd); in irqfd_shutdown()
918 eventfd_ctx_do_read(kirqfd->eventfd, &cnt); in irqfd_inject()
921 rc = HYPERVISOR_dm_op(kirqfd->dom, 1, &kirqfd->xbufs); in irqfd_inject()
925 if (rc && !kirqfd->error) { in irqfd_inject()
927 kirqfd->dom); in irqfd_inject()
930 kirqfd->error = rc; in irqfd_inject()
960 add_wait_queue_priority(wqh, &kirqfd->wait); in irqfd_poll_func()
971 CLASS(fd, f)(irqfd->fd); in privcmd_irqfd_assign()
973 kirqfd = kzalloc(sizeof(*kirqfd) + irqfd->size, GFP_KERNEL); in privcmd_irqfd_assign()
975 return -ENOMEM; in privcmd_irqfd_assign()
978 if (copy_from_user(dm_op, u64_to_user_ptr(irqfd->dm_op), irqfd->size)) { in privcmd_irqfd_assign()
979 ret = -EFAULT; in privcmd_irqfd_assign()
983 kirqfd->xbufs.size = irqfd->size; in privcmd_irqfd_assign()
984 set_xen_guest_handle(kirqfd->xbufs.h, dm_op); in privcmd_irqfd_assign()
985 kirqfd->dom = irqfd->dom; in privcmd_irqfd_assign()
986 INIT_WORK(&kirqfd->shutdown, irqfd_shutdown); in privcmd_irqfd_assign()
989 ret = -EBADF; in privcmd_irqfd_assign()
993 kirqfd->eventfd = eventfd_ctx_fileget(fd_file(f)); in privcmd_irqfd_assign()
994 if (IS_ERR(kirqfd->eventfd)) { in privcmd_irqfd_assign()
995 ret = PTR_ERR(kirqfd->eventfd); in privcmd_irqfd_assign()
1000 * Install our own custom wake-up handling so we are notified via a in privcmd_irqfd_assign()
1003 init_waitqueue_func_entry(&kirqfd->wait, irqfd_wakeup); in privcmd_irqfd_assign()
1004 init_poll_funcptr(&kirqfd->pt, irqfd_poll_func); in privcmd_irqfd_assign()
1009 if (kirqfd->eventfd == tmp->eventfd) { in privcmd_irqfd_assign()
1010 ret = -EBUSY; in privcmd_irqfd_assign()
1017 list_add_tail(&kirqfd->list, &irqfds_list); in privcmd_irqfd_assign()
1024 events = vfs_poll(fd_file(f), &kirqfd->pt); in privcmd_irqfd_assign()
1032 eventfd_ctx_put(kirqfd->eventfd); in privcmd_irqfd_assign()
1045 eventfd = eventfd_ctx_fdget(irqfd->fd); in privcmd_irqfd_deassign()
1052 if (kirqfd->eventfd == eventfd) { in privcmd_irqfd_deassign()
1063 * Block until we know all outstanding shutdown jobs have completed so in privcmd_irqfd_deassign()
1074 struct privcmd_data *data = file->private_data; in privcmd_ioctl_irqfd()
1078 return -EFAULT; in privcmd_ioctl_irqfd()
1082 return -EINVAL; in privcmd_ioctl_irqfd()
1085 if (data->domid != DOMID_INVALID && data->domid != irqfd.dom) in privcmd_ioctl_irqfd()
1086 return -EPERM; in privcmd_ioctl_irqfd()
1096 irqfd_cleanup_wq = alloc_workqueue("privcmd-irqfd-cleanup", 0, 0); in privcmd_irqfd_init()
1098 return -ENOMEM; in privcmd_irqfd_init()
1124 /* per-eventfd structure */
1133 /* per-guest CPU / port structure */
1140 /* per-guest structure */
1155 struct privcmd_kernel_ioreq *kioreq = port->kioreq; in ioeventfd_interrupt()
1156 struct ioreq *ioreq = &kioreq->ioreq[port->vcpu]; in ioeventfd_interrupt()
1160 if (ioreq->state != STATE_IOREQ_READY || in ioeventfd_interrupt()
1161 ioreq->type != IOREQ_TYPE_COPY || ioreq->dir != IOREQ_WRITE) in ioeventfd_interrupt()
1174 spin_lock(&kioreq->lock); in ioeventfd_interrupt()
1175 ioreq->state = STATE_IOREQ_INPROCESS; in ioeventfd_interrupt()
1177 list_for_each_entry(kioeventfd, &kioreq->ioeventfds, list) { in ioeventfd_interrupt()
1178 if (ioreq->addr == kioeventfd->addr + VIRTIO_MMIO_QUEUE_NOTIFY && in ioeventfd_interrupt()
1179 ioreq->size == kioeventfd->addr_len && in ioeventfd_interrupt()
1180 (ioreq->data & QUEUE_NOTIFY_VQ_MASK) == kioeventfd->vq) { in ioeventfd_interrupt()
1181 eventfd_signal(kioeventfd->eventfd); in ioeventfd_interrupt()
1186 spin_unlock(&kioreq->lock); in ioeventfd_interrupt()
1195 ioreq->state = state; in ioeventfd_interrupt()
1198 notify_remote_via_evtchn(port->port); in ioeventfd_interrupt()
1207 struct ioreq_port *ports = kioreq->ports; in ioreq_free()
1212 list_del(&kioreq->list); in ioreq_free()
1214 for (i = kioreq->vcpus - 1; i >= 0; i--) in ioreq_free()
1224 struct mm_struct *mm = current->mm; in alloc_ioreq()
1232 size = struct_size(kioreq, ports, ioeventfd->vcpus); in alloc_ioreq()
1235 return ERR_PTR(-ENOMEM); in alloc_ioreq()
1237 kioreq->dom = ioeventfd->dom; in alloc_ioreq()
1238 kioreq->vcpus = ioeventfd->vcpus; in alloc_ioreq()
1239 kioreq->uioreq = ioeventfd->ioreq; in alloc_ioreq()
1240 spin_lock_init(&kioreq->lock); in alloc_ioreq()
1241 INIT_LIST_HEAD(&kioreq->ioeventfds); in alloc_ioreq()
1245 vma = find_vma(mm, (unsigned long)ioeventfd->ioreq); in alloc_ioreq()
1249 ret = -EFAULT; in alloc_ioreq()
1253 pages = vma->vm_private_data; in alloc_ioreq()
1254 kioreq->ioreq = (struct ioreq *)(page_to_virt(pages[0])); in alloc_ioreq()
1257 ports = memdup_array_user(u64_to_user_ptr(ioeventfd->ports), in alloc_ioreq()
1258 kioreq->vcpus, sizeof(*ports)); in alloc_ioreq()
1264 for (i = 0; i < kioreq->vcpus; i++) { in alloc_ioreq()
1265 kioreq->ports[i].vcpu = i; in alloc_ioreq()
1266 kioreq->ports[i].port = ports[i]; in alloc_ioreq()
1267 kioreq->ports[i].kioreq = kioreq; in alloc_ioreq()
1271 &kioreq->ports[i]); in alloc_ioreq()
1278 list_add_tail(&kioreq->list, &ioreq_list); in alloc_ioreq()
1283 while (--i >= 0) in alloc_ioreq()
1284 unbind_from_irqhandler(irq_from_evtchn(ports[i]), &kioreq->ports[i]); in alloc_ioreq()
1305 if (kioreq->uioreq != ioeventfd->ioreq) { in get_ioreq()
1307 } else if (kioreq->dom != ioeventfd->dom || in get_ioreq()
1308 kioreq->vcpus != ioeventfd->vcpus) { in get_ioreq()
1310 kioreq->dom, ioeventfd->dom, kioreq->vcpus, in get_ioreq()
1311 ioeventfd->vcpus); in get_ioreq()
1312 return ERR_PTR(-EINVAL); in get_ioreq()
1316 spin_lock_irqsave(&kioreq->lock, flags); in get_ioreq()
1317 list_for_each_entry(kioeventfd, &kioreq->ioeventfds, list) { in get_ioreq()
1318 if (eventfd == kioeventfd->eventfd) { in get_ioreq()
1319 spin_unlock_irqrestore(&kioreq->lock, flags); in get_ioreq()
1320 return ERR_PTR(-EBUSY); in get_ioreq()
1323 spin_unlock_irqrestore(&kioreq->lock, flags); in get_ioreq()
1334 list_del(&kioeventfd->list); in ioeventfd_free()
1335 eventfd_ctx_put(kioeventfd->eventfd); in ioeventfd_free()
1347 if (ioeventfd->addr + ioeventfd->addr_len < ioeventfd->addr) in privcmd_ioeventfd_assign()
1348 return -EINVAL; in privcmd_ioeventfd_assign()
1351 if (!(ioeventfd->addr_len == 1 || ioeventfd->addr_len == 2 || in privcmd_ioeventfd_assign()
1352 ioeventfd->addr_len == 4 || ioeventfd->addr_len == 8)) in privcmd_ioeventfd_assign()
1353 return -EINVAL; in privcmd_ioeventfd_assign()
1356 if (!ioeventfd->vcpus || ioeventfd->vcpus > 4096) in privcmd_ioeventfd_assign()
1357 return -EINVAL; in privcmd_ioeventfd_assign()
1361 return -ENOMEM; in privcmd_ioeventfd_assign()
1363 kioeventfd->eventfd = eventfd_ctx_fdget(ioeventfd->event_fd); in privcmd_ioeventfd_assign()
1364 if (IS_ERR(kioeventfd->eventfd)) { in privcmd_ioeventfd_assign()
1365 ret = PTR_ERR(kioeventfd->eventfd); in privcmd_ioeventfd_assign()
1369 kioeventfd->addr = ioeventfd->addr; in privcmd_ioeventfd_assign()
1370 kioeventfd->addr_len = ioeventfd->addr_len; in privcmd_ioeventfd_assign()
1371 kioeventfd->vq = ioeventfd->vq; in privcmd_ioeventfd_assign()
1374 kioreq = get_ioreq(ioeventfd, kioeventfd->eventfd); in privcmd_ioeventfd_assign()
1381 spin_lock_irqsave(&kioreq->lock, flags); in privcmd_ioeventfd_assign()
1382 list_add_tail(&kioeventfd->list, &kioreq->ioeventfds); in privcmd_ioeventfd_assign()
1383 spin_unlock_irqrestore(&kioreq->lock, flags); in privcmd_ioeventfd_assign()
1390 eventfd_ctx_put(kioeventfd->eventfd); in privcmd_ioeventfd_assign()
1404 eventfd = eventfd_ctx_fdget(ioeventfd->event_fd); in privcmd_ioeventfd_deassign()
1415 if (kioreq->dom != ioeventfd->dom || in privcmd_ioeventfd_deassign()
1416 kioreq->uioreq != ioeventfd->ioreq || in privcmd_ioeventfd_deassign()
1417 kioreq->vcpus != ioeventfd->vcpus) in privcmd_ioeventfd_deassign()
1420 spin_lock_irqsave(&kioreq->lock, flags); in privcmd_ioeventfd_deassign()
1421 list_for_each_entry_safe(kioeventfd, tmp, &kioreq->ioeventfds, list) { in privcmd_ioeventfd_deassign()
1422 if (eventfd == kioeventfd->eventfd) { in privcmd_ioeventfd_deassign()
1424 spin_unlock_irqrestore(&kioreq->lock, flags); in privcmd_ioeventfd_deassign()
1426 if (list_empty(&kioreq->ioeventfds)) in privcmd_ioeventfd_deassign()
1431 spin_unlock_irqrestore(&kioreq->lock, flags); in privcmd_ioeventfd_deassign()
1436 ioeventfd->dom, ioeventfd->addr); in privcmd_ioeventfd_deassign()
1437 ret = -ENODEV; in privcmd_ioeventfd_deassign()
1448 struct privcmd_data *data = file->private_data; in privcmd_ioctl_ioeventfd()
1452 return -EFAULT; in privcmd_ioctl_ioeventfd()
1456 return -EINVAL; in privcmd_ioctl_ioeventfd()
1459 if (data->domid != DOMID_INVALID && data->domid != ioeventfd.dom) in privcmd_ioctl_ioeventfd()
1460 return -EPERM; in privcmd_ioctl_ioeventfd()
1477 spin_lock_irqsave(&kioreq->lock, flags); in privcmd_ioeventfd_exit()
1478 list_for_each_entry_safe(kioeventfd, tmp, &kioreq->ioeventfds, list) in privcmd_ioeventfd_exit()
1480 spin_unlock_irqrestore(&kioreq->lock, flags); in privcmd_ioeventfd_exit()
1489 return -EOPNOTSUPP; in privcmd_ioctl_irqfd()
1503 return -EOPNOTSUPP; in privcmd_ioctl_ioeventfd()
1514 int ret = -ENOTTY; in privcmd_ioctl()
1570 return -ENOMEM; in privcmd_open()
1573 data->domid = DOMID_INVALID; in privcmd_open()
1575 file->private_data = data; in privcmd_open()
1581 struct privcmd_data *data = file->private_data; in privcmd_release()
1589 struct page **pages = vma->vm_private_data; in privcmd_close()
1591 int numgfns = (vma->vm_end - vma->vm_start) >> XEN_PAGE_SHIFT; in privcmd_close()
1608 printk(KERN_DEBUG "privcmd_fault: vma=%p %lx-%lx, pgoff=%lx, uv=%p\n", in privcmd_fault()
1609 vmf->vma, vmf->vma->vm_start, vmf->vma->vm_end, in privcmd_fault()
1610 vmf->pgoff, (void *)vmf->address); in privcmd_fault()
1626 vma->vm_ops = &privcmd_vm_ops; in privcmd_mmap()
1627 vma->vm_private_data = NULL; in privcmd_mmap()
1639 return pte_none(ptep_get(pte)) ? 0 : -EBUSY; in is_mapped_fn()
1647 return apply_to_page_range(vma->vm_mm, addr, nr_pages << PAGE_SHIFT, in privcmd_vma_range_is_mapped()
1671 return -ENODEV; in privcmd_init()
1681 pr_err("Could not register Xen hypercall-buf device\n"); in privcmd_init()