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 <email address hidden>
Acked-by: Boqun Feng <email address hidden>
Acked-by: Robin Murphy <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Wei Liu <email address hidden>
(cherry picked from commit 8d21732475c637c7efcdb91dc927a4c594e97898)
Signed-off-by: Tim Gardner <email address hidden>
Acked-by: Marcelo Cerri <email address hidden>
Acked-by: Khaled Elmously <email address hidden>
Signed-off-by: Tim Gardner <email address hidden>
VMbus synthetic devices are not represented in the ACPI DSDT -- only
the top level VMbus device is represented. As a result, on ARM64
coherence information in the _CCA method is not specified for
synthetic devices, so they default to not hardware coherent.
Drivers for some of these synthetic devices have been recently
updated to use the standard DMA APIs, and they are incurring extra
overhead of unneeded software coherence management.
Fix this by propagating coherence information from the VMbus node
in ACPI to the individual synthetic devices. There's no effect on
x86/x64 where devices are always hardware coherent.
Signed-off-by: Michael Kelley <email address hidden>
Acked-by: Robin Murphy <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Wei Liu <email address hidden>
(backported from commit 37200078ed6aa2ac3c88a01a64996133dccfdd34)
[rtg - Use include/linux/dma-mapping.h, also a context adjustment in mshyperv.h]
Signed-off-by: Tim Gardner <email address hidden>
Acked-by: Marcelo Cerri <email address hidden>
Acked-by: Khaled Elmously <email address hidden>
Signed-off-by: Tim Gardner <email address hidden>