/openbmc/qemu/backends/ |
H A D | trace-events | 9 # iommufd.c 13 …mmufd_backend_map_dma(int iommufd, uint32_t ioas, uint64_t iova, uint64_t size, void *vaddr, bool … 14 …nd_unmap_dma_non_exist(int iommufd, uint32_t ioas, uint64_t iova, uint64_t size, int ret) " Unmap … 15 iommufd_backend_unmap_dma(int iommufd, uint32_t ioas, uint64_t iova, uint64_t size, int ret) " iomm… 16 iommufd_backend_alloc_ioas(int iommufd, uint32_t ioas) " iommufd=%d ioas=%d" 17 … iommufd, uint32_t dev_id, uint32_t pt_id, uint32_t flags, uint32_t hwpt_type, uint32_t len, uint6… 18 iommufd_backend_free_id(int iommufd, uint32_t id, int ret) " iommufd=%d id=%d (%d)" 19 iommufd_backend_set_dirty(int iommufd, uint32_t hwpt_id, bool start, int ret) " iommufd=%d hwpt=%u … 20 …backend_get_dirty_bitmap(int iommufd, uint32_t hwpt_id, uint64_t iova, uint64_t size, uint64_t pag…
|
H A D | meson.build | 29 system_ss.add(when: 'CONFIG_IOMMUFD', if_true: files('iommufd.c'))
|
/openbmc/qemu/docs/devel/ |
H A D | vfio-iommufd.rst | 7 With the introduction of iommufd, the Linux kernel provides a generic 10 the new iommufd interface is device-centric, relying on device fd and iommufd. 13 to abstract the common part of VFIO legacy and iommufd container. So that the 18 specific to either legacy or iommufd. Each container has its own way to setup 38 | iommufd | | vfio legacy | 52 iommufd | | vfio | 62 - iommufd BE: uses device fd and iommufd to setup secure context 69 - iommufd BE: device fd is opened through ``/dev/vfio/devices/vfioX`` 76 * iommufd BE: uses iommufd 90 Interactions with the ``/dev/iommu`` are abstracted by a new iommufd [all …]
|
H A D | index-internals.rst | 21 vfio-iommufd
|
/openbmc/linux/drivers/vfio/ |
H A D | device_cdev.c | 71 if (bind.argsz < minsz || bind.flags || bind.iommufd < 0) in vfio_df_ioctl_bind_iommufd() 89 df->iommufd = iommufd_ctx_from_fd(bind.iommufd); in vfio_df_ioctl_bind_iommufd() 90 if (IS_ERR(df->iommufd)) { in vfio_df_ioctl_bind_iommufd() 91 ret = PTR_ERR(df->iommufd); in vfio_df_ioctl_bind_iommufd() 92 df->iommufd = NULL; in vfio_df_ioctl_bind_iommufd() 126 iommufd_ctx_put(df->iommufd); in vfio_df_ioctl_bind_iommufd() 127 df->iommufd = NULL; in vfio_df_ioctl_bind_iommufd() 149 iommufd_ctx_put(df->iommufd); in vfio_df_unbind_iommufd()
|
H A D | group.c | 67 return group->container || group->iommufd; in vfio_group_has_iommu() 92 if (group->iommufd) { in vfio_group_ioctl_unset_container() 93 iommufd_ctx_put(group->iommufd); in vfio_group_ioctl_unset_container() 94 group->iommufd = NULL; in vfio_group_ioctl_unset_container() 106 struct iommufd_ctx *iommufd; in vfio_group_ioctl_set_container() local 134 iommufd = iommufd_ctx_from_file(f.file); in vfio_group_ioctl_set_container() 135 if (!IS_ERR(iommufd)) { in vfio_group_ioctl_set_container() 138 ret = iommufd_vfio_compat_set_no_iommu(iommufd); in vfio_group_ioctl_set_container() 140 ret = iommufd_vfio_compat_ioas_create(iommufd); in vfio_group_ioctl_set_container() 143 iommufd_ctx_put(iommufd); in vfio_group_ioctl_set_container() [all …]
|
H A D | Makefile | 8 vfio-$(CONFIG_IOMMUFD) += iommufd.o
|
H A D | vfio_main.c | 462 struct iommufd_ctx *iommufd = df->iommufd; in vfio_df_device_first_open() local 470 if (iommufd) in vfio_df_device_first_open() 485 if (iommufd) in vfio_df_device_first_open() 497 struct iommufd_ctx *iommufd = df->iommufd; in vfio_df_device_last_close() local 503 if (iommufd) in vfio_df_device_last_close()
|
H A D | vfio.h | 27 struct iommufd_ctx *iommufd; /* protected by struct vfio_device_set::lock */ member 94 struct iommufd_ctx *iommufd; member
|
H A D | iommufd.c | 24 struct iommufd_ctx *ictx = df->iommufd; in vfio_df_iommufd_bind()
|
H A D | Kconfig | 24 /dev/vfio/devices/vfioX, and then bind the device fd with an iommufd
|
/openbmc/qemu/hw/vfio/ |
H A D | iommufd.c | 69 IOMMUFDBackend *iommufd = vbasedev->iommufd; in iommufd_cdev_connect_and_bind() local 75 if (!iommufd_backend_connect(iommufd, errp)) { in iommufd_cdev_connect_and_bind() 89 bind.iommufd = iommufd->fd; in iommufd_cdev_connect_and_bind() 92 vbasedev->fd, bind.iommufd); in iommufd_cdev_connect_and_bind() 97 trace_iommufd_cdev_connect_and_bind(bind.iommufd, vbasedev->name, in iommufd_cdev_connect_and_bind() 103 iommufd_backend_disconnect(iommufd); in iommufd_cdev_connect_and_bind() 111 iommufd_backend_disconnect(vbasedev->iommufd); in iommufd_cdev_unbind_and_disconnect() 241 int iommufd = vbasedev->iommufd->fd; in iommufd_cdev_attach_ioas_hwpt() local 252 iommufd, vbasedev->name, vbasedev->fd, id); in iommufd_cdev_attach_ioas_hwpt() 256 trace_iommufd_cdev_attach_ioas_hwpt(iommufd, vbasedev->name, in iommufd_cdev_attach_ioas_hwpt() [all …]
|
H A D | trace-events | 173 #iommufd.c 175 iommufd_cdev_connect_and_bind(int iommufd, const char *name, int devfd, int devid) " [iommufd=%d] S… 177 iommufd_cdev_attach_ioas_hwpt(int iommufd, const char *name, int devfd, int id) " [iommufd=%d] Succ… 178 iommufd_cdev_detach_ioas_hwpt(int iommufd, const char *name) " [iommufd=%d] Successfully detached %… 180 iommufd_cdev_alloc_ioas(int iommufd, int ioas_id) " [iommufd=%d] new IOMMUFD container with ioasid=…
|
H A D | meson.build | 12 'iommufd.c',
|
H A D | ap.c | 197 DEFINE_PROP_LINK("iommufd", VFIOAPDevice, vdev.iommufd,
|
/openbmc/linux/Documentation/userspace-api/ |
H A D | iommufd.rst | 19 At minimum iommufd provides universal support of managing I/O address spaces and 24 small letter (iommufd) refers to the file descriptors created via /dev/iommu for 41 - IOMMUFD_OBJ_DEVICE, representing a device that is bound to iommufd by an 53 datastructures (external to iommufd), with numbers referred to operations 57 | iommufd | 85 1. IOMMUFD_OBJ_IOAS is created via the IOMMU_IOAS_ALLOC uAPI. An iommufd can 91 to bind a device to an iommufd. The driver is expected to implement a set of 113 A device can only bind to an iommufd due to DMA ownership claim and attach to at 169 devices managed by different subsystems are bound to a same iommufd. 174 .. kernel-doc:: include/uapi/linux/iommufd.h [all …]
|
H A D | index.rst | 29 iommufd
|
/openbmc/linux/drivers/iommu/iommufd/ |
H A D | Makefile | 2 iommufd-y := \ 11 iommufd-$(CONFIG_IOMMUFD_TEST) += selftest.o 13 obj-$(CONFIG_IOMMUFD) += iommufd.o
|
/openbmc/linux/tools/testing/selftests/iommu/ |
H A D | .gitignore | 2 /iommufd
|
H A D | iommufd.c | 53 FIXTURE(iommufd) in FIXTURE() argument 58 FIXTURE_SETUP(iommufd) in FIXTURE_SETUP() argument 64 FIXTURE_TEARDOWN(iommufd) in FIXTURE_TEARDOWN() argument 69 TEST_F(iommufd, simple_close) in TEST_F() argument 73 TEST_F(iommufd, cmd_fail) in TEST_F() argument 87 TEST_F(iommufd, cmd_length) in TEST_F() argument 128 TEST_F(iommufd, cmd_ex_fail) in TEST_F() argument 148 TEST_F(iommufd, global_options) in TEST_F() argument 1419 TEST_F(iommufd, simple_ioctls) in TEST_F() argument 1425 TEST_F(iommufd, unmap_cmd) in TEST_F() argument [all …]
|
H A D | Makefile | 8 TEST_GEN_PROGS += iommufd
|
/openbmc/linux/drivers/iommu/ |
H A D | Makefile | 2 obj-y += amd/ intel/ arm/ iommufd/
|
/openbmc/linux/Documentation/driver-api/ |
H A D | vfio.rst | 329 the device except binding the cdev_fd to an iommufd. After that point 353 iommufd = open("/dev/iommu", O_RDWR); 355 bind.iommufd = iommufd; 358 ioctl(iommufd, IOMMU_IOAS_ALLOC, &alloc_data); 369 ioctl(iommufd, IOMMU_IOAS_MAP, &map); 448 and unbound from iommufd. 451 and detached from an IOAS managed by the bound iommufd. However, the 453 unbound from iommufd.
|
/openbmc/qemu/scripts/ |
H A D | update-linux-headers.sh | 203 vduse.h iommufd.h bits.h; do
|
/openbmc/qemu/include/hw/vfio/ |
H A D | vfio-common.h | 150 IOMMUFDBackend *iommufd; member
|