From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7EFCBCCF9E3 for ; Mon, 10 Nov 2025 23:00:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6BEBB10E0F7; Mon, 10 Nov 2025 23:00:02 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="Fq25NlIc"; dkim-atps=neutral Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5D24E10E0F7; Mon, 10 Nov 2025 23:00:01 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 267E144289; Mon, 10 Nov 2025 23:00:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D9D6EC116B1; Mon, 10 Nov 2025 23:00:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1762815601; bh=BujzcxiDCu1XUvYvuSazspHPPX6uO2Q49KTJHCnBteM=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=Fq25NlIcNfb7ZrirU5L6qzWU2I/qH/CWKW/w8OQC2ZXdZNuXWy0/pVOpyDz+PppPs 3cnnoS0+U7zqxefMGHK+GcEJ1bPvMoc9WS5T/PFJNOdssnEq8A1E4C/BY8kNYJO98f YAfdrTMd2JgFSj+9TM8Va4dY/j+X06X1GOXnZDGrWg3G4JdxW+BZrft8hp8xxrEbtN a1v++eycBKbmZ0FpC1z3pgSkWip7JeVzveINO/Tl8Sc09OVUpiRhUagLR5vm58ignH 7BjniRQXXNFTzb/SlajwviaVC9iw2kmcUH4O/at9YIK46ab2ZALQt8lHOIBaXVqYGS 0zWwumfG8/b8w== Date: Mon, 10 Nov 2025 16:59:58 -0600 From: Bjorn Helgaas To: Ilpo =?utf-8?B?SsOkcnZpbmVu?= Cc: Alex =?utf-8?Q?Benn=C3=A9e?= , Simon Richter , Lucas De Marchi , Alex Deucher , amd-gfx@lists.freedesktop.org, Bjorn Helgaas , David Airlie , dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, Jani Nikula , Joonas Lahtinen , linux-pci@vger.kernel.org, Rodrigo Vivi , Simona Vetter , Tvrtko Ursulin , Christian =?utf-8?B?S8O2bmln?= , Thomas =?utf-8?Q?Hellstr=C3=B6m?= , =?utf-8?Q?Micha=C5=82?= Winiarski , LKML Subject: Re: [PATCH 1/9] PCI: Prevent resource tree corruption when BAR resize fails Message-ID: <20251110225958.GA2142254@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Thu, Oct 30, 2025 at 10:22:27AM +0200, Ilpo Järvinen wrote: > On Wed, 29 Oct 2025, Bjorn Helgaas wrote: > > > On Tue, Oct 28, 2025 at 07:35:43PM +0200, Ilpo Järvinen wrote: > > > pbus_reassign_bridge_resources() saves bridge windows into the saved > > > list before attempting to adjust resource assignments to perform a BAR > > > resize operation. If resource adjustments cannot be completed fully, > > > rollback is attempted by restoring the resource from the saved list. > > > > > Fixes: 8bb705e3e79d ("PCI: Add pci_resize_resource() for resizing BARs") > > > Reported-by: Simon Richter > > > Reported-by: Alex Bennée > > > > If these reports were public, can we include lore URLs for them? > > > > Same question for [PATCH 5/9] PCI: Fix restoring BARs on BAR resize > > rollback path. > > > > I put these all on pci/resource for build testing. I assume we'll > > tweak these based on testing reports and sorting out the pci/rebar > > conflicts. > > Thanks, the links will come in v2 along with fixing a few things found by > more extensive tests by LKP. E.g., it seems clang thinks guard() cannot be > used here because goto jumps over it (auto variable initialization gets > skipped so it's kind of understandable limitation). Just a ping on this. The lkp robot did build this fine: https://lore.kernel.org/r/202510311139.1VIkw3Ez-lkp@intel.com I'm happy to put it in pci/next as-is, especially if the amdgpu and i915 folks are ok with it.