HomeFreeBSD

Hyper-V: vmbus: Prevent load/store reordering when access ring buffer index

Description

Hyper-V: vmbus: Prevent load/store reordering when access ring buffer index

When running VM on ARM64 Hyper-V, we have seen netvsc/hn driver hit
assert on reading duplicated network completion packets over vmbus
channel or one of the tx channels stalls completely. This seems to
caused by processor reordering the instructions when vmbus driver
reading or updating its channel ring buffer indexes.

Fix this by using load acquire and store release instructions to
enforce the order of these memory accesses.

PR: 271764
Reported by: Souradeep Chakrabarti <schakrabarti@microsoft.com>
Reviewed by: Souradeep Chakrabarti <schakrabarti@microsoft.com>
Tested by: whu
Sponsored by: Microsoft

Details

Provenance
whuAuthored on Jun 21 2023, 9:31 AM
Parents
rG83c701af5340: stress2: Added two syzkaller reproducers
Branches
Unknown
Tags
Unknown