public inbox for linux-pci@vger.kernel.org
 help / color / mirror / Atom feed
From: Mario Limonciello <mario.limonciello@amd.com>
To: Cristian Cocos <cristi@ieee.org>, Geramy Loveless <gloveless@jqluv.com>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	linux-pci@vger.kernel.org,
	"Christian König" <christian.koenig@amd.com>
Subject: Re: [PATCH v2] PCI: release empty sibling bridge windows during rebar expansion
Date: Fri, 10 Apr 2026 22:28:13 -0500	[thread overview]
Message-ID: <2fe254c2-38f2-4213-9055-43b810502ccd@amd.com> (raw)
In-Reply-To: <58b240e489d3a4d41e7dbbe5720b80c310700582.camel@ieee.org>



On 4/10/26 18:21, Cristian Cocos wrote:
> [You don't often get email from cristi@ieee.org. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
> 
> In *Windows*, yes, GPUs have indeed been supported in eGPU
> configuration, though not so much in Linux(!). The troubles we are
> currently experiencing, esp. concerning hot-plugging, have not been
> reported simply because eGPUs in Linux has, so far, been a very niche,
> limited application. In other words, it's not that these issues have
> not been around, it's just that they have not been REPORTED due to a
> very limited pool of users running Linux in eGPU configuration. GPU
> manufacturers have thus focused on patching up bugs in Windows, while
> hot-plugging-Thunderbolt-eGPUs-in-Linux has fallen onto the back burner
> due to its small market share. As such, I doubt that TB5 has anything
> to do with all this.
> 
> On Fri, 2026-04-10 at 16:01 -0700, Geramy Loveless wrote:
>> So after a while of doing investigations I keep thinking, gpus have
>> supported hotplug or so i would believe for a while ever since at
>> least thunderbolt 4 and possibly older styles too of hotplug as well
>> as dual gpu machines like laptops that have a dedicated and
>> integrated. I would think all of these problems we are seeing is most
>> likely due to something very specific to thunderbolt 5. So here is a
>> theory.
>>
>> Root port ACPI device: \_SB_.PCI0.GP10 at address 0x00030002 = PCI
>> 00:03.2
>> Its _DSD (Device-Specific Data) contains only:
>> "FundamentalDeviceResetTriggeredOnD3ToD0" = 1
>>
>> No ExternalFacingPort property. The firmware gives it a D3-to-D0
>> reset
>> hint but never declares it as external-facing.
>> For comparison, a properly configured system would have:
>>
>> Package {"ExternalFacingPort", 1},
>> Package {"DmaProperty", 1},
>>
>> The complete proof chain:
>>
>> DSDT (/tmp/dsdt.dsl:4194-4205): GP10 (00:03.2) _DSD has no
>> ExternalFacingPort
>> pci_acpi_set_external_facing() (pci-acpi.c:1422):
>> device_property_read_u8("ExternalFacingPort") fails → external_facing
>> stays 0
>> pci_set_removable() (probe.c:1780): parent not removable → falls
>> through
>> arch_pci_dev_is_removable() (arch/x86/pci/acpi.c:353):
>> !root->external_facing → returns false
>> Result: dev->removable never set to DEVICE_REMOVABLE on any device in
>> the chain
>>
>> Sysfs proof:
>>    00:03.2: removable=N/A, external_facing=N/A
>>    65:00.0: removable=N/A
>>    66:03.0: removable=N/A  (TB bridge with HotPlug+ Surprise+)
>>    93:00.0: removable=N/A
>>    97:00.0: removable=N/A  (eGPU — dev_is_removable() returns false)
>>
>> I'm not sure its correct so much but I have patched up the amdgpu
>> driver myself to use what its using now and "||
>> pci_is_thunderbolt_attached"
>> This might be entirely completely wrong :D but I figured I would see
>> what happens.
>>

I would say it's wrong.  We explicitly moved away from this because it's 
only indicating there is an Intel VSEC:

commit 7b1c6263eaf4f ("drm/amdgpu: don't use pci_is_thunderbolt_attached()")

Isn't what you point out a BIOS bug?

If the BIOS has an externally facing port without ExternalFacingPort or 
DmaProperty it's going to cause problems in Windows too.

https://learn.microsoft.com/en-us/windows-hardware/drivers/pci/dsd-for-pcie-root-ports#identifying-externally-exposed-pcie-root-ports

Now granted; in Linux we might be using this a little bit differently.

If we were going to do /anything/ in Linux - I would say adding 
pci_is_thunderbolt_attached() as another criteria that marks devices as 
removable is what makes sense.



  reply	other threads:[~2026-04-11  3:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-08 22:31 [PATCH] PCI: release empty sibling resources during bridge window resize Geramy Loveless
2026-04-09  8:03 ` Ilpo Järvinen
     [not found]   ` <CAGpo2mcyLhY6muz9Zgg3zD=Ux-HT8RXeMvbUi27a+SX=VxCRPQ@mail.gmail.com>
2026-04-09 13:26     ` Ilpo Järvinen
2026-04-09 19:32       ` Cristian Cocos
2026-04-10  5:26         ` [PATCH v2] PCI: release empty sibling bridge windows during rebar expansion Geramy Loveless
2026-04-10 10:09           ` Ilpo Järvinen
2026-04-10 17:53             ` Geramy Loveless
2026-04-10 18:58               ` Cristian Cocos
2026-04-10 19:10                 ` [PATCH] PCI: release empty sibling bridge resources during window resize Geramy Loveless
2026-04-13 10:22                   ` Ilpo Järvinen
2026-04-10 19:14                 ` [PATCH v2] PCI: release empty sibling bridge windows during rebar expansion Geramy Loveless
2026-04-10 23:01                   ` Geramy Loveless
2026-04-10 23:21                     ` Cristian Cocos
2026-04-11  3:28                       ` Mario Limonciello [this message]
2026-04-11 16:30                         ` Geramy Loveless
2026-04-11 17:42                           ` Mario Limonciello

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=2fe254c2-38f2-4213-9055-43b810502ccd@amd.com \
    --to=mario.limonciello@amd.com \
    --cc=christian.koenig@amd.com \
    --cc=cristi@ieee.org \
    --cc=gloveless@jqluv.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-pci@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox