#define pr_fmt(fmt) …
#include <linux/bitops.h>
#include <linux/cpufeature.h>
#include <linux/dmar.h>
#include <linux/iommu.h>
#include <linux/memory.h>
#include <linux/pci.h>
#include <linux/pci-ats.h>
#include <linux/spinlock.h>
#include "iommu.h"
#include "pasid.h"
#include "../iommu-pages.h"
u32 intel_pasid_max_id = …;
int intel_pasid_alloc_table(struct device *dev)
{ … }
void intel_pasid_free_table(struct device *dev)
{ … }
struct pasid_table *intel_pasid_get_table(struct device *dev)
{ … }
static int intel_pasid_get_dev_max_id(struct device *dev)
{ … }
static struct pasid_entry *intel_pasid_get_entry(struct device *dev, u32 pasid)
{ … }
static void
intel_pasid_clear_entry(struct device *dev, u32 pasid, bool fault_ignore)
{ … }
static void
pasid_cache_invalidation_with_pasid(struct intel_iommu *iommu,
u16 did, u32 pasid)
{ … }
static void
devtlb_invalidation_with_pasid(struct intel_iommu *iommu,
struct device *dev, u32 pasid)
{ … }
void intel_pasid_tear_down_entry(struct intel_iommu *iommu, struct device *dev,
u32 pasid, bool fault_ignore)
{ … }
static void pasid_flush_caches(struct intel_iommu *iommu,
struct pasid_entry *pte,
u32 pasid, u16 did)
{ … }
int intel_pasid_setup_first_level(struct intel_iommu *iommu,
struct device *dev, pgd_t *pgd,
u32 pasid, u16 did, int flags)
{ … }
static int iommu_skip_agaw(struct dmar_domain *domain,
struct intel_iommu *iommu,
struct dma_pte **pgd)
{ … }
int intel_pasid_setup_second_level(struct intel_iommu *iommu,
struct dmar_domain *domain,
struct device *dev, u32 pasid)
{ … }
int intel_pasid_setup_dirty_tracking(struct intel_iommu *iommu,
struct device *dev, u32 pasid,
bool enabled)
{ … }
int intel_pasid_setup_pass_through(struct intel_iommu *iommu,
struct device *dev, u32 pasid)
{ … }
void intel_pasid_setup_page_snoop_control(struct intel_iommu *iommu,
struct device *dev, u32 pasid)
{ … }
int intel_pasid_setup_nested(struct intel_iommu *iommu, struct device *dev,
u32 pasid, struct dmar_domain *domain)
{ … }
static void device_pasid_table_teardown(struct device *dev, u8 bus, u8 devfn)
{ … }
static int pci_pasid_table_teardown(struct pci_dev *pdev, u16 alias, void *data)
{ … }
void intel_pasid_teardown_sm_context(struct device *dev)
{ … }
static unsigned long context_get_sm_pds(struct pasid_table *table)
{ … }
static int context_entry_set_pasid_table(struct context_entry *context,
struct device *dev)
{ … }
static int device_pasid_table_setup(struct device *dev, u8 bus, u8 devfn)
{ … }
static int pci_pasid_table_setup(struct pci_dev *pdev, u16 alias, void *data)
{ … }
int intel_pasid_setup_sm_context(struct device *dev)
{ … }
static void __context_flush_dev_iotlb(struct device_domain_info *info)
{ … }
void intel_context_flush_present(struct device_domain_info *info,
struct context_entry *context,
u16 did, bool flush_domains)
{ … }