STRUCT IOMMU_VIOMMU_ALLOC(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

struct iommu_viommu_alloc β€” ioctl(IOMMU_VIOMMU_ALLOC) ✨

Okay so bestie, this is the struct iommu_viommu_alloc(9) page from the Kernel API Manual β€” and it's lowkey iconic because it's all about allocating a virtual IOMMU object πŸ’….


πŸ¦‹ SYNOPSIS πŸ¦‹

       struct iommu_viommu_alloc {
           __u32 size;
           __u32 flags;
           __u32 type;
           __u32 dev_id;
           __u32 hwpt_id;
           __u32 out_viommu_id;
           __u32 data_len;
           __u32 __reserved;
           __aligned_u64 data_uptr;
        };

πŸ’… Members πŸ’…

  • size β€” sizeof(struct iommu_viommu_alloc). Yes bestie, the size field is literally the size.
  • flags β€” Must be 0. Zero. Zilch. No flags energy allowed.
  • type β€” Type of the virtual IOMMU. Must be defined in enum iommu_viommu_type. No invented types, okay?
  • dev_id β€” The device's physical IOMMU will be used to back the virtual IOMMU. It's the physical support system for the virtual one.
  • hwpt_id β€” ID of a nesting parent HWPT to associate to.
  • out_viommu_id β€” Output virtual IOMMU ID for the allocated object. This is where the fresh ID pops out.
  • data_len β€” Length of the type specific data.
  • __reserved β€” Must be 0. Do not be cute and put a nonzero value here.
  • data_uptr β€” User pointer to a driver-specific virtual IOMMU data.

🌸 DESCRIPTION 🌸

Allocate a virtual IOMMU object, bestie. This object represents the underlying physical IOMMU's virtualization support: a security-isolated slice of the real IOMMU HW that is unique to a specific VM. Like, it's not a vibe, it's isolation πŸ’….

Operations global to the IOMMU are connected to the vIOMMU, such as:

  • Security namespace for guest owned ID, e.g. guest-controlled cache tags.
  • Non-device-affiliated event reporting, e.g. invalidation queue errors.
  • Access to a sharable nesting parent pagetable across physical IOMMUs.
  • Virtualization of various platforms IDs, e.g. RIDs and others.
  • Delivery of paravirtualized invalidation.
  • Direct assigned invalidation queues.
  • Direct assigned interrupts.

Periodt. No cap.


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./include/uapi/linux/iommufd.h; General ioctl format(9); struct iommu_destroy(9); struct iommu_ioas_alloc(9); struct iommu_iova_range(9); struct iommu_ioas_iova_ranges(9); struct iommu_ioas_allow_iovas(9); enum iommufd_ioas_map_flags(9); struct iommu_ioas_map(9); struct iommu_ioas_noiommu_get_pa(9); struct iommu_ioas_map_file(9); struct iommu_ioas_copy(9); struct iommu_ioas_unmap(9); enum iommufd_option(9); enum iommufd_option_ops(9); struct iommu_option(9); enum iommufd_vfio_ioas_op(9); struct iommu_vfio_ioas(9); enum iommufd_hwpt_alloc_flags(9); enum iommu_hwpt_vtd_s1_flags(9); struct iommu_hwpt_vtd_s1(9); struct iommu_hwpt_arm_smmuv3(9); struct iommu_hwpt_amd_guest(9); enum iommu_hwpt_data_type(9); struct iommu_hwpt_alloc(9); enum iommu_hw_info_vtd_flags(9); struct iommu_hw_info_vtd(9); enum iommu_hw_info_arm_smmuv3_flags(9); struct iommu_hw_info_arm_smmuv3(9); struct iommu_hw_info_tegra241_cmdqv(9); struct iommu_hw_info_amd(9); enum iommu_hw_info_type(9); enum iommufd_hw_capabilities(9); enum iommufd_hw_info_flags(9); struct iommu_hw_info(9); struct iommu_hwpt_set_dirty_tracking(9); enum iommufd_hwpt_get_dirty_bitmap_flags(9); struct iommu_hwpt_get_dirty_bitmap(9); enum iommu_hwpt_invalidate_data_type(9); enum iommu_hwpt_vtd_s1_invalidate_flags(9); struct iommu_hwpt_vtd_s1_invalidate(9); struct iommu_viommu_arm_smmuv3_invalidate(9); struct iommu_hwpt_invalidate(9); enum iommu_hwpt_pgfault_flags(9); enum iommu_hwpt_pgfault_perm(9); struct iommu_hwpt_pgfault(9); enum iommufd_page_response_code(9); struct iommu_hwpt_page_response(9); struct iommu_fault_alloc(9); enum iommu_viommu_type(9); struct iommu_viommu_tegra241_cmdqv(9); struct iommu_vdevice_alloc(9); struct iommu_ioas_change_process(9); enum iommu_veventq_flag(9); struct iommufd_vevent_header(9); enum iommu_veventq_type(9); struct iommu_vevent_arm_smmuv3(9); struct iommu_vevent_tegra241_cmdqv(9); struct iommu_veventq_alloc(9); enum iommu_hw_queue_type(9); struct iommu_hw_queue_alloc(9).


And that's the tea β˜•πŸ’–. Cute sign-off from source/version ./include/uapi/linux, dated October 2026 β€” struct iommu_viommu_alloc(9) out, slay πŸ’…βœ¨.

πŸ“¦ where this page comes from