|
@@ -254,14 +254,17 @@ void cxl_handle_fault(struct work_struct *fault_work)
|
|
|
u64 dar = ctx->dar;
|
|
|
struct mm_struct *mm = NULL;
|
|
|
|
|
|
- if (cxl_p2n_read(ctx->afu, CXL_PSL_DSISR_An) != dsisr ||
|
|
|
- cxl_p2n_read(ctx->afu, CXL_PSL_DAR_An) != dar ||
|
|
|
- cxl_p2n_read(ctx->afu, CXL_PSL_PEHandle_An) != ctx->pe) {
|
|
|
- /* Most likely explanation is harmless - a dedicated process
|
|
|
- * has detached and these were cleared by the PSL purge, but
|
|
|
- * warn about it just in case */
|
|
|
- dev_notice(&ctx->afu->dev, "cxl_handle_fault: Translation fault regs changed\n");
|
|
|
- return;
|
|
|
+ if (cpu_has_feature(CPU_FTR_HVMODE)) {
|
|
|
+ if (cxl_p2n_read(ctx->afu, CXL_PSL_DSISR_An) != dsisr ||
|
|
|
+ cxl_p2n_read(ctx->afu, CXL_PSL_DAR_An) != dar ||
|
|
|
+ cxl_p2n_read(ctx->afu, CXL_PSL_PEHandle_An) != ctx->pe) {
|
|
|
+ /* Most likely explanation is harmless - a dedicated
|
|
|
+ * process has detached and these were cleared by the
|
|
|
+ * PSL purge, but warn about it just in case
|
|
|
+ */
|
|
|
+ dev_notice(&ctx->afu->dev, "cxl_handle_fault: Translation fault regs changed\n");
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/* Early return if the context is being / has been detached */
|