From patchwork Wed Mar 8 15:39:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 6309 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp408046wrd; Wed, 8 Mar 2023 07:43:29 -0800 (PST) X-Google-Smtp-Source: AK7set+maVThuyt+n49IGHytsuTiRsOp2HN/6b1OAAyYC6A793u06g434DCSW42mPO3GIJjZ3LZD X-Received: by 2002:a17:902:9a03:b0:19c:a0e6:8026 with SMTP id v3-20020a1709029a0300b0019ca0e68026mr16351798plp.50.1678290208911; Wed, 08 Mar 2023 07:43:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678290208; cv=none; d=google.com; s=arc-20160816; b=y0p92ceUF5jufoj0YLfw/2riqgWIrY0h4ytA3pBQ72DCMbVF/ORadZRKjrj0SdPD+u NaUcQaGXMPaAlw1jL00aM/TmoGM3jyWHeIE3BPfnMvje0kk2i3zT7LlKhc/njPSZnezc Yc9DuXUqzjkw+kQ4hKO5Sj6Nv67I1w/IOatPrXbRcJTHgfAcf1IJCuOs7XIEoI7rx8Bl yUpLxvSyFiwltdig75uO5YqhVwJWmchxL6Zd9LZicu6A8HWLJqhETEkJeXGWZlmBrmvJ ivRHm5dsmMJqjxF9eUGzTPxsGOxMvbw1R3w+xsYUDDvLswEnYcndFTFx5YYaEh0gLfeJ 3UFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:from:dkim-signature; bh=u016tztw86cHSrUcorN1ub1Z0v3Mac/H/BJylDuDAcs=; b=oXQ3s+bo75OK3snDErgx2oXAmgKjW6AKy/YLWSjT69JWOR4HcjL2473LRyTV0nPfhi B28B2xFDU1cqONxfXdfEE3jujrrHdHXE8gLKrI5BdReuGFs7MfB1tIgarHeRP7PUPwEn EqhIkm6L1VwRkYX4nJgFYPxr7YFMqE6MuZHm9+h7sn8qy1DfVAV4Nx9hTy3lMOR2ERPB 8kuPWZ4aIfiAzsJVv7Ji4+SkZf0ka03G/r16LUhVBl9nO9rB6JZuxAsvK5p1m0PGnS3F mnr/VIharNWwWCWYLQesQbvTjAMihLrv0e/6ravi/ZkLsSQ3K3S/pqBE6LlxTg4tCyfZ AVZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=BewPIDW2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y3-20020a1709029b8300b00198a715d260si14205432plp.565.2023.03.08.07.43.15; Wed, 08 Mar 2023 07:43:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=BewPIDW2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231145AbjCHPkb (ORCPT + 99 others); Wed, 8 Mar 2023 10:40:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232406AbjCHPkJ (ORCPT ); Wed, 8 Mar 2023 10:40:09 -0500 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E87724CA7 for ; Wed, 8 Mar 2023 07:39:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678289988; x=1709825988; h=from:subject:date:message-id:mime-version: content-transfer-encoding:to:cc; bh=JZPPyfomcM6RPed2Z6objclkx7X74pCD0nLjOtDOZ2w=; b=BewPIDW2s1lUAFJmrD3svTH+TDr4N1YC9+DKseXgH39XW1jTMdqaYfn5 kFUUfql1xvibcUZ2nsTodVWrQ5bu63sPucqcH0mUrKzYbnc53IXyIzEcV UkJ+/1yubu16wh56uT4cWqmRwCS3gOxeksWcG3ilVfYeFGM4PW40p82bV siZ9YogQBmd3iHo/xcOrUe/sumdzSmi/qCQ3Esb+pndNIRTo3HqkAsnP5 OQo55KxuhJ19Xlc32tFmWjdtxU8bnW3Hj09iglOnBtexBNRnisZge2TBh /DL/puCIrLnkN/PFt/ye3wX/PUj+DY5NQ3Vt+Wv101O2+uOmKvHLxrkYn g==; X-IronPort-AV: E=McAfee;i="6500,9779,10642"; a="337703533" X-IronPort-AV: E=Sophos;i="5.98,244,1673942400"; d="scan'208";a="337703533" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2023 07:39:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10642"; a="787160232" X-IronPort-AV: E=Sophos;i="5.98,244,1673942400"; d="scan'208";a="787160232" Received: from lab-ah.igk.intel.com ([10.102.42.211]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2023 07:39:42 -0800 From: Andrzej Hajda Subject: [PATCH v5 0/4] drm/i915: add guard page to ggtt->error_capture Date: Wed, 08 Mar 2023 16:39:03 +0100 Message-Id: <20230308-guard_error_capture-v5-0-6d1410d13540@intel.com> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIABesCGQC/x2N0QqDMAwAf0XyvEAxE2S/IkNim2oerCXVMRD/f XWPx3HcCUVMpcCrOcHko0W3VKF7NOAXTrOghsrQupYcuR7ngy2MYrbZ6DnvhwlGikRPEd93EWo5 cRGcjJNf7jbYirvm22STqN//b3hf1w9xA2EcfwAAAA== To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Andi Shyti , Chris Wilson , Nirmoy Das , Andrzej Hajda X-Mailer: b4 0.11.1 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759814834448444110?= X-GMAIL-MSGID: =?utf-8?q?1759814834448444110?= This patch tries to diminish plague of DMAR read errors present in CI for ADL*, RPL*, DG2 platforms, see for example [1] (grep DMAR). CI is usually tolerant for these errors, so the scale of the problem is not really visible. To show it I have counted lines containing DMAR read errors in dmesgs produced by CI for all three versions of the patch, but in contrast to v2 I have grepped only for lines containing "PTE Read access". Below stats for kernel w/o patchset vs patched one. v1: 210 vs 0 v2: 201 vs 0 v3: 214 vs 0 Apparently the patchset fixes all common PTE read errors. Changelog: v2: - modified commit message (I hope the diagnosis is correct), - added bug checks to ensure scratch is initialized on gen3 platforms. CI produces strange stacktrace for it suggesting scratch[0] is NULL, to be removed after resolving the issue with gen3 platforms. v3: - removed bug checks, replaced with gen check. v4: - change code for scratch page insertion to support all platforms, - add info in commit message there could be more similar issues v5: - changed to patchset adding nop_clear_range related code, - re-insert scratch PTEs on resume To: Jani Nikula To: Joonas Lahtinen To: Rodrigo Vivi To: Tvrtko Ursulin Cc: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org Cc: Andi Shyti Cc: Chris Wilson Cc: Nirmoy Das Signed-off-by: Andrzej Hajda --- Andrzej Hajda (4): drm/i915/gt: make nop_clear_range public drm/i915/display: use nop_clear_range instead of local function drm/i915/selftests: use nop_clear_range instead of local function drm/i915: add guard page to ggtt->error_capture drivers/gpu/drm/i915/display/intel_dpt.c | 7 +----- drivers/gpu/drm/i915/gt/intel_ggtt.c | 38 ++++++++++++++++++++++++++----- drivers/gpu/drm/i915/gt/intel_gtt.h | 2 ++ drivers/gpu/drm/i915/selftests/mock_gtt.c | 9 ++------ 4 files changed, 37 insertions(+), 19 deletions(-) --- base-commit: 3cd6c251f39c14df9ab711e3eb56e703b359ff54 change-id: 20230308-guard_error_capture-f3f334eec85f Best regards,