qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] pci: ensure valid link status bits for downstream ports


From: Sebastian Ott
Subject: Re: [PATCH v2] pci: ensure valid link status bits for downstream ports
Date: Tue, 7 Jan 2025 17:48:06 +0100 (CET)

Hello Michael, Marcel,

On Tue, 3 Dec 2024, Alex Williamson wrote:

On Tue,  3 Dec 2024 13:19:28 +0100
Sebastian Ott <sebott@redhat.com> wrote:

PCI hotplug for downstream endpoints on arm fails because Linux'
PCIe hotplug driver doesn't like the QEMU provided LNKSTA:

  pcieport 0000:08:01.0: pciehp: Slot(2): Card present
  pcieport 0000:08:01.0: pciehp: Slot(2): Link Up
  pcieport 0000:08:01.0: pciehp: Slot(2): Cannot train link: status 0x2000

There's 2 cases where LNKSTA isn't setup properly:
* the downstream device has no express capability
* max link width of the bridge is 0

Move the sanity checks added via 88c869198aa63
("pci: Sanity test minimum downstream LNKSTA") outside of the
branch to make sure downstream ports always have a valid LNKSTA.

Signed-off-by: Sebastian Ott <sebott@redhat.com>
Tested-by: Zhenyu Zhang <zhenyzha@redhat.com>
---
 hw/pci/pcie.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

Reviewed-by: Alex Williamson <alex.williamson@redhat.com>

Can you pick this up for the next qemu release, please? It fixes PCI
hotplug for downstream endpoints on arm.

Thanks,
Sebastian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]