From: Lukas Wunner <lukas@wunner.de>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Ben Hutchings <ben@decadent.org.uk>,
David Airlie <airlied@redhat.com>,
Bjorn Helgaas <helgaas@kernel.org>,
Joerg Roedel <joro@8bytes.org>,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
Andi Kleen <ak@linux.intel.com>, Ahmed Salem <x0rw3ll@gmail.com>,
Borislav Petkov <bp@alien8.de>,
dri-devel@lists.freedesktop.org, iommu@lists.linux.dev,
linux-pci@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] agp/amd64: Bind to unsupported devices only if AGP is present
Date: Wed, 2 Jul 2025 15:29:48 +0200 [thread overview]
Message-ID: <aGU0TL7t9IRbqqpa@wunner.de> (raw)
In-Reply-To: <aGUOVbmH1bObAF1r@wunner.de>
[cc += tglx, start of thread:
https://lore.kernel.org/r/f8ff40f35a9a5836d1371f60e85c09c5735e3c5e.1750497201.git.lukas@wunner.de/
]
On Wed, Jul 02, 2025 at 12:47:49PM +0200, Lukas Wunner wrote:
> On Mon, Jun 30, 2025 at 01:10:24PM +0200, Hans de Goede wrote:
> > ping? It would be good to get some consensus on how to
> > fix this and move forward with a fix. Either the patch from
> > this thread; or my patch:
> >
> > https://lore.kernel.org/dri-devel/20250625112411.4123-1-hansg@kernel.org/
> >
> > Works for me, the most important thing here is to get this
> > regression fixed.
>
> You seem to have a machine where you can trigger the
> "Resources present before probing" message.
>
> Would you mind enabling CONFIG_DEBUG_DEVRES=y and adding
> "log_devres=1" to the kernel command line so that we
> can understand what kind of resource is attached to
> the AMD IOMMU, and where that happens.
>
> I don't see invocations of devm_*() in arch/x86/ or
> drivers/iommu/amd/ that would explain the error message.
I just remembered that an MSI is set up for the AMD IOMMU.
And sure enough:
amd_iommu_enable_interrupts()
iommu_init_irq()
iommu_setup_msi()
pci_enable_msi()
__pci_enable_msi_range()
pci_setup_msi_device_domain()
pci_create_device_domain()
msi_create_device_irq_domain()
msi_setup_device_data()
msi_sysfs_create_group()
devm_device_add_group()
... introduced by bf5e758f02fc ("genirq/msi: Simplify sysfs handling").
Not sure if this is the only one or if there are other resources
added anywhere else for the driver-less AMD IOMMU.
We'd have to rework MSI handling to not use devm_*(), so that MSIs
can be requested for a device without it being bound to a driver.
But I suspect tglx may have deliberately designed it to not
support that, in which case what the AMD IOMMU driver does
is somewhat dodgy...
Thanks,
Lukas
next prev parent reply other threads:[~2025-07-02 13:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-21 9:40 [PATCH] agp/amd64: Bind to unsupported devices only if AGP is present Lukas Wunner
2025-06-21 12:07 ` Ben Hutchings
2025-06-21 12:29 ` Lukas Wunner
2025-06-21 13:51 ` Ben Hutchings
2025-06-21 14:05 ` Lukas Wunner
2025-06-24 21:54 ` Ben Hutchings
2025-06-25 14:08 ` Hans de Goede
2025-06-25 14:33 ` Lukas Wunner
2025-06-25 18:43 ` Hans de Goede
2025-06-30 11:10 ` Hans de Goede
2025-07-02 10:47 ` Lukas Wunner
2025-07-02 13:29 ` Lukas Wunner [this message]
2025-07-01 18:28 ` Lukas Wunner
2025-07-02 15:24 ` Lukas Wunner
2025-07-01 18:18 ` Lukas Wunner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aGU0TL7t9IRbqqpa@wunner.de \
--to=lukas@wunner.de \
--cc=airlied@redhat.com \
--cc=ak@linux.intel.com \
--cc=ben@decadent.org.uk \
--cc=bp@alien8.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=hdegoede@redhat.com \
--cc=helgaas@kernel.org \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=linux-pci@vger.kernel.org \
--cc=suravee.suthikulpanit@amd.com \
--cc=tglx@linutronix.de \
--cc=x0rw3ll@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.