]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 27 Apr 2022 10:00:54 +0000 (12:00 +0200)
commit01c7ff2128fee2a5d8d49e9678be2e139269d1b7
tree131dc67128bb7b9d0d53e43c9f96a6d636895e35
parente0326d91e73b8d4effa1b4b019d2a5f3c3cb3e47
PCI: hv: Propagate coherence from VMbus device to PCI device

BugLink: https://bugs.launchpad.net/bugs/1969857
[ Upstream commit 8d21732475c637c7efcdb91dc927a4c594e97898 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/pci/controller/pci-hyperv.c