Hi, Nico
On Wed, 26 Feb 2025 at 01:35, Nicolin Chen nicolinc@nvidia.com wrote:
Use it to store all vSMMU-related data. The vsid (Virtual Stream ID) will be the first use case. Since the vsid reader will be the eventq handler that already holds a streams_mutex, reuse that to fenche the vmaster too.
Also add a pair of arm_smmu_attach_prepare/commit_vmaster helpers to set or unset the master->vmaster point. Put these helpers inside the existing arm_smmu_attach_prepare/commit().
For identity/blocked ops that don't call arm_smmu_attach_prepare/commit(), add a simpler arm_smmu_master_clear_vmaster helper to unset the vmaster.
Reviewed-by: Jason Gunthorpe jgg@nvidia.com Reviewed-by: Pranjal Shrivastavat praan@google.com Signed-off-by: Nicolin Chen nicolinc@nvidia.com
+int arm_smmu_attach_prepare_vmaster(struct arm_smmu_attach_state *state,
struct arm_smmu_nested_domain *nested_domain)
+{
struct arm_smmu_vmaster *vmaster;
unsigned long vsid;
int ret;
iommu_group_mutex_assert(state->master->dev);
/* Skip invalid vSTE */
if (!(nested_domain->ste[0] & cpu_to_le64(STRTAB_STE_0_V)))
return 0;
Why this is removed in v9 and 6.15-rc1?
I tested 6.15-rc1 the qemu failed to boot with qemu branch: for_iommufd_veventq-v8 "failed to attach the bypass pagetable"
After adding this "skip check" back, the qemu works again.
Do we need to add this back?
Thanks