* [RFC] Unrevert "PCI: acpiphp: Reassign resources on bridge if necessary"
@ 2026-11-16 16:52 Sebastian Ott
2026-11-16 17:12 ` Michael S. Tsirkin
0 siblings, 1 reply; 4+ messages in thread
From: Sebastian Ott @ 2026-11-16 16:52 UTC (permalink / raw)
To: Rafael J. Wysocki, Len Brown, Bjorn Helgaas, Michael S. Tsirkin,
Igor Mammedov, Fiona Ebner
Cc: linux-acpi, linux-pci
Hej Folks,
using ACPI PCI hotplug with qemu on ARM for a device with a
BAR > 2M fails because of a resource allocation failure in the
guest kernel.
Without ACPI hotplug the same usecase works because the native
PCIe hotplug controller would increase the resource window of
the parent PCI bus.
X86 shows the same behavior but default resource window sizes
are different and qemu can use ACPI DSM #5 to hint the guest
to keep larger (predefined) resource windows.
Efforts to adapt that behavior in qemu on ARM failed [1]
because they've caused regressions elsewhere and maintainers
thought that Linux hotplug controller should be changed.
But this also has been tried before:
40613da52b13 ("PCI: acpiphp: Reassign resources on bridge if necessary")
Unfortunately that led to regressions as well [2] and the patch was
reverted:
5df12742b7e3 ("Revert "PCI: acpiphp: Reassign resources on bridge if necessary"")
I've tried the reproducer mentioned in [2] using recent kernels for a
couple 1000 times and didn't ran into issues.
Could we give this patch another shot? Or does someone have another idea
on how to make ACPI PCI hotplug work with large BARs without breaking
something else.
[1] https://lore.kernel.org/qemu-arm/0de640a2-8807-69cf-4429-672263e3e759@redhat.com/
[2] https://lore.kernel.org/all/9eb669c0-d8f2-431d-a700-6da13053ae54@proxmox.com/
Thanks,
Sebastian
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [RFC] Unrevert "PCI: acpiphp: Reassign resources on bridge if necessary"
2026-11-16 16:52 [RFC] Unrevert "PCI: acpiphp: Reassign resources on bridge if necessary" Sebastian Ott
@ 2026-11-16 17:12 ` Michael S. Tsirkin
2026-11-16 18:03 ` Sebastian Ott
0 siblings, 1 reply; 4+ messages in thread
From: Michael S. Tsirkin @ 2026-11-16 17:12 UTC (permalink / raw)
To: Sebastian Ott
Cc: Rafael J. Wysocki, Len Brown, Bjorn Helgaas, Igor Mammedov,
Fiona Ebner, linux-acpi, linux-pci
On Mon, Nov 16, 2026 at 05:52:23PM +0100, Sebastian Ott wrote:
> Hej Folks,
>
> using ACPI PCI hotplug with qemu on ARM for a device with a
> BAR > 2M fails because of a resource allocation failure in the
> guest kernel.
>
> Without ACPI hotplug the same usecase works because the native
> PCIe hotplug controller would increase the resource window of
> the parent PCI bus.
>
> X86 shows the same behavior but default resource window sizes
> are different and qemu can use ACPI DSM #5 to hint the guest
> to keep larger (predefined) resource windows.
>
> Efforts to adapt that behavior in qemu on ARM failed [1]
> because they've caused regressions elsewhere and maintainers
> thought that Linux hotplug controller should be changed.
>
> But this also has been tried before:
> 40613da52b13 ("PCI: acpiphp: Reassign resources on bridge if necessary")
>
> Unfortunately that led to regressions as well [2] and the patch was
> reverted:
> 5df12742b7e3 ("Revert "PCI: acpiphp: Reassign resources on bridge if necessary"")
>
> I've tried the reproducer mentioned in [2] using recent kernels for a
> couple 1000 times and didn't ran into issues.
>
> Could we give this patch another shot? Or does someone have another idea
> on how to make ACPI PCI hotplug work with large BARs without breaking
> something else.
>
> [1] https://lore.kernel.org/qemu-arm/0de640a2-8807-69cf-4429-672263e3e759@redhat.com/
> [2]
> https://lore.kernel.org/all/9eb669c0-d8f2-431d-a700-6da13053ae54@proxmox.com/
>
> Thanks,
> Sebastian
Why would trying the same thing again lead to a different outcome?
At a minimum, I'd expect an explanation what changed.
--
MST
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [RFC] Unrevert "PCI: acpiphp: Reassign resources on bridge if necessary"
2026-11-16 17:12 ` Michael S. Tsirkin
@ 2026-11-16 18:03 ` Sebastian Ott
2026-11-16 18:11 ` Michael S. Tsirkin
0 siblings, 1 reply; 4+ messages in thread
From: Sebastian Ott @ 2026-11-16 18:03 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: Rafael J. Wysocki, Len Brown, Bjorn Helgaas, Igor Mammedov,
Fiona Ebner, linux-acpi, linux-pci
On Mon, 16 Nov 2026, Michael S. Tsirkin wrote:
> On Mon, Nov 16, 2026 at 05:52:23PM +0100, Sebastian Ott wrote:
>> Hej Folks,
>>
>> using ACPI PCI hotplug with qemu on ARM for a device with a
>> BAR > 2M fails because of a resource allocation failure in the
>> guest kernel.
>>
>> Without ACPI hotplug the same usecase works because the native
>> PCIe hotplug controller would increase the resource window of
>> the parent PCI bus.
>>
>> X86 shows the same behavior but default resource window sizes
>> are different and qemu can use ACPI DSM #5 to hint the guest
>> to keep larger (predefined) resource windows.
>>
>> Efforts to adapt that behavior in qemu on ARM failed [1]
>> because they've caused regressions elsewhere and maintainers
>> thought that Linux hotplug controller should be changed.
>>
>> But this also has been tried before:
>> 40613da52b13 ("PCI: acpiphp: Reassign resources on bridge if necessary")
>>
>> Unfortunately that led to regressions as well [2] and the patch was
>> reverted:
>> 5df12742b7e3 ("Revert "PCI: acpiphp: Reassign resources on bridge if necessary"")
>>
>> I've tried the reproducer mentioned in [2] using recent kernels for a
>> couple 1000 times and didn't ran into issues.
>>
>> Could we give this patch another shot? Or does someone have another idea
>> on how to make ACPI PCI hotplug work with large BARs without breaking
>> something else.
>>
>> [1] https://lore.kernel.org/qemu-arm/0de640a2-8807-69cf-4429-672263e3e759@redhat.com/
>> [2]
>> https://lore.kernel.org/all/9eb669c0-d8f2-431d-a700-6da13053ae54@proxmox.com/
>>
>> Thanks,
>> Sebastian
>
> Why would trying the same thing again lead to a different outcome?
> At a minimum, I'd expect an explanation what changed.
I couldn't reproduce the reported issue with scsi hotplug on recent
kernels. I have not done a bisect though since I couldn't even build
the kernel for which the issue was initially reported with recent
toolchain. So I can't answer what exactly made the issue go away.
Sebastian
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [RFC] Unrevert "PCI: acpiphp: Reassign resources on bridge if necessary"
2026-11-16 18:03 ` Sebastian Ott
@ 2026-11-16 18:11 ` Michael S. Tsirkin
0 siblings, 0 replies; 4+ messages in thread
From: Michael S. Tsirkin @ 2026-11-16 18:11 UTC (permalink / raw)
To: Sebastian Ott
Cc: Rafael J. Wysocki, Len Brown, Bjorn Helgaas, Igor Mammedov,
Fiona Ebner, linux-acpi, linux-pci
On Mon, Nov 16, 2026 at 07:03:23PM +0100, Sebastian Ott wrote:
> On Mon, 16 Nov 2026, Michael S. Tsirkin wrote:
> > On Mon, Nov 16, 2026 at 05:52:23PM +0100, Sebastian Ott wrote:
> > > Hej Folks,
> > >
> > > using ACPI PCI hotplug with qemu on ARM for a device with a
> > > BAR > 2M fails because of a resource allocation failure in the
> > > guest kernel.
> > >
> > > Without ACPI hotplug the same usecase works because the native
> > > PCIe hotplug controller would increase the resource window of
> > > the parent PCI bus.
> > >
> > > X86 shows the same behavior but default resource window sizes
> > > are different and qemu can use ACPI DSM #5 to hint the guest
> > > to keep larger (predefined) resource windows.
> > >
> > > Efforts to adapt that behavior in qemu on ARM failed [1]
> > > because they've caused regressions elsewhere and maintainers
> > > thought that Linux hotplug controller should be changed.
> > >
> > > But this also has been tried before:
> > > 40613da52b13 ("PCI: acpiphp: Reassign resources on bridge if necessary")
> > >
> > > Unfortunately that led to regressions as well [2] and the patch was
> > > reverted:
> > > 5df12742b7e3 ("Revert "PCI: acpiphp: Reassign resources on bridge if necessary"")
> > >
> > > I've tried the reproducer mentioned in [2] using recent kernels for a
> > > couple 1000 times and didn't ran into issues.
> > >
> > > Could we give this patch another shot? Or does someone have another idea
> > > on how to make ACPI PCI hotplug work with large BARs without breaking
> > > something else.
> > >
> > > [1] https://lore.kernel.org/qemu-arm/0de640a2-8807-69cf-4429-672263e3e759@redhat.com/
> > > [2]
> > > https://lore.kernel.org/all/9eb669c0-d8f2-431d-a700-6da13053ae54@proxmox.com/
> > >
> > > Thanks,
> > > Sebastian
> >
> > Why would trying the same thing again lead to a different outcome?
> > At a minimum, I'd expect an explanation what changed.
>
> I couldn't reproduce the reported issue with scsi hotplug on recent
> kernels. I have not done a bisect though since I couldn't even build
> the kernel for which the issue was initially reported with recent
> toolchain. So I can't answer what exactly made the issue go away.
>
> Sebastian
Try reposting and including info on what testing you did.
--
MST
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-11-16 18:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-16 16:52 [RFC] Unrevert "PCI: acpiphp: Reassign resources on bridge if necessary" Sebastian Ott
2026-11-16 17:12 ` Michael S. Tsirkin
2026-11-16 18:03 ` Sebastian Ott
2026-11-16 18:11 ` Michael S. Tsirkin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox