lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201109125031.264707108@linuxfoundation.org>
Date:   Mon,  9 Nov 2020 13:54:33 +0100
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     linux-kernel@...r.kernel.org
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        stable@...r.kernel.org, Chris Wilson <chris@...is-wilson.co.uk>,
        Lucas De Marchi <lucas.demarchi@...el.com>,
        Tomasz Lis <tomasz.lis@...el.com>,
        Matt Roper <matthew.d.roper@...el.com>,
        Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
        Francisco Jerez <currojerez@...eup.net>,
        Mathew Alwin <alwin.mathew@...el.com>,
        Mcguire Russell W <russell.w.mcguire@...el.com>,
        Spruit Neil R <neil.r.spruit@...el.com>,
        Zhou Cheng <cheng.zhou@...el.com>,
        Benemelis Mike G <mike.g.benemelis@...el.com>,
        Ayaz A Siddiqui <ayaz.siddiqui@...el.com>,
        Rodrigo Vivi <rodrigo.vivi@...el.com>
Subject: [PATCH 5.9 011/133] drm/i915/gt: Initialize reserved and unspecified MOCS indices

From: Ayaz A Siddiqui <ayaz.siddiqui@...el.com>

commit 849c0fe9e831dcebea1b46e2237e13f274a8756a upstream.

In order to avoid functional breakage of mis-programmed applications that
have grown to depend on unused MOCS entries, we are programming
those entries to be equal to fully cached ("L3 + LLC") entry.

These reserved and unspecified entries should not be used as they may be
changed to less performant variants with better coherency in the future
if more entries are needed.

v2: As suggested by Lucas De Marchi to utilise __init_mocs_table for
programming default value, setting I915_MOCS_PTE index of tgl_mocs_table
with desired value.

Cc: Chris Wilson <chris@...is-wilson.co.uk>
Cc: Lucas De Marchi <lucas.demarchi@...el.com>
Cc: Tomasz Lis <tomasz.lis@...el.com>
Cc: Matt Roper <matthew.d.roper@...el.com>
Cc: Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>
Cc: Francisco Jerez <currojerez@...eup.net>
Cc: Mathew Alwin <alwin.mathew@...el.com>
Cc: Mcguire Russell W <russell.w.mcguire@...el.com>
Cc: Spruit Neil R <neil.r.spruit@...el.com>
Cc: Zhou Cheng <cheng.zhou@...el.com>
Cc: Benemelis Mike G <mike.g.benemelis@...el.com>

Signed-off-by: Ayaz A Siddiqui <ayaz.siddiqui@...el.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@...el.com>
Acked-by: Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>
Signed-off-by: Chris Wilson <chris@...is-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20200729102539.134731-2-ayaz.siddiqui@intel.com
Cc: stable@...r.kernel.org
(cherry picked from commit 4d8a5cfe3b131f60903949f998c5961cc922e0b0)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@...el.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>

---
 drivers/gpu/drm/i915/gt/intel_mocs.c |   16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

--- a/drivers/gpu/drm/i915/gt/intel_mocs.c
+++ b/drivers/gpu/drm/i915/gt/intel_mocs.c
@@ -234,11 +234,17 @@ static const struct drm_i915_mocs_entry
 		   L3_1_UC)
 
 static const struct drm_i915_mocs_entry tgl_mocs_table[] = {
-	/* Base - Error (Reserved for Non-Use) */
-	MOCS_ENTRY(0, 0x0, 0x0),
-	/* Base - Reserved */
-	MOCS_ENTRY(1, 0x0, 0x0),
-
+	/*
+	 * NOTE:
+	 * Reserved and unspecified MOCS indices have been set to (L3 + LCC).
+	 * These reserved entries should never be used, they may be changed
+	 * to low performant variants with better coherency in the future if
+	 * more entries are needed. We are programming index I915_MOCS_PTE(1)
+	 * only, __init_mocs_table() take care to program unused index with
+	 * this entry.
+	 */
+	MOCS_ENTRY(1, LE_3_WB | LE_TC_1_LLC | LE_LRUM(3),
+		   L3_3_WB),
 	GEN11_MOCS_ENTRIES,
 
 	/* Implicitly enable L1 - HDC:L1 + L3 + LLC */


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ