qemu/include/hw/pci
Alex Williamson 727b48661f pci: Sync PCIe downstream port LNKSTA on read
The PCIe link speed and width between a downstream device and its
upstream port is negotiated on real hardware and susceptible to
dynamic changes due to signal issues and power management.  In the
emulated device case there is no real hardware link, but we still
might wish to have some consistency between endpoint and downstream
port via a virtual negotiation.  There is of course a real link for
assigned devices and this same virtual negotiation allows the
downstream port to match the endpoint, synchronizing on every read
to support underlying physical hardware dynamically adjusting the
link.

This negotiation is intentionally unidirectional for compatibility.
If the endpoint exceeds the capabilities of the downstream port or
there is no endpoint device, the downstream port reports negotiation
to its maximum speed and width, matching the previous case where
negotiation was absent.  De-tuning the endpoint to match a virtual
link doesn't seem to benefit anyone and is a condition we've thus
far reported without functional issues.

Note that PCI_EXP_LNKSTA is already ignored for migration
compatibility via pcie_cap_v1_fill().

Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Tested-by: Geoffrey McRae <geoff@hostfission.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2018-12-19 16:48:16 -05:00
..
msi.h pci: Convert msi_init() to Error and fix callers to check it 2016-07-05 13:14:41 +03:00
msix.h pci: Convert msix_init() to Error and fix callers 2017-02-01 03:37:18 +02:00
pci_bridge.h hw/pci: factor PCI reserve resources to a separate structure 2018-09-07 17:05:18 -04:00
pci_bus.h hw/pci: Add missing include 2018-11-05 13:24:02 -05:00
pci_host.h pci: Fold host_buses list into PCIHostState functionality 2013-07-07 23:10:57 +03:00
pci_ids.h i386: clarify that the Q35 machine type implements a P35 chipset 2018-11-06 21:35:05 +01:00
pci_regs.h pci: Introduce define for PM capability version 1.1 2016-06-02 10:42:09 +08:00
pci.h pci: Sync PCIe downstream port LNKSTA on read 2018-12-19 16:48:16 -05:00
pcie_aer.h pci: Reduce scope of error injection 2017-05-08 20:32:14 +02:00
pcie_host.h ppc4xx: Add device models found in PPC440 core SoCs 2018-02-16 14:06:07 +11:00
pcie_port.h hw/pci: add QEMU-specific PCI capability to the Generic PCI Express Root Port 2017-09-08 16:15:17 +03:00
pcie_regs.h pcie: Create enums for link speed and width 2018-12-19 16:48:16 -05:00
pcie.h pci: Sync PCIe downstream port LNKSTA on read 2018-12-19 16:48:16 -05:00
shpc.h pci: Convert shpc_init() to Error 2017-07-03 22:29:49 +03:00
slotid_cap.h pci: Convert shpc_init() to Error 2017-07-03 22:29:49 +03:00