Lines Matching full:fault

17  * Return the fault parameter of a device if it exists. Otherwise, return NULL.
35 /* Caller must hold a reference of the fault parameter. */
47 if (!(iopf->fault.prm.flags & IOMMU_FAULT_PAGE_REQUEST_LAST_PAGE)) in __iopf_free_group()
64 struct iommu_fault *fault) in report_partial_fault() argument
72 iopf->fault = *fault; in report_partial_fault()
98 group->last_fault.fault = evt->fault; in iopf_group_alloc()
106 if (iopf->fault.prm.grpid == evt->fault.prm.grpid) in iopf_group_alloc()
107 /* Insert *before* the last fault */ in iopf_group_alloc()
121 struct iommu_fault *fault = &evt->fault; in find_fault_handler() local
124 if (fault->prm.flags & IOMMU_FAULT_PAGE_REQUEST_PASID_VALID) { in find_fault_handler()
126 fault->prm.pasid, 0); in find_fault_handler()
161 struct iommu_fault *fault = &evt->fault; in iopf_error_response() local
163 .pasid = fault->prm.pasid, in iopf_error_response()
164 .grpid = fault->prm.grpid, in iopf_error_response()
172 * iommu_report_device_fault() - Report fault event to device driver
174 * @evt: fault event data
176 * Called by IOMMU drivers when a fault is detected, typically in a threaded IRQ
197 * b. The IOMMU driver flushes all fault queues on unbind() before freeing the
204 * Any valid page fault will be eventually routed to an iommu domain and the
205 * page fault handler installed there will get called. The users of this
209 * have been flushed. In case no page fault handler is attached or no iopf params
217 struct iommu_fault *fault = &evt->fault; in iommu_report_device_fault() local
227 * Something has gone wrong if a fault capable domain is attached but no in iommu_report_device_fault()
234 if (!(fault->prm.flags & IOMMU_FAULT_PAGE_REQUEST_LAST_PAGE)) { in iommu_report_device_fault()
237 ret = report_partial_fault(iopf_param, fault); in iommu_report_device_fault()
245 * This is the last page fault of a group. Allocate an iopf group and in iommu_report_device_fault()
246 * pass it to domain's page fault handler. The group holds a reference in iommu_report_device_fault()
247 * count of the fault parameter. It will be released after response or in iommu_report_device_fault()
269 fault->prm.pasid); in iommu_report_device_fault()
279 if (fault->type == IOMMU_FAULT_PAGE_REQ) in iommu_report_device_fault()
293 * that no new fault is added to the queue. In particular it must flush its
304 * Therefore, it's safe to dereference the fault parameter without in iopf_queue_flush_dev()
330 .pasid = iopf->fault.prm.pasid, in iopf_group_response()
331 .grpid = iopf->fault.prm.grpid, in iopf_group_response()
335 /* Only send response if there is a fault report pending */ in iopf_group_response()
346 * iopf_queue_discard_partial - Remove all pending partial fault
379 * iopf_queue_add_device - Add producer to the fault queue
428 * iopf_queue_remove_device - Remove producer from fault queue
446 * nothing. The device fault parameter reference count has been properly
447 * passed from iommu_report_device_fault() to the fault handling work, and
474 .pasid = iopf->fault.prm.pasid, in iopf_queue_remove_device()
475 .grpid = iopf->fault.prm.grpid, in iopf_queue_remove_device()
497 * iopf_queue_alloc - Allocate and initialize a fault queue