Skip to content

Commit e05698c

Browse files
ssuthiku-amdjoergroedel
authored andcommitted
iommufd: Introduce data struct for AMD nested domain allocation
Introduce IOMMU_HWPT_DATA_AMD_GUEST data type for IOMMU guest page table, which is used for stage-1 in nested translation. The data structure contains information necessary for setting up the AMD HW-vIOMMU support. Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Nicolin Chen <nicolinc@nvidia.com> Reviewed-by: Vasant Hegde <vasant.hegde@amd.com> Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
1 parent 9b467a5 commit e05698c

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

include/uapi/linux/iommufd.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,16 +465,27 @@ struct iommu_hwpt_arm_smmuv3 {
465465
__aligned_le64 ste[2];
466466
};
467467

468+
/**
469+
* struct iommu_hwpt_amd_guest - AMD IOMMU guest I/O page table data
470+
* (IOMMU_HWPT_DATA_AMD_GUEST)
471+
* @dte: Guest Device Table Entry (DTE)
472+
*/
473+
struct iommu_hwpt_amd_guest {
474+
__aligned_u64 dte[4];
475+
};
476+
468477
/**
469478
* enum iommu_hwpt_data_type - IOMMU HWPT Data Type
470479
* @IOMMU_HWPT_DATA_NONE: no data
471480
* @IOMMU_HWPT_DATA_VTD_S1: Intel VT-d stage-1 page table
472481
* @IOMMU_HWPT_DATA_ARM_SMMUV3: ARM SMMUv3 Context Descriptor Table
482+
* @IOMMU_HWPT_DATA_AMD_GUEST: AMD IOMMU guest page table
473483
*/
474484
enum iommu_hwpt_data_type {
475485
IOMMU_HWPT_DATA_NONE = 0,
476486
IOMMU_HWPT_DATA_VTD_S1 = 1,
477487
IOMMU_HWPT_DATA_ARM_SMMUV3 = 2,
488+
IOMMU_HWPT_DATA_AMD_GUEST = 3,
478489
};
479490

480491
/**

0 commit comments

Comments
 (0)