Commit d269ab61 authored by Vasant Hegde's avatar Vasant Hegde Committed by Joerg Roedel
Browse files

iommu/amd/iommu_v2: Clear pasid state in free path



Clear pasid state in device amd_iommu_free_device() path. It will make
sure no new ppr notifier is registered in free path.

Suggested-by: default avatarJason Gunthorpe <jgg@nvidia.com>
Signed-off-by: default avatarVasant Hegde <vasant.hegde@amd.com>
Link: https://lore.kernel.org/r/20230609105146.7773-3-vasant.hegde@amd.com


Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 534103bc
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -327,6 +327,9 @@ static void free_pasid_states(struct device_state *dev_state)

		put_pasid_state(pasid_state);

		/* Clear the pasid state so that the pasid can be re-used */
		clear_pasid_state(dev_state, pasid_state->pasid);

		/*
		 * This will call the mn_release function and
		 * unbind the PASID