]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
bhyve: read out graphics stolen memory address and size
authorCorvin Köhne <corvink@FreeBSD.org>
Thu, 11 May 2023 08:53:15 +0000 (10:53 +0200)
committerCorvin Köhne <corvink@FreeBSD.org>
Fri, 18 Aug 2023 07:32:07 +0000 (09:32 +0200)
commit13a371bcdfdde22344f01fbbb04e713c27424c32
tree2432611f9433556e0a94c95a088d4b8d156e4660
parent3b81aa26ab4c8fb360d25a6cd2fedc49cff67e51
bhyve: read out graphics stolen memory address and size

This is the first step to emulate the graphics stolen memory register.

Note that the graphics stolen memory is somehow confusing. On the one
hand the Intel Open Source HD Graphics Programmers' Reference Manual
states that it's only GPU accessible. As the CPU can't access the area,
the guest shouldn't need it. On the other hand, the Intel GOP driver
refuses to work properly, if it's not set to a proper address.

Intel itself maps it into the guest by EPT [1]. At the moment, we're not
aware of any situation where this EPT mapping is required, so we don't
do it yet.

Intel also states that the Windows driver for Tiger Lake reads the
address of the graphics stolen memory [2]. As the GVT-d code doesn't
support Tiger Lake in its first implementation, we can't check how it
behaves. We should keep an eye on it.

[1]
https://github.com/projectacrn/acrn-hypervisor/blob/e28d6fbfdfd556ff1bc3ff330e41d4ddbaa0f897/devicemodel/hw/pci/passthrough.c#L655-L657
[2]
https://github.com/projectacrn/acrn-hypervisor/blob/e28d6fbfdfd556ff1bc3ff330e41d4ddbaa0f897/devicemodel/hw/pci/passthrough.c#L626-L629

Reviewed by: markj
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D40039

(cherry picked from commit 4a9bf50f408eb9f1acc220dba2b260ec610fd15b)
usr.sbin/bhyve/pci_gvt-d.c