]> 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)
committerWei Hu <whu@FreeBSD.org>
Tue, 30 Nov 2021 07:43:32 +0000 (07:43 +0000)
commitd11e9de955ea01fe01dce58c7eb090fe0352bced
tree8e9db062bb26377261e2cde27bf41f802c2aaea5
parent5b5bbf2e7c341ec6ba569536fb14acb990d53334
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)
sys/dev/hyperv/pcib/vmbus_pcib.c