Hi Zhenzhong,
On 2/19/25 9:22 AM, Zhenzhong Duan wrote: > Signed-off-by: Zhenzhong Duan <zhenzhong.d...@intel.com> > --- > include/system/host_iommu_device.h | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/include/system/host_iommu_device.h > b/include/system/host_iommu_device.h > index df782598f2..18f8b5e5cf 100644 > --- a/include/system/host_iommu_device.h > +++ b/include/system/host_iommu_device.h > @@ -22,10 +22,16 @@ > * > * @hw_caps: host platform IOMMU capabilities (e.g. on IOMMUFD this > represents > * the @out_capabilities value returned from IOMMU_GET_HW_INFO > ioctl) > + * > + * @nesting: nesting page table support. > + * > + * @fs1gp: first stage(a.k.a, Stage-1) 1GB huge page support. > */ > typedef struct HostIOMMUDeviceCaps { > uint32_t type; > uint64_t hw_caps; > + bool nesting; > + bool fs1gp; this looks quite vtd specific, isn't it? Shouldn't we hide this is a vendor specific cap struct? > } HostIOMMUDeviceCaps; > > #define TYPE_HOST_IOMMU_DEVICE "host-iommu-device" > @@ -122,6 +128,8 @@ struct HostIOMMUDeviceClass { > */ > #define HOST_IOMMU_DEVICE_CAP_IOMMU_TYPE 0 > #define HOST_IOMMU_DEVICE_CAP_AW_BITS 1 > +#define HOST_IOMMU_DEVICE_CAP_NESTING 2 > +#define HOST_IOMMU_DEVICE_CAP_FS1GP 3 > > #define HOST_IOMMU_DEVICE_CAP_AW_BITS_MAX 64 > #endif Maybe you could introduce the associated implementation of hiod_iommufd_get_cap in this patch too? Eric