Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp729072imw; Wed, 13 Jul 2022 07:03:12 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ux9JgXbEBXhOvOG0Fc8MM4qGJKsO4m9ELXbcJlk+xE8hsLDgPYS6huWH6CAkEkz2rKYO67 X-Received: by 2002:a17:90a:474c:b0:1ec:f898:d85b with SMTP id y12-20020a17090a474c00b001ecf898d85bmr4130253pjg.11.1657720991940; Wed, 13 Jul 2022 07:03:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657720991; cv=none; d=google.com; s=arc-20160816; b=FYTQJxDJDcJNIS3vAiHbqcg4nbZrh3H1+ntXpAoQvHlV7e2QyknIRV0DSijbvcqwpR FKhr4a5qvFQhEUgbyGxZbdNSuP+KwevzzCYR6OrBHNKsEuzLjkhRRqylUf3Nh7l2/eDX 6atgGHFi/NpcQI52WKmQukgigoA5aVLzCQQHWcQgx2lp+F0g7s8y0QhGuyQNErn66qv2 GamR6ES7WVfNzvbZoNTqGo5rBfqJK5FsLH4idR7f+Y6puFZyo3VDb+DRUgPHzmdnNObg f+wYhLczGd9XRNqsjmZ+y+DwFL2xoHDHgisTpI4clNcgP5w1xHRVDtslalwp9opGVBl5 EqVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Li+bl/UptRU+J6pvDQIafHMDkKqr6EFJfqVUdtS/Lrs=; b=JLc1Nu6WCifFPTk+psf+MhKfpF63R2IEccj0n9Te8oDoXCS3f/iTYHM53v41hwPiIF ezYKhGQhCM8OdFOWRn40ldPUXeMA0nhA7XvGtMO1qCgSoongH8cDsXIH/B3KnAOYmGkV 36+hHm97vfhT9lgbhyL8RgbL5/mclwASA9AmWP4qUKZkhq9ZVPs8CuDCq1yUsU679264 86wfp/0eIP437isn+Vj7zrGINyURTooK2JXfxqFIphcoXk6CNvWOrqlKbCaC3Ei+CLWH FHF+gDAwHXXObVLWPA+Ik3x2mhQIbx2B9DxbATD5P/xuRfDnt3FI6dg/AAi8zFFEOobt VPNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=ngYnJqm+; 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=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s24-20020a639258000000b00412a349c4cesi17891147pgn.866.2022.07.13.07.02.59; Wed, 13 Jul 2022 07:03:11 -0700 (PDT) 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=@collabora.com header.s=mail header.b=ngYnJqm+; 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=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236417AbiGMNvT (ORCPT + 99 others); Wed, 13 Jul 2022 09:51:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236297AbiGMNur (ORCPT ); Wed, 13 Jul 2022 09:50:47 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CE1B24BE8 for ; Wed, 13 Jul 2022 06:50:46 -0700 (PDT) Received: from hermes-devbox.fritz.box (82-71-8-225.dsl.in-addr.zen.co.uk [82.71.8.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bbeckett) by madras.collabora.co.uk (Postfix) with ESMTPSA id D25D16601A45; Wed, 13 Jul 2022 14:50:44 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1657720245; bh=yyqoiKo1vjbgBxUDvFfH6fIoAaG7ofkIEVjSYkMkda8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ngYnJqm+uClE5DBVZFn04xFsahP8ahb/NDV6BLD1pk8UxuFHDDq32kW4rIAARuk3Y iTJbVitr/LiyBtWknE4YQcV1FwDzLACTgeOqXp64XeUwoR1vRjIAEvUBroHUc+Iip3 X0qNZJzhYbAA5EP3sll4JFb6HYR6Z8dVweOqmUJ1rB6mnBd9k8UUHb+goHOAIJ/ZOU Iq3iT+EbfRNAIzKtmcPZfczXqJrnzstF0clppPtufmIfm127PQ1O8HBVDvPfcQkeFc RrRkSnBmP9dmKzFWo3xSSO6PPE3QEROBY2E52gV4RT1HemcSM1MuZGzTEPAVTVPZJT SWlGVh6W10a1Q== From: Robert Beckett To: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter Cc: kernel@collabora.com, Robert Beckett , Matthew Auld , =?UTF-8?q?Thomas=20Hellstr=C3=B6m?= , linux-kernel@vger.kernel.org Subject: [PATCH v11 08/10] drm/i915/selftest: don't attempt engine reset of guc submission engines Date: Wed, 13 Jul 2022 14:50:20 +0100 Message-Id: <20220713135022.3710682-9-bob.beckett@collabora.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220713135022.3710682-1-bob.beckett@collabora.com> References: <20220713135022.3710682-1-bob.beckett@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 igt_reset_engines_stolen tries to reset engines without checking if it is possible. Engines using GuC submission are not able to be reset from the host. In this scenario, the reset exits early, then on the next iteration of the each engine loop, the async teardown of the spinner request context's ring occurs while the next engine is under test. This is seen as a stolen memory corruption as the ring buffer was busy initially, but free during the confirmation check and had been poisoned during cleanup. Fix this by not testing GuC submission using engines. Signed-off-by: Robert Beckett --- drivers/gpu/drm/i915/gt/selftest_reset.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/selftest_reset.c b/drivers/gpu/drm/i915/gt/selftest_reset.c index 37c38bdd5f47..55f3b34e5f6e 100644 --- a/drivers/gpu/drm/i915/gt/selftest_reset.c +++ b/drivers/gpu/drm/i915/gt/selftest_reset.c @@ -194,6 +194,8 @@ static int igt_reset_engines_stolen(void *arg) return 0; for_each_engine(engine, gt, id) { + if (intel_engine_uses_guc(engine)) + continue; err = __igt_reset_stolen(gt, engine->mask, engine->name); if (err) return err; -- 2.25.1