From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 91F55371D04; Tue, 31 Mar 2026 19:02:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774983737; cv=none; b=ICmbzKGJ4dtLEHZZh4SwNxja/bpc3xV857fCnwpIFZRfx0Q36nO5eeVph5kgzPzPCFFR5leWChyKC9n2LrfGKVMlJQ/B0ZCL5y7i7qiGQlOnvZz7lwYtkzNdBfn5hTJjuyNJWgR9QfY8T+iNKXTAJnyV2wUfs4Gix29oeq8wwkE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774983737; c=relaxed/simple; bh=6LKaia1gui0870t2wJom1Yf+UwSeejB0rds40fvZQkA=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=JSnwT+yIAZSfW6s4S1x+FhiGLiwj/o5UUGqeopYjn29CaFJQaeSEWF3zs6hGPKNm1+eoQArRq2vHSm8WH46NU9DOKSH+IMtWQ8Wf+akktaNwd8QryyFU7NlEuLyPc/IKy0c5vVa7hicPAMZXdylvsUnXpf39GkuCHrv8e7Bd3aQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UV+GaxKl; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UV+GaxKl" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 20333C19423; Tue, 31 Mar 2026 19:02:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1774983737; bh=6LKaia1gui0870t2wJom1Yf+UwSeejB0rds40fvZQkA=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=UV+GaxKlHH83KMMeT5DsdboK1KYdCH+ZAWRdCQRsrKZwVoL+RlEjIVZ3KzeeCavxO BOTKn/u8N/9oocgZS0PG5G5v/ItJsY5Dkz9XMEDsiRjFF1sGMJhZk62H1DfYvyJ91B ulNFkM+9rqO3jPAm6lYIQ0SypOSub3IBLrzCjh1piJybbUvL7TWEixTqKdijWMmrNI 3L8/8SYzHgNuPvOpqYhNq0h/N87jYt5ZpqsKsyFT9D24s+3KLiqipacyZPDY61ieW7 qZPCSOYBronXsmi0fGAY9nPmpT6qxbxpJHuUNrvUFzzKauw0AvJYJCP51PT0mCTGtU BrqDykD4lYfrg== Date: Tue, 31 Mar 2026 14:02:16 -0500 From: Bjorn Helgaas To: David Matlack Cc: Bjorn Helgaas , Alexander Lobakin , Andy Shevchenko , Bartosz Pawlowski , David Woodhouse , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, Lu Baolu , Raghavendra Rao Ananta Subject: Re: [PATCH v2] PCI: Disable ATS via quirk before notifying IOMMU drivers Message-ID: <20260331190216.GA151735@bhelgaas> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Tue, Mar 31, 2026 at 11:46:22AM -0700, David Matlack wrote: > On Tue, Mar 31, 2026 at 11:38 AM Bjorn Helgaas wrote: > > On Tue, Mar 31, 2026 at 09:01:53AM -0700, David Matlack wrote: > > > On Fri, Mar 27, 2026 at 2:17 PM David Matlack wrote: > > > > > > > /* AMD Raven platform iGPU */ > > > > -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x15d8, quirk_amd_harvest_no_ats); > > > > +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_ATI, 0x15d8, quirk_amd_harvest_no_ats); > > > > > > Sashiko found a bug here that would leave ATS enabled on this device: > > > > > > https://sashiko.dev/#/patchset/20260327211649.3816010-1-dmatlack%40google.com?patch=12646 > > > > Do you want to update the patch to use DECLARE_PCI_FIXUP_HEADER > > instead of DECLARE_PCI_FIXUP_EARLY, as Sashiko suggested? > > > > I don't know the IOMMU init ordering with respect to PCI enumeration, > > but header fixups are run in pci_device_add() before it calls > > device_add(). > > Yes I would like to work on another version. I have 3 things I want to > investigate/fix: > > * Fix the bug Sashiko found with early vs. header fixups. > * Investigate whether no_ats be a u8 instead of unsigned int to avoid > increasing sizeof(struct pci_dev). > * Investigate Boalu's finding. Maybe this issue is specific to VF > creation, and changing the order of calls there would be a better > solution. OK, I'll drop this one for now and watch for an update.