]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Hyper-V: vPCI: Prepopulate device bars
authorWei Hu <whu@FreeBSD.org>
Sat, 27 Nov 2021 06:42:34 +0000 (06:42 +0000)
committerEd Maste <emaste@FreeBSD.org>
Mon, 10 Jan 2022 18:04:06 +0000 (13:04 -0500)
commitf1b8efb1b4ffc2182385d3f5cc26c37a4ad59026
tree9eeab6eead09d67055dfa4adb2185257ef304926
parent10fd3f883ad99d7ed999144c93940889e683b971
Hyper-V: vPCI: Prepopulate device bars

In recent Hyper-V releases on Windows Server 2022, vPCI code does not
initialize the last 4 bit of device bar registers. This behavior change
could result weird problems cuasing PCI code failure when configuring
bars.

Just write all 1's to those bars whose probed values are not the same
as current read ones. This seems to make Hyper-V vPCI and
pci_write_bar() to cooperate correctly on these releases.

Reported by: khng@freebsd.org
Tested by: khng@freebsd.org
MFC after: 2 weeks
Sponsored by: Microsoft

(cherry picked from commit 75412a521f60d4b0393c730ffb284e7c6ff9d2de)
(cherry picked from commit eabea1c700ad8eacb8dc780d8620b59ce72b2cf2)

Approved by: so
Errata: FreeBSD-EN-22:03.hyperv
sys/dev/hyperv/pcib/vmbus_pcib.c