Page MenuHomeFreeBSD

bhyve: add support for qemu's ACPI table loader
AbandonedPublic

Authored by corvink on Apr 13 2022, 9:54 AM.
Tags
Referenced Files
Unknown Object (File)
Wed, Apr 17, 4:29 PM
Unknown Object (File)
Fri, Apr 12, 9:35 AM
Unknown Object (File)
Mon, Apr 8, 5:51 PM
Unknown Object (File)
Mon, Apr 8, 5:50 PM
Unknown Object (File)
Feb 11 2024, 9:36 PM
Unknown Object (File)
Feb 11 2024, 9:33 PM
Unknown Object (File)
Feb 11 2024, 7:02 PM
Unknown Object (File)
Jan 28 2024, 11:52 AM

Details

Reviewers
jhb
markj
Group Reviewers
bhyve
Summary

At the moment, bhyve copies his ACPI tables into the guest memory.
This isn't flexible because bhyve has to ensure that the guest
doesn't accidently overwrites the ACPI tables. Additonally, OVMF
doesn't search for ACPI tables in the guest memory. It installs it
own ACPI tables which may be wrong or miss some features.

Qemu has a much more flexible way of providing ACPI for the guest. It
uses it's FwCfg interface to send the ACPI tables to the guest.
The guest copies the ACPI tables from FwCfg into memory. With this
approach the guest can decide on it's own where to copy the ACPI
tables. Some ACPI tables contain pointer to others. For that
reason, the guest has to patch these pointers. Additionally, the
checksums of the ACPI tables won't match if the guest patches the
pointers. Therefore, qemu provides an additional FwCfg item which
contains some instructions for the guest how to patch the ACPI
tables.

This patch adds support for qemu's ACPI table loader to bhyve.
Additionally, all ACPI tables are copied into the guest memory
with correct pointers and checksums. This ensures backward
compatibility.

Note:
This revision is based on

It includes all changes for easier testing.

This revision is split into smaller commits at https://github.com/Beckhoff/freebsd-src/commits/phab/corvink/qemu-loader.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped