[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] xen/arm: smmu: Set s2cr to type fault when the devices are deassigned



Hi Bertrand,

On 23/08/2022 11:34, Bertrand Marquis wrote:


On 12 Aug 2022, at 10:17, Julien Grall <julien@xxxxxxx> 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.singh@xxxxxxx>

Reviewed-by: Julien Grall <jgrall@xxxxxxxxxx>

Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>

@Julien: could you fix the NIT on commit ?

Yes. The patch is now committed.

Cheers,

--
Julien Grall



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.