#define pr_fmt(fmt) …
#define dev_fmt(fmt) …
#include <linux/iommu.h>
#include <linux/mm_types.h>
#include "amd_iommu.h"
static inline bool is_pasid_enabled(struct iommu_dev_data *dev_data)
{ … }
static inline bool is_pasid_valid(struct iommu_dev_data *dev_data,
ioasid_t pasid)
{ … }
static void remove_dev_pasid(struct pdom_dev_data *pdom_dev_data)
{ … }
static void remove_pdom_dev_pasid(struct protection_domain *pdom,
struct device *dev, ioasid_t pasid)
{ … }
static void sva_arch_invalidate_secondary_tlbs(struct mmu_notifier *mn,
struct mm_struct *mm,
unsigned long start, unsigned long end)
{ … }
static void sva_mn_release(struct mmu_notifier *mn, struct mm_struct *mm)
{ … }
static const struct mmu_notifier_ops sva_mn = …;
int iommu_sva_set_dev_pasid(struct iommu_domain *domain,
struct device *dev, ioasid_t pasid)
{ … }
void amd_iommu_remove_dev_pasid(struct device *dev, ioasid_t pasid,
struct iommu_domain *domain)
{ … }
static void iommu_sva_domain_free(struct iommu_domain *domain)
{ … }
static const struct iommu_domain_ops amd_sva_domain_ops = …;
struct iommu_domain *amd_iommu_domain_alloc_sva(struct device *dev,
struct mm_struct *mm)
{ … }