]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: hv: Propagate coherence from VMbus device to PCI device
authorMichael Kelley <mikelley@microsoft.com>
Thu, 24 Mar 2022 16:14:52 +0000 (09:14 -0700)
committerWei Liu <wei.liu@kernel.org>
Tue, 29 Mar 2022 12:12:50 +0000 (12:12 +0000)
commitc23a8d94857cf0a9540f7519de131f23f8acde7b
tree1ac06132324efd4ec5d0f39c0de24ec9687d3995
parent4f0da072e8272e759aace51752f81725662d9bba
PCI: hv: Propagate coherence from VMbus device to PCI device

PCI pass-thru devices in a Hyper-V VM are represented as a VMBus
device and as a PCI device.  The coherence of the VMbus device is
set based on the VMbus node in ACPI, but the PCI device has no
ACPI node and defaults to not hardware coherent.  This results
in extra software coherence management overhead on ARM64 when
devices are hardware coherent.

Fix this by setting up the PCI host bus so that normal
PCI mechanisms will propagate the coherence of the VMbus
device to the PCI device. There's no effect on x86/x64 where
devices are always hardware coherent.

Signed-off-by: Michael Kelley <mikelley@microsoft.com>
Acked-by: Boqun Feng <boqun.feng@gmail.com>
Acked-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/1648138492-2191-3-git-send-email-mikelley@microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
drivers/pci/controller/pci-hyperv.c