HomeFreeBSD

Hyper-V: vmbus: implementat bus_get_dma_tag in vmbus

Description

Hyper-V: vmbus: implementat bus_get_dma_tag in vmbus

In ARM64 Hyper-V UFS filesystem is getting corruption and those
corruptions are consistently happening just after hitting a page
boundary. It is unable to correctly read disk blocks into buffers
that are not aligned to 512-byte boundaries.

It happens because storvsc needs physically contiguous memory which
may not be the case when bus_dma needs to create a bounce buffer.
This can happen when the destination is not cache-line aligned.

Hyper-V VMs have VMbus synthetic devices and PCI pass-thru devices
that are added dynamically via the VMbus protocol and are not
represented in the ACPI DSDT. Only the top level VMbus node exists
in the DSDT. As such, on ARM64 these devices don't pick up coherence
information and default to not hardware coherent.

PR: 267654, 272666
Reviewed by: andrew, whu
Tested by: lwhsu
MFC after: 3 days
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D41728

(cherry picked from commit e7a9817b8d328dda04069b65944ce2ed6f54c6f0)

Details

Provenance
schakrabarti_microsoft.comAuthored on Sep 14 2023, 7:11 AM
whuCommitted on Sep 18 2023, 10:26 AM
Reviewer
andrew
Differential Revision
D41728: vmbus bus_get_dma_tag implementation for arm64
Parents
rG4edfbe719bf6: mana: add ioctl to support toggling offloading features
Branches
Unknown
Tags
Unknown