IOMMU_DOMAIN_ATTACH_DEVICE_EX - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// wdm.h

IOMMU_DOMAIN_ATTACH_DEVICE_EX IommuDomainAttachDeviceEx;

NTSTATUS IommuDomainAttachDeviceEx(
  PIOMMU_DMA_DOMAIN Domain,
  PIOMMU_DMA_DEVICE DmaDevice
)
{...}
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nc-wdm-iommu_domain_attach_device_ex)

Description

Attaches an IOMMU_DMA_DEVICE to an existing DMA device domain.

Parameters

Domain

[In] A handle to the domain that the IOMMU_DMA_DEVICE will attach to.

DmaDevice

[In] A pointer to the IOMMU_DMA_DEVICE to be attached.

Return value

STATUS_SUCCESS if the operation is successful. Possible error return values include the following status codes.

Return code Description
STATUS_INSUFFICIENT_RESOURCES The routine failed to allocate required resources.
STATUS_INVALID_PARAMETER The device is already attached to a domain.
STATUS_ACCESS_DENIED The device is currently not allowed to attach to this domain type.

For more information, see NTSTATUS Values.

Remarks

The caller is responsible for ensuring that the IOMMU_DMA_DEVICE is first detached, using IOMMU_DOMAIN_DETACH_DEVICE_EX, from any previously attached domain before attempting to attach it to another domain.

It is the driver's responsibility to ensure that this function is not called concurrently with any IOMMU_DOMAIN_DETACH_DEVICE_EX or IOMMU_SET_DEVICE_FAULT_REPORTING_EX calls on the same device.

If STATUS_ACCESS_DENIED is returned, then it is likely the domain type is not currently available for the device to attach to. It is recommended to utilize IOMMU_DEVICE_QUERY_DOMAIN_TYPES to determine what domain types are available for the specified device. The types available can vary depending on the DMA Guard policy and the device characteristics. To be notified of when domain types are available, consider using IOMMU_REGISTER_INTERFACE_STATE_CHANGE_CALLBACK to register a notification callback whenever the available domain types change.

See also

IOMMU_DOMAIN_DETACH_DEVICE_EX

IOMMU_SET_DEVICE_FAULT_REPORTING_EX

IOMMU_DEVICE_QUERY_DOMAIN_TYPES

IOMMU_REGISTER_INTERFACE_STATE_CHANGE_CALLBACK

DMA_IOMMU_INTERFACE_V2

DMA_IOMMU_INTERFACE_EX