Hi Eric, On Wed, Feb 15, 2023 at 07:37:52PM +0100, Eric Auger wrote: > > Parse S2AFFD from STE and use it in stage-2 translation. > > > > This is described in the SMMUv3 manual "5.2. Stream Table Entry" in > > "[181] S2AFFD". > > from a patch structure pov, to me it would make more sense to add the > STE field decoding in > [RFC PATCH 06/16] hw/arm/smmuv3: Parse STE config for stage-2 and use it > in hw/arm/smmuv3: Add page table walk for stage-2 Yes, as all STE parsing will be in the same patch, it make sense to remove this one and AFFD in stage-2 PTW.
> > + * An Access fault takes priority over a Permission fault. > > + */ > > + if (!PTE_AF(pte) && !cfg->s2cfg.affd) { > > + info->type = SMMU_PTW_ERR_ACCESS; > Wondering how you are going to differentiate page faults at S1 versus > page faults at S2. > Event number #10 differentiates both and recorded fields are different. > > Do you handle that somewhere? Yes, this is missing, similar to F_TRANSLATION, we can set info->u.f_walk_eabt.s2 which would set S2[103] bit in the fault event. Thanks, Mostafa