Hi Bertrand,
On 23/08/2022 11:34, Bertrand Marquis wrote:
On 12 Aug 2022, at 10:17, Julien Grall <jul...@xen.org> wrote:
Hi Rahul,
On 11/08/2022 16:42, Rahul Singh wrote:
When devices are deassigned/assigned, SMMU global fault is observed
because SMEs are freed in detach function and not allocated again when
the device is assigned back to the guest.
Don't free the SMEs when devices are deassigned, set the s2cr to type
fault. This way the SMMU will generate a fault if a DMA access is done
by a device not assigned to a guest.
Remove the arm_smmu_master_free_smes() as this is not needed anymore,
arm_smmu_write_s2cr will be used to set the s2cr to type fault.
NIT: I would write arm_smmu_write_s2cr() so it is consistent with the line
above.
Fixes: 0435784cc75d ("xen/arm: smmuv1: Intelligent SMR allocation")
Signed-off-by: Rahul Singh <rahul.si...@arm.com>
Reviewed-by: Julien Grall <jgr...@amazon.com>
Reviewed-by: Bertrand Marquis <bertrand.marq...@arm.com>
@Julien: could you fix the NIT on commit ?
Yes. The patch is now committed.
Cheers,
--
Julien Grall