> From: Jason Gunthorpe <jgg@xxxxxxxxxx> > Sent: Thursday, October 10, 2024 12:23 AM > > Force Write Back (FWB) changes how the S2 IOPTE's MemAttr field > works. When S2FWB is supported and enabled the IOPTE will force cachable > access to IOMMU_CACHE memory when nesting with a S1 and deny cachable > access otherwise. didn't get the last part "deny cacheable access otherwise" > @@ -169,7 +169,8 @@ arm_smmu_domain_alloc_nesting(struct device *dev, > u32 flags, > * Must support some way to prevent the VM from bypassing the > cache > * because VFIO currently does not do any cache maintenance. > */ > - if (!arm_smmu_master_canwbs(master)) > + if (!arm_smmu_master_canwbs(master) && > + !(master->smmu->features & ARM_SMMU_FEAT_S2FWB)) > return ERR_PTR(-EOPNOTSUPP); Probably can clarify the difference between CANWBS and S2FWB here by copying some words from the previous commit message. especially about the part of PCI nosnoop. Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>