]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
bhyve: avoid allocating BARs above the end of supported physical addresses.
authorKonstantin Belousov <kib@FreeBSD.org>
Thu, 12 Nov 2020 00:46:53 +0000 (00:46 +0000)
committerKonstantin Belousov <kib@FreeBSD.org>
Thu, 12 Nov 2020 00:46:53 +0000 (00:46 +0000)
commit9922872ba29b1d985eefb5dd3d3cfa9e42d94656
tree11c593c348e8991ba6db4e4142f4254c40d5cdce
parent62dbc992ad02c7aae6a83fbc8b1839834d9149fd
bhyve: avoid allocating BARs above the end of supported physical addresses.

Read CPUID leaf 0x8000008 to determine max supported phys address and
create BAR region right below it, reserving 1/4 of the supported guest
physical address space to the 64bit BARs mappings.

PR:    250802 (although the issue from PR is not fixed by the change)
Noted and reviewed by: grehan
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D27095
usr.sbin/bhyve/pci_emul.c