aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/xen/gntdev
Commit message (Collapse)AuthorAgeFilesLines
* xen: fix gntdevRoger Pau Monné2018-05-021-7/+18
| | | | | | | | | | | | | | | | | | | | | | | Current interface to the gntdev in FreeBSD is wrong, and mostly worked out of luck before the PTI FreeBSD fixes, when kernel and user-space where sharing the same page tables. On FreeBSD ioctls have the size of the passed struct encoded in the ioctl number, because the generic ioctl handler in the OS takes care of copying the data from user-space to kernel space, and then calls the device specific ioctl handler. Thus using ioctl structs with variable sizes is not possible. The fix is to turn the array of structs at the end of ioctl_gntdev_alloc_gref and ioctl_gntdev_map_grant_ref into pointers, that can be properly accessed from the kernel gntdev driver using the copyin/copyout functions. Note that this is exactly how it's done for the privcmd driver. Sponsored by: Citrix Systems R&D Notes: svn path=/head/; revision=333169
* Remove unneeded include of vm_phys.h.Gleb Smirnoff2017-04-171-1/+0
| | | | Notes: svn path=/head/; revision=317053
* xen/gntdev: prevent unsynchronized accesses to the map entryRoger Pau Monné2017-02-271-6/+14
| | | | | | | | | | | | | vm_map_lookup_done should only be called when the gntdev has finished poking at the entry. Reported by: alc Reviewed by: alc MFC after: 1 week Sponsored by: Citrix Systems R&D Notes: svn path=/head/; revision=314340
* xen/gndev: use UOFF_TO_IDX instead of OFF_TO_IDXRoger Pau Monné2017-02-231-4/+4
| | | | | | | | | | | | The Xen grant table device treats the mmap offset parameter as an unsigned type, and as so it must use the newly introduced UOFF_TO_IDX. Sponsored by: Citrix Systems R&D MFC after: 2 weeks X-MFC-with: r313690 Notes: svn path=/head/; revision=314138
* xen: add a grant-table user-space deviceRoger Pau Monné2016-10-311-0/+1275
A grant-table user-space device will allow user-space applications to map and share grants (Xen way to share memory) among Xen domains. This grant table user-space device has been tested with the QEMU Qdisk Xen backed. Submitted by: jaggi Reviewed by: royger Differential review: https://reviews.freebsd.org/D7293 Notes: svn path=/head/; revision=308128