| /linux/drivers/misc/ocxl/ |
| H A D | trace.h | 36 TP_PROTO(int pasid, unsigned long pidr), 37 TP_ARGS(pasid, pidr), 40 __field(int, pasid) 45 __entry->pasid = pasid; 50 __entry->pasid, 56 TP_PROTO(int pasid, unsigned long pidr), 57 TP_ARGS(pasid, pidr), 60 __field(int, pasid) 65 __entry->pasid = pasid; 70 __entry->pasid, [all …]
|
| H A D | context.c | 10 int pasid; in ocxl_context_alloc() local 19 pasid = idr_alloc(&afu->contexts_idr, ctx, afu->pasid_base, in ocxl_context_alloc() 21 if (pasid < 0) { in ocxl_context_alloc() 24 return pasid; in ocxl_context_alloc() 29 ctx->pasid = pasid; in ocxl_context_alloc() 86 rc = ocxl_link_add_pe(ctx->afu->fn->link, ctx->pasid, pidr, ctx->tidr, in ocxl_context_attach() 129 pasid_off = ctx->pasid - ctx->afu->pasid_base; in map_pp_mmio() 148 ctx->pasid, vmf->address, offset); in ocxl_mmap_fault() 231 rc = ocxl_config_terminate_pasid(dev, afu_control_pos, ctx->pasid); in ocxl_context_detach() 233 trace_ocxl_terminate_pasid(ctx->pasid, rc); in ocxl_context_detach() [all …]
|
| H A D | link.c | 538 int ocxl_link_add_pe(void *link_handle, int pasid, u32 pidr, u32 tidr, in ocxl_link_add_pe() argument 550 if (pasid > SPA_PASID_MAX) in ocxl_link_add_pe() 554 pe_handle = pasid & SPA_PE_MASK; in ocxl_link_add_pe() 576 pe->pasid = cpu_to_be32(pasid << (31 - 19)); in ocxl_link_add_pe() 595 trace_ocxl_init_mmu_notifier(pasid, mm->context.id); in ocxl_link_add_pe() 624 trace_ocxl_context_add(current->pid, spa->spa_mem, pasid, pidr, tidr); in ocxl_link_add_pe() 631 int ocxl_link_update_pe(void *link_handle, int pasid, __u16 tid) in ocxl_link_update_pe() argument 638 if (pasid > SPA_PASID_MAX) in ocxl_link_update_pe() 641 pe_handle = pasid & SPA_PE_MASK; in ocxl_link_update_pe() 667 int ocxl_link_remove_pe(void *link_handle, int pasid) in ocxl_link_remove_pe() argument [all …]
|
| H A D | ocxl_internal.h | 72 int pasid; member 87 __be32 pasid; member 139 int ocxl_link_update_pe(void *link_handle, int pasid, __u16 tid);
|
| /linux/drivers/iommu/amd/ |
| H A D | pasid.c | 24 ioasid_t pasid) in is_pasid_valid() argument 26 if (pasid > 0 && pasid < dev_data->max_pasids) in is_pasid_valid() 35 amd_iommu_clear_gcr3(pdom_dev_data->dev_data, pdom_dev_data->pasid); in remove_dev_pasid() 43 struct device *dev, ioasid_t pasid) in remove_pdom_dev_pasid() argument 52 pdom_dev_data->pasid == pasid) { in remove_pdom_dev_pasid() 73 pdom_dev_data->pasid, in sva_arch_invalidate_secondary_tlbs() 103 struct device *dev, ioasid_t pasid, in iommu_sva_set_dev_pasid() argument 116 if (!is_pasid_valid(dev_data, pasid)) in iommu_sva_set_dev_pasid() 128 pdom_dev_data->pasid = pasid; in iommu_sva_set_dev_pasid() 134 ret = amd_iommu_set_gcr3(dev_data, pasid, in iommu_sva_set_dev_pasid() [all …]
|
| H A D | amd_iommu.h | 58 struct device *dev, ioasid_t pasid, 60 void amd_iommu_remove_dev_pasid(struct device *dev, ioasid_t pasid, 78 ioasid_t pasid, unsigned long gcr3); 79 int amd_iommu_clear_gcr3(struct iommu_dev_data *dev_data, ioasid_t pasid); 86 int amd_iommu_complete_ppr(struct device *dev, u32 pasid, int status, int tag); 96 ioasid_t pasid, u64 address, size_t size);
|
| H A D | ppr.c | 132 event.fault.prm.pasid = PPR_PASID(raw[0]); in iommu_call_iopf_notifier() 140 if (event.fault.prm.pasid == 0 || in iommu_call_iopf_notifier() 141 event.fault.prm.pasid >= dev_data->max_pasids) { in iommu_call_iopf_notifier() 143 event.fault.prm.pasid, pdev->dev.id); in iommu_call_iopf_notifier() 247 amd_iommu_complete_ppr(dev, resp->pasid, resp->code, resp->grpid); in amd_iommu_page_response()
|
| /linux/drivers/vfio/ |
| H A D | iommufd.c | 133 int pasid; in vfio_iommufd_physical_unbind() local 137 while ((pasid = ida_find_first(&vdev->pasids)) >= 0) { in vfio_iommufd_physical_unbind() 138 iommufd_device_detach(vdev->iommufd_device, pasid); in vfio_iommufd_physical_unbind() 139 ida_free(&vdev->pasids, pasid); in vfio_iommufd_physical_unbind() 186 u32 pasid, u32 *pt_id) in vfio_iommufd_physical_pasid_attach_ioas() argument 195 if (ida_exists(&vdev->pasids, pasid)) in vfio_iommufd_physical_pasid_attach_ioas() 197 pasid, pt_id); in vfio_iommufd_physical_pasid_attach_ioas() 199 rc = ida_alloc_range(&vdev->pasids, pasid, pasid, GFP_KERNEL); in vfio_iommufd_physical_pasid_attach_ioas() 203 rc = iommufd_device_attach(vdev->iommufd_device, pasid, pt_id); in vfio_iommufd_physical_pasid_attach_ioas() 205 ida_free(&vdev->pasids, pasid); in vfio_iommufd_physical_pasid_attach_ioas() [all …]
|
| /linux/drivers/gpu/drm/amd/amdgpu/ |
| H A D | amdgpu_ids.c | 49 u32 pasid; member 65 u32 pasid; in amdgpu_pasid_alloc() local 71 r = xa_alloc_cyclic_irq(&amdgpu_pasid_xa, &pasid, xa_mk_value(0), in amdgpu_pasid_alloc() 77 trace_amdgpu_pasid_allocated(pasid); in amdgpu_pasid_alloc() 78 return pasid; in amdgpu_pasid_alloc() 87 void amdgpu_pasid_free(u32 pasid) in amdgpu_pasid_free() argument 91 trace_amdgpu_pasid_freed(pasid); in amdgpu_pasid_free() 94 __xa_erase(&amdgpu_pasid_xa, pasid); in amdgpu_pasid_free() 104 amdgpu_pasid_free(cb->pasid); in amdgpu_pasid_free_cb() 118 u32 pasid) in amdgpu_pasid_free_delayed() argument [all …]
|
| H A D | amdgpu_vm_tlb_fence.c | 37 uint16_t pasid; member 62 r = amdgpu_gmc_flush_gpu_tlb_pasid(f->adev, f->pasid, 2, true, 0); in amdgpu_tlb_fence_work() 65 f->pasid); in amdgpu_tlb_fence_work() 92 amdgpu_gmc_flush_gpu_tlb_pasid(adev, vm->pasid, 2, true, 0); in amdgpu_vm_tlb_fence_create() 99 f->pasid = vm->pasid; in amdgpu_vm_tlb_fence_create()
|
| H A D | amdgpu_ids.h | 61 unsigned pasid; member 74 void amdgpu_pasid_free(u32 pasid); 76 u32 pasid);
|
| /linux/drivers/dma/idxd/ |
| H A D | cdev.c | 44 unsigned int pasid; member 54 static void idxd_cdev_evl_drain_pasid(struct idxd_wq *wq, u32 pasid); 129 idxd_device_drain_pasid(idxd, ctx->pasid); in idxd_file_dev_release() 142 idxd_cdev_evl_drain_pasid(wq, ctx->pasid); in idxd_file_dev_release() 190 ptr = xa_cmpxchg(&wq->upasid_xa, ctx->pasid, ctx, NULL, GFP_KERNEL); in idxd_xa_pasid_remove() 193 ctx->pasid); in idxd_xa_pasid_remove() 197 void idxd_user_counter_increment(struct idxd_wq *wq, u32 pasid, int index) in idxd_user_counter_increment() argument 205 ctx = xa_load(&wq->upasid_xa, pasid); in idxd_user_counter_increment() 222 unsigned int pasid; in idxd_cdev_open() local 254 pasid = iommu_sva_get_pasid(sva); in idxd_cdev_open() [all …]
|
| /linux/drivers/iommu/ |
| H A D | iommu-sva.c | 23 ioasid_t pasid; in iommu_alloc_mm_data() local 33 if (iommu_mm->pasid >= dev->iommu->max_pasids) in iommu_alloc_mm_data() 42 pasid = iommu_alloc_global_pasid(dev); in iommu_alloc_mm_data() 43 if (pasid == IOMMU_PASID_INVALID) { in iommu_alloc_mm_data() 47 iommu_mm->pasid = pasid; in iommu_alloc_mm_data() 94 attach_handle = iommu_attach_handle_get(group, iommu_mm->pasid, IOMMU_DOMAIN_SVA); in iommu_sva_bind_device() 119 ret = iommu_attach_device_pasid(domain, dev, iommu_mm->pasid, in iommu_sva_bind_device() 134 ret = iommu_attach_device_pasid(domain, dev, iommu_mm->pasid, in iommu_sva_bind_device() 182 iommu_detach_device_pasid(domain, dev, iommu_mm->pasid); in iommu_sva_unbind_device() 214 iommu_free_global_pasid(iommu_mm->pasid); in mm_pasid_drop()
|
| H A D | io-pgfault.c | 126 fault->prm.pasid, 0); in find_fault_handler() 163 .pasid = fault->prm.pasid, in iopf_error_response() 269 fault->prm.pasid); in iommu_report_device_fault() 330 .pasid = iopf->fault.prm.pasid, in iopf_group_response() 474 .pasid = iopf->fault.prm.pasid, in iopf_queue_remove_device()
|
| H A D | iommu.c | 3547 static void iommu_remove_dev_pasid(struct device *dev, ioasid_t pasid, in iommu_remove_dev_pasid() argument 3554 dev, pasid, domain)); in iommu_remove_dev_pasid() 3558 struct iommu_group *group, ioasid_t pasid, in __iommu_set_group_pasid() argument 3567 pasid, old); in __iommu_set_group_pasid() 3589 pasid, domain))) in __iommu_set_group_pasid() 3590 iommu_remove_dev_pasid(device->dev, pasid, domain); in __iommu_set_group_pasid() 3597 ioasid_t pasid, in __iommu_remove_group_pasid() argument 3609 iommu_remove_dev_pasid(device->dev, pasid, domain); in __iommu_remove_group_pasid() 3626 struct device *dev, ioasid_t pasid, in iommu_attach_device_pasid() argument 3647 pasid == IOMMU_NO_PASID) in iommu_attach_device_pasid() [all …]
|
| /linux/drivers/iommu/intel/ |
| H A D | nested.c | 136 struct device *dev, ioasid_t pasid, in domain_setup_nested() argument 140 intel_pasid_tear_down_entry(iommu, dev, pasid, false); in domain_setup_nested() 142 return intel_pasid_setup_nested(iommu, dev, pasid, domain); in domain_setup_nested() 146 struct device *dev, ioasid_t pasid, in intel_nested_set_dev_pasid() argument 165 dev_pasid = domain_add_dev_pasid(domain, dev, pasid); in intel_nested_set_dev_pasid() 173 ret = domain_setup_nested(iommu, dmar_domain, dev, pasid, old); in intel_nested_set_dev_pasid() 177 domain_remove_dev_pasid(old, dev, pasid); in intel_nested_set_dev_pasid() 184 domain_remove_dev_pasid(domain, dev, pasid); in intel_nested_set_dev_pasid()
|
| H A D | svm.c | 93 dev_pasid->pasid, true); in intel_mm_release() 149 struct device *dev, ioasid_t pasid, in intel_svm_set_dev_pasid() argument 163 dev_pasid = domain_add_dev_pasid(domain, dev, pasid); in intel_svm_set_dev_pasid() 177 ret = __domain_setup_first_level(iommu, dev, pasid, in intel_svm_set_dev_pasid() 183 domain_remove_dev_pasid(old, dev, pasid); in intel_svm_set_dev_pasid() 190 domain_remove_dev_pasid(domain, dev, pasid); in intel_svm_set_dev_pasid()
|
| H A D | pasid.h | 307 phys_addr_t fsptptr, u32 pasid, u16 did, 311 struct device *dev, u32 pasid); 313 struct device *dev, u32 pasid, 316 struct device *dev, u32 pasid); 318 u32 pasid, struct dmar_domain *domain); 320 struct device *dev, u32 pasid, 323 struct device *dev, u32 pasid);
|
| /linux/arch/csky/mm/ |
| H A D | asid.c | 79 static u64 new_context(struct asid_info *info, atomic64_t *pasid, in new_context() argument 83 u64 asid = atomic64_read(pasid); in new_context() 137 void asid_new_context(struct asid_info *info, atomic64_t *pasid, in asid_new_context() argument 145 asid = atomic64_read(pasid); in asid_new_context() 147 asid = new_context(info, pasid, mm); in asid_new_context() 148 atomic64_set(pasid, asid); in asid_new_context()
|
| /linux/arch/csky/include/asm/ |
| H A D | asid.h | 33 void asid_new_context(struct asid_info *info, atomic64_t *pasid, 43 atomic64_t *pasid, unsigned int cpu, in asid_check_context() argument 48 asid = atomic64_read(pasid); in asid_check_context() 71 asid_new_context(info, pasid, cpu, mm); in asid_check_context()
|
| /linux/tools/testing/selftests/iommu/ |
| H A D | iommufd_utils.h | 927 static int _test_cmd_trigger_iopf(int fd, __u32 device_id, __u32 pasid, in _test_cmd_trigger_iopf() argument 935 .pasid = pasid, in _test_cmd_trigger_iopf() 967 #define test_cmd_trigger_iopf_pasid(device_id, pasid, fault_fd) \ argument 969 pasid, fault_fd)) 1174 static int _test_cmd_pasid_attach(int fd, __u32 stdev_id, __u32 pasid, in _test_cmd_pasid_attach() argument 1182 .pasid = pasid, in _test_cmd_pasid_attach() 1191 #define test_cmd_pasid_attach(pasid, hwpt_id) \ argument 1193 pasid, hwpt_id)) 1195 #define test_err_pasid_attach(_errno, pasid, hwpt_id) \ argument 1198 pasid, hwpt_id)) [all …]
|
| H A D | iommufd_fail_nth.c | 213 uint32_t pasid; in FIXTURE() local 221 self->pasid = 0; //test should use a non-zero value in FIXTURE_SETUP() 233 if (self->pasid && self->stdev_id) in FIXTURE_TEARDOWN() 234 _test_cmd_pasid_detach(self->fd, self->stdev_id, self->pasid); in FIXTURE_TEARDOWN() 728 self->pasid = 200; in TEST_FAIL_NTH() 731 self->pasid, hwpt_id)) { in TEST_FAIL_NTH() 732 self->pasid = 0; in TEST_FAIL_NTH() 737 self->pasid, test_hwpt_id)) in TEST_FAIL_NTH() 740 if (_test_cmd_pasid_detach(self->fd, self->stdev_id, self->pasid)) in TEST_FAIL_NTH() 743 self->pasid = 0; in TEST_FAIL_NTH()
|
| H A D | iommufd.c | 2280 uint32_t stddev_id, ioas_id, hwpt_id, pasid = 100; in TEST_F() 2288 ASSERT_EQ(0, _test_cmd_pasid_attach(self->fd, stddev_id, pasid, hwpt_id)); in TEST_F() 2291 ASSERT_EQ(0, _test_cmd_pasid_detach(self->fd, stddev_id, pasid)); in TEST_F() 2299 EXPECT_ERRNO(EINVAL, _test_cmd_pasid_attach(self->fd, stddev_id, pasid, hwpt_id)); in TEST_F() 3320 uint32_t pasid = 100; in TEST_F() 3324 * Negative, detach pasid without attaching, this is not expected. in TEST_F() 3327 test_cmd_pasid_detach(pasid); in TEST_F() 3365 /* Attach RID to non-pasid compat domain, */ in TEST_F() 3367 /* then attach to pasid should fail */ in TEST_F() 3368 test_err_pasid_attach(EINVAL, pasid, s2_hwpt_i in TEST_F() 3293 uint32_t pasid = 100; TEST_F() local [all...] |
| /linux/Documentation/ABI/testing/ |
| H A D | sysfs-driver-uio_pci_sva-pasid | 1 What: /sys/bus/pci/drivers/uio_pci_sva/<pci_dev>/pasid 26 f = fopen("/sys/.../pasid", "r"); 27 fscanf(f, "%d", &pasid); 29 map[REG_PASID_OFFSET] = pasid;
|
| /linux/drivers/uio/ |
| H A D | uio_pci_generic_sva.c | 18 int pasid; member 43 udev->pasid = iommu_sva_get_pasid(handle); in uio_pci_sva_open() 162 return sysfs_emit(buf, "%d\n", udev->pasid); in pasid_show() 164 static DEVICE_ATTR_RO(pasid);
|