]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iommu/amd: Add support for hw_info for iommu capability query
authorSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Thu, 15 Jan 2026 06:08:02 +0000 (06:08 +0000)
committerJoerg Roedel <joerg.roedel@amd.com>
Sun, 18 Jan 2026 09:56:09 +0000 (10:56 +0100)
commit7d8b06ecc45bd679dec58d2cc2bd86223d4e076d
tree561a1c10f43260fffb1ed667499231192a4642f2
parent2e666595651ba02128b13e9029d5248cfc2fb702
iommu/amd: Add support for hw_info for iommu capability query

AMD IOMMU Extended Feature (EFR) and Extended Feature 2 (EFR2) registers
specify features supported by each IOMMU hardware instance.
The IOMMU driver checks each feature-specific bits before enabling
each feature at run time.

For IOMMUFD, the hypervisor passes the raw value of amd_iommu_efr and
amd_iommu_efr2 to VMM via iommufd IOMMU_DEVICE_GET_HW_INFO ioctl.

Reviewed-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-by: Vasant Hegde <vasant.hegde@amd.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
drivers/iommu/amd/Kconfig
drivers/iommu/amd/Makefile
drivers/iommu/amd/iommu.c
drivers/iommu/amd/iommufd.c [new file with mode: 0644]
drivers/iommu/amd/iommufd.h [new file with mode: 0644]
include/uapi/linux/iommufd.h