mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
PCI: Accept AtomicOps already enabled by the hypervisor
pci_enable_atomic_ops_to_root() currently fails when no Root Port is visible. That is common in passthrough guests (ESXi, Hyper-V): the Endpoint is assigned to the VM, but the Root Port above it is not visible in the guest topology. In those setups the hypervisor may already have enabled AtomicOp Requester Enable on the device. If PCI_EXP_DEVCTL2_ATOMIC_REQ is set, treat AtomicOps as already enabled and return success instead of failing the Root Port walk. After1ae8c4ce15("PCI: Enable AtomicOps only if Root Port supports them"), pci_enable_atomic_ops_to_root() always returns failure if the Root Port is not visible, so drivers don't use atomics when they could. On systems where the Root Port is not visible but *does* support AtomicOps, this is a regression: prior to1ae8c4ce15, it enabled AtomicOps in the endpoint and returned success. Fixes:1ae8c4ce15("PCI: Enable AtomicOps only if Root Port supports them") Signed-off-by: Nikola Prica <nikola.prica@amd.com> [bhelgaas: commit log, code comment] Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Tested-by: Gerd Bayer <gbayer@linux.ibm.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Gerd Bayer <gbayer@linux.ibm.com> Link: https://patch.msgid.link/20260921111903.978687-1-nikprica@amd.com
This commit is contained in:
parent
cee9395acd
commit
40cce45b92
1 changed files with 14 additions and 1 deletions
Loading…
Add table
Add a link
Reference in a new issue