IOMMU_DEVICE_QUERY_DOMAIN_TYPES callback function (wdm.h)

Queries for the available types of domains that an IOMMU_DMA_DEVICE is allowed to attach to, depending on environment factors, such as platform and DMA Guard Policy.

Syntax

IOMMU_DEVICE_QUERY_DOMAIN_TYPES IommuDeviceQueryDomainTypes;

void IommuDeviceQueryDomainTypes(
  PIOMMU_DMA_DEVICE DmaDevice,
  PULONG AvailableDomains
)
{...}

Parameters

DmaDevice

[In] A pointer to an opaque token representing the IOMMU_DMA_DEVICE.

AvailableDomains

[Out] Returns the current domain types that are available to be created and attached to. Each set bit represents an available domain type: (1 << IOMMU_DMA_DOMAIN_TYPE). See IOMMU_DMA_DOMAIN_TYPE.

Return value

None

Remarks

This can be used as a hint as to whether IOMMU_DOMAIN_ATTACH_DEVICE_EX will succeed.

If a device is not behind a DMA remapping compatible IOMMU, then no remapping domain will be available.

If DMA Guard is enabled, then passthrough domains may be available based on policy, i.e. whether the device is opted into DMA remapping, is connected externally, the screen lock state, etc.. If DMA Guard blocking is active, then passthrough domains will not be available and AvailableDomains & (1 << DomainTypePassThrough) will result in 0.

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.

Requirements

Requirement Value
Minimum supported server Windows Server 2022
Header wdm.h (include Wdm.h)

See also

IOMMU_DMA_DOMAIN_TYPE

IOMMU_DOMAIN_ATTACH_DEVICE_EX

IOMMU_REGISTER_INTERFACE_STATE_CHANGE_CALLBACK

DMA_IOMMU_INTERFACE_V2

DMA_IOMMU_INTERFACE_EX