From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5011642B74B for ; Wed, 12 Aug 2026 11:37:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786534681; cv=none; b=NlBrP9IevmBT/2MlkYEJOQ1Qk/A5rSMSX9L7cdSDHrOxDbxCLkyKbpB3e2rHgKy2mp5icbcfx3s1K58n/8AYC7ewcjwOtjXh1nld6aLc/OxSM9YiI4anG7DnmCH8a86F/gq110oZndyfvJ43lHINEugKvpROPht2a52nxyAcSbo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786534681; c=relaxed/simple; bh=ZACaCqxrHuvlYmnW+yEEfmS9VfnqhzGc5sDwLqfSt5g=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=uYMc+1lvlt74Me9RF+SfXe03n5Up723mlEtOQcXi2iFQ6qWxAbC8Jwm00frHxpU1jau64tbw7FZ4UVOMeTbaDg2cEBMQ/fDED9z8ZlHi0W04mSwNwXllAsbEdd76RoAzkhplEtaoYSSqzca6f6L38LBzFGFACjlYEFKOrAmUHC0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=QYcROWoJ; arc=none smtp.client-ip=209.85.208.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QYcROWoJ" Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-39f927721f2so6606521fa.0 for ; Wed, 12 Aug 2026 04:37:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786534675; x=1787139475; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=vcy0V4sanVWnhAv8P2awTDxn202Hp42bIgbbeqoNGH0=; b=QYcROWoJ/YXxEwZiY6knZ5NUfv9BYwGVLkfTVHF69y/oBx+A/lJpdsZOR7+Lvxsv47 JxuGybxSaCim9bGTXv6oercWAzIaVqHRqxL+Q+VnUI+dCequ53H0JfDrUalTyz96u9zW a0plAiU6YuCzwZE2Xln1vxiTu/Eq49Kp4ISAMi/tHg6R0aiTKbziA32GuSh0+UEuGYS5 0vNtlqMfqT8+yZ9hQLDgmyI7X8dGrtCWPN3FDUgRu788BDS9nYdn4yZMFnQQydZTardQ pfEsAccCzi72uRTij/NrJwd+0skcUb1jIL1pUo1vZm635hMk7mAFWsB5+9DdmGcJEHLb pL3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786534675; x=1787139475; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=vcy0V4sanVWnhAv8P2awTDxn202Hp42bIgbbeqoNGH0=; b=j6gGaPpmOTolPlHbj1sWqP+y3F6wTJyCU49eih4t0fo3yl9dvuloxHMbjYglyNyqnc KUM6NQVdRmHx8uXIWdEPYWhLvI5wSJucJKqJqyrydisHpi1zNByRT3/Xpz9jcWDJKUBj t8fPYojuE+dSY4VZjCY6tH51EH0R4T7cp1nr+kiWJwnt1gfMYEO0whVRBjrZAn8EhkCI KAWQxP/8U0S2LDPPTa6YJjys3BRcHBupUzNoFx+q5s/go/AYl5RUCt60xaOArRiJsPMR xD6K1m3Bs31rhVhQyMsthcZrEBJB5S5fYhj4OEuEX4yYPKk3DNwy/hhef0EtvnAXpa/P 8pWg== X-Forwarded-Encrypted: i=1; AHgh+RrJN+Qst9H+ujbUGV+a1veqZGo/1KHvVAT3eZC0JBH65owCyVjNOJBb7wcn+4dLlg5P4PvzOXsYOG7kdqs=@vger.kernel.org X-Gm-Message-State: AOJu0Yy23IrwTQ+m0bDeXorTVX5sqWM2FPM00J2sP9YAJY10c50iZML+ qHcoHi/JLo2yz0XjqMRhEEE28YF1wOeb1Wa029b/BVZ79e4SibO3Nr8B X-Gm-Gg: AR+sD13dzqzs549V6yYNX1PXivLNX0e8DcmCJjhapLI9Hp7VKo+rn47ieG0mL+TR0L8 mVd0Xr4WEHcOiVZPrjuHctiWa2R1pN27rh29tSueWS2ULnCQOknB7LVjv6u8XClLFua+Bur5nbQ 7yGM1EU9w+t/leixxHQVOO+b9CqShlUbS4uCgx/aTu3cdMpHDI0483lS9sgrl9mgsiwmw24fBBK Z5ZXoTY0eTEHd3XqtQ3QHthOO6yWlUqps7rUz2UIdXdRdIe2yG2RUIxvyaPoHdorYhRBYCat6RN xk6WNohnG1qAUw19m4AZFCh+LCnBOQRj1Y7FynLQt2/Ndrbg/XzOhEEp5Lkyix50LHuNs/UpKAJ 1mcuQlHSZqt5TqE2FDDitgTg739yeF1L9l1nxS8NUSd8PuTuigMgw1pdJRLANrGtvpY7qQFqSG5 KRUcM2mOumbqagoK1LPeUFjD0Js0vUHVxQnJz9G2KaTz5H2ELPh4pkmjAHfaYW4LOS0hVnjvcvT QyH+bM= X-Received: by 2002:a05:651c:2121:b0:3a1:476:74b3 with SMTP id 38308e7fff4ca-3a10d4aa3e3mr4393061fa.9.1786534674956; Wed, 12 Aug 2026 04:37:54 -0700 (PDT) Received: from localhost ([176.210.177.198]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-3a1082d11b9sm3881101fa.33.2026.08.12.04.37.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Aug 2026 04:37:54 -0700 (PDT) From: Vladislav Zaharov To: dakr@kernel.org, acourbot@nvidia.com Cc: aliceryhl@google.com, ttabi@nvidia.com, nova-gpu@lists.linux.dev, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Vladislav Zaharov Subject: [PATCH 0/2] gpu: nova-core: retain the GSP-RM log buffers Date: Wed, 12 Aug 2026 18:37:50 +0700 Message-ID: <20260812113752.532537-1-vladazaharova2018@gmail.com> X-Mailer: git-send-email 2.55.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The GSP-RM log buffers are exposed through debugfs, but the entries are owned by the Gpu that probe() builds, and the buffers themselves are DMA allocations that cannot outlive the device. They are therefore gone as soon as the GPU is unbound, and in particular as soon as probe() fails - which is the case todo.rst singled out ("even after failure to probe the driver"), and the one where a GSP log is worth having. Patch 1 adds CONFIG_NOVA_CORE_KEEP_GSP_LOGS: when the log buffers are dropped, whatever the GSP wrote is copied into memory owned by the module and exposed under a "retained" directory until the module is unloaded. Patch 2 drops the now completed task from todo.rst. nouveau has the same feature behind its keep_gsp_logging module parameter. It recreates the entries under the name of the GPU that just went away, which collides with that GPU coming back; the "retained" directory here avoids that. Tested on a GB203 (RTX 5080), which the driver probes successfully: - after an unbind, retained//{loginit,logintr,logrm} hold the contents the live entries had; - with a failure injected after the GSP has booted, probe() fails and the logs of that attempt are still readable; - binding the GPU again does not disturb the copies, and unbinding it a second time replaces them; - the copies are released on module unload, with nothing left behind; - with the option off, the entries disappear on unbind as before. Built and checked with CLIPPY=1 and rustfmtcheck for both settings of the new option. The testing was done on top of e6c2c6265521 ("rust: firmware: add request_into_buf()"), that is, before the TLV firmware series, because the nvidia/*/gsp/*.tlv images are not in linux-firmware yet and the driver therefore cannot load firmware at the current tip. The series applies and builds unchanged on top of drm-rust-next. Vladislav Zaharov (2): gpu: nova-core: gsp: retain the GSP-RM log buffers after unbind Documentation: nova: remove completed GSP log buffer task Documentation/gpu/nova/core/todo.rst | 12 --- drivers/gpu/nova-core/Kconfig | 18 ++++ drivers/gpu/nova-core/gsp.rs | 146 +++++++++++++++++++++++++++ drivers/gpu/nova-core/nova_core.rs | 19 ++++ 4 files changed, 183 insertions(+), 12 deletions(-) -- 2.55.0