// wdm.h
IOMMU_DEVICE_QUERY_DOMAIN_TYPES IommuDeviceQueryDomainTypes;
VOID IommuDeviceQueryDomainTypes(
PIOMMU_DMA_DEVICE DmaDevice,
PULONG AvailableDomains
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
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.
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.
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.
IOMMU_REGISTER_INTERFACE_STATE_CHANGE_CALLBACK