RE: [RFCv2 PATCH 5/7] iommufd: Introduce data struct for AMD nested domain allocation

From: Tian, Kevin
Date: Mon Jan 22 2024 - 03:47:35 EST


> From: Suravee Suthikulpanit <suravee.suthikulpanit@xxxxxxx>
> Sent: Friday, January 12, 2024 8:07 AM
>
> +/**
> + * struct iommu_hwpt_amd_v2 - AMD IOMMU specific user-managed
> + * v2 I/O page table data
> + * @gcr3: GCR3 guest physical ddress
> + * @flags.glx: GCR3 table levels
> + * @flags.giov: GIOV mode
> + * @flags.guest_paging_mode: Guest v2 page table paging mode
> + * @flags.reserved : Must be 0
> + * @gdom_id: Guest domain ID
> + * @__reserved: Must be 0
> + */
> +struct iommu_hwpt_amd_v2 {
> + __aligned_u64 gcr3;
> + struct {
> + __aligned_u64 glx : 1,
> + giov : 1,

My impression was that giov allows non-PASID requests to be treated
as if tagged with pasid#0. kind of a prerequisite for enabling nested
translation? how does it work if guest disables it?

> + guest_paging_mode : 2,
> + reserved : 60;
> + } flags;
> + __u32 gdom_id;

this is not used in this series.