Page MenuHomeFreeBSD

bhyve: add config option to load ACPI tables into memory
ClosedPublic

Authored by corvink on May 5 2023, 1:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 30, 11:43 AM
Unknown Object (File)
Sun, Oct 27, 12:59 AM
Unknown Object (File)
Oct 4 2024, 2:41 PM
Unknown Object (File)
Sep 26 2024, 2:49 PM
Unknown Object (File)
Sep 24 2024, 2:18 AM
Unknown Object (File)
Sep 23 2024, 9:27 PM
Unknown Object (File)
Sep 19 2024, 11:51 PM
Unknown Object (File)
Sep 19 2024, 1:26 PM

Details

Summary

For backward compatibility, the ACPI tables are loaded into the guest
memory. Windows scans the memory, finds the ACPI tables and uses them.
It ignores the ACPI tables provided by the UEFI. We are patching the
ACPI tables in the guest memory, so that's mostly fine. However, Windows
will break when the ACPI tables become to large or when we are adding
fwcfg items like the tpm log to an table which can't be patched by
bhyve.

By default ACPI tables are still loaded into guest memory for backward
compatibility. The new acpi_tables_in_memory config value can be set to
false to avoid this behaviour.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Do you think we should add this option now or should we wait until someone has some issues or a feature requires it?

It might be helpful for debugging purposes too.

Do you think we should add this option now or should we wait until someone has some issues or a feature requires it?

It might be helpful for debugging purposes too.

When do you suspect this will become an issue for users?

Sounds like you have features that are queued up that will use this?

In D39979#910184, @rew wrote:

Do you think we should add this option now or should we wait until someone has some issues or a feature requires it?

It might be helpful for debugging purposes too.

When do you suspect this will become an issue for users?

There are two cases I'm aware of yet:

  1. Our memory approach is size limited. We can only use the range [ 0xf2400, 0x100000]. Don't know what happens if we exceed it.
  1. A TPM log is adding a pointer to ACPI tables which needs to be patched by the guest.

Sounds like you have features that are queued up that will use this?

My TPM emulation D32961 will add the TPM log. It's a long overdue task of mine to update this revision. As all ACPI related pre work is merged now, I'm going to update it soon.

corvink retitled this revision from RFC: bhyve: add config option to load ACPI tables into memory to bhyve: add config option to load ACPI tables into memory.
  • rebase onto main

How can this behaviour be requested from the command line? -o acpi_tables_in_memory=false?

usr.sbin/bhyve/bhyve_config.5
126
127
128
130

How can this behaviour be requested from the command line? -o acpi_tables_in_memory=false?

Yes, you can request this behaviour with -o acpi_tables_in_memory=false from cmdline.

  • update man page as suggested
markj added inline comments.
usr.sbin/bhyve/bhyve_config.5
129

My suggestion was to delete this sentence.

130

This line is too long.

This revision is now accepted and ready to land.Aug 21 2023, 12:47 PM