Lines Matching +full:enum +full:- +full:as +full:- +full:flags

1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 /* Copyright (c) 2021-2022, NVIDIA CORPORATION & AFFILIATES.
16 * ioctl is passed in a structure pointer as the argument providing the size of
23 * - ENOTTY: The IOCTL number itself is not supported at all
24 * - E2BIG: The IOCTL number is supported, but the provided structure has
25 * non-zero in a part the kernel does not understand.
26 * - EOPNOTSUPP: The IOCTL number is supported, and the structure is
29 * - EINVAL: Everything about the IOCTL was understood, but a field is not
31 * - ENOENT: An ID or IOVA provided does not exist.
32 * - ENOMEM: Out of memory.
33 * - EOVERFLOW: Mathematics overflowed.
35 * As well as additional errnos, within specific ioctls.
37 enum {
56 * struct iommu_destroy - ioctl(IOMMU_DESTROY)
69 * struct iommu_ioas_alloc - ioctl(IOMMU_IOAS_ALLOC)
71 * @flags: Must be 0
79 __u32 flags; member
85 * struct iommu_iova_range - ioctl(IOMMU_IOVA_RANGE)
97 * struct iommu_ioas_iova_ranges - ioctl(IOMMU_IOAS_IOVA_RANGES)
107 * the allowed_iovas[] will be filled in as space permits.
117 * the total number of iovas filled in. The ioctl will return -EMSGSIZE and set
119 * caller should allocate a larger output array and re-issue the ioctl.
141 * struct iommu_ioas_allow_iovas - ioctl(IOMMU_IOAS_ALLOW_IOVAS)
153 * When an IOAS is first created the IOVA_RANGES will be maximally sized, and as
173 * enum iommufd_ioas_map_flags - Flags for map and copy
179 enum iommufd_ioas_map_flags {
186 * struct iommu_ioas_map - ioctl(IOMMU_IOAS_MAP)
188 * @flags: Combination of enum iommufd_ioas_map_flags
194 * then this must be provided as input.
206 __u32 flags; member
216 * struct iommu_ioas_copy - ioctl(IOMMU_IOAS_COPY)
218 * @flags: Combination of enum iommufd_ioas_map_flags
223 * set then this must be provided as input.
230 * This may be used to efficiently clone a subset of an IOAS to another, or as a
232 * establishing equivalent new mappings, as internal resources are shared, and
237 __u32 flags; member
247 * struct iommu_ioas_unmap - ioctl(IOMMU_IOAS_UNMAP)
267 * enum iommufd_option - ioctl(IOMMU_OPTION_RLIMIT_MODE) and
276 * PAGE_SIZE. This can be useful for benchmarking. This is a per-IOAS
279 enum iommufd_option {
285 * enum iommufd_option_ops - ioctl(IOMMU_OPTION_OP_SET) and
290 enum iommufd_option_ops {
296 * struct iommu_option - iommu option multiplexer
298 * @option_id: One of enum iommufd_option
299 * @op: One of enum iommufd_option_ops
319 * enum iommufd_vfio_ioas_op - IOMMU_VFIO_IOAS_* ioctls
324 enum iommufd_vfio_ioas_op {
331 * struct iommu_vfio_ioas - ioctl(IOMMU_VFIO_IOAS)
335 * @op: One of enum iommufd_vfio_ioas_op
343 * this ioctl. SET or CLEAR does not destroy any auto-created IOAS.
354 * enum iommufd_hwpt_alloc_flags - Flags for HWPT allocation
355 * @IOMMU_HWPT_ALLOC_NEST_PARENT: If set, allocate a HWPT that can serve as
360 enum iommufd_hwpt_alloc_flags {
366 * enum iommu_hwpt_vtd_s1_flags - Intel VT-d stage-1 page table
372 enum iommu_hwpt_vtd_s1_flags {
379 * struct iommu_hwpt_vtd_s1 - Intel VT-d stage-1 page table
381 * @flags: Combination of enum iommu_hwpt_vtd_s1_flags
382 * @pgtbl_addr: The base address of the stage-1 page table.
383 * @addr_width: The address width of the stage-1 page table
387 __aligned_u64 flags; member
394 * enum iommu_hwpt_data_type - IOMMU HWPT Data Type
396 * @IOMMU_HWPT_DATA_VTD_S1: Intel VT-d stage-1 page table
398 enum iommu_hwpt_data_type {
404 * struct iommu_hwpt_alloc - ioctl(IOMMU_HWPT_ALLOC)
406 * @flags: Combination of enum iommufd_hwpt_alloc_flags
411 * @data_type: One of enum iommu_hwpt_data_type
419 * A kernel-managed HWPT will be created with the mappings from the given
421 * IOMMU_HWPT_DATA_NONE. The HWPT can be allocated as a parent HWPT for a
422 * nesting configuration by passing IOMMU_HWPT_ALLOC_NEST_PARENT via @flags.
424 * A user-managed nested HWPT will be created from a given parent HWPT via
427 * must be set to a pre-defined type corresponding to an I/O page table
436 __u32 flags; member
448 * enum iommu_hw_info_vtd_flags - Flags for VT-d hw_info
449 * @IOMMU_HW_INFO_VTD_ERRATA_772415_SPR17: If set, disallow read-only mappings
451 … https://www.intel.com/content/www/us/en/content-details/772415/content-details.ht…
453 enum iommu_hw_info_vtd_flags {
458 * struct iommu_hw_info_vtd - Intel VT-d hardware information
460 * @flags: Combination of enum iommu_hw_info_vtd_flags
463 * @cap_reg: Value of Intel VT-d capability register defined in VT-d spec
465 * @ecap_reg: Value of Intel VT-d capability register defined in VT-d spec
468 * User needs to understand the Intel VT-d specification to decode the
472 __u32 flags; member
479 * enum iommu_hw_info_type - IOMMU Hardware Info Types
482 * @IOMMU_HW_INFO_TYPE_INTEL_VTD: Intel VT-d iommu info type
484 enum iommu_hw_info_type {
490 * enum iommufd_hw_capabilities
499 enum iommufd_hw_capabilities {
504 * struct iommu_hw_info - ioctl(IOMMU_GET_HW_INFO)
506 * @flags: Must be 0
510 * @data_uptr: User pointer to a user-space buffer used by the kernel to fill
512 * @out_data_type: Output the iommu hardware info type as defined in the enum
514 * @out_capabilities: Output the generic iommu capability info type as defined
515 * in the enum iommu_hw_capabilities.
522 * a guest stage-1 page table can be compatible with the physical iommu.
534 __u32 flags; member
545 * enum iommufd_hwpt_set_dirty_tracking_flags - Flags for steering dirty
549 enum iommufd_hwpt_set_dirty_tracking_flags {
554 * struct iommu_hwpt_set_dirty_tracking - ioctl(IOMMU_HWPT_SET_DIRTY_TRACKING)
556 * @flags: Combination of enum iommufd_hwpt_set_dirty_tracking_flags
564 __u32 flags; member
572 * enum iommufd_hwpt_get_dirty_bitmap_flags - Flags for getting dirty bits
580 enum iommufd_hwpt_get_dirty_bitmap_flags {
585 * struct iommu_hwpt_get_dirty_bitmap - ioctl(IOMMU_HWPT_GET_DIRTY_BITMAP)
588 * @flags: Combination of enum iommufd_hwpt_get_dirty_bitmap_flags
607 __u32 flags; member
618 * enum iommu_hwpt_invalidate_data_type - IOMMU HWPT Cache Invalidation
622 enum iommu_hwpt_invalidate_data_type {
627 * enum iommu_hwpt_vtd_s1_invalidate_flags - Flags for Intel VT-d
628 * stage-1 cache invalidation
630 * to all-levels page structure cache or just
633 enum iommu_hwpt_vtd_s1_invalidate_flags {
638 * struct iommu_hwpt_vtd_s1_invalidate - Intel VT-d cache invalidation
643 * @flags: Combination of enum iommu_hwpt_vtd_s1_invalidate_flags
646 * The Intel VT-d specific invalidation data for user-managed stage-1 cache
648 * tell the impacted cache scope after modifying the stage-1 page table.
658 __u32 flags; member
663 * struct iommu_hwpt_invalidate - ioctl(IOMMU_HWPT_INVALIDATE)
666 * @data_uptr: User pointer to an array of driver-specific cache invalidation
668 * @data_type: One of enum iommu_hwpt_invalidate_data_type, defining the data
676 * Invalidate the iommu cache for user-managed page table. Modifications on a
677 * user-managed page table should be followed by this operation to sync cache.