Page MenuHomeFreeBSD

[PATCH 7/19] bhyve: add basl support for checksums
ClosedPublic

Authored by corvink on Oct 14 2022, 9:13 AM.
Tags
Referenced Files
Unknown Object (File)
Tue, Mar 19, 11:34 AM
Unknown Object (File)
Tue, Mar 19, 11:34 AM
Unknown Object (File)
Tue, Mar 19, 11:34 AM
Unknown Object (File)
Tue, Mar 19, 11:34 AM
Unknown Object (File)
Tue, Mar 19, 11:34 AM
Unknown Object (File)
Tue, Mar 19, 11:34 AM
Unknown Object (File)
Sun, Mar 17, 8:16 PM
Unknown Object (File)
Jan 1 2024, 7:22 AM
Subscribers

Details

Summary

The qemu ACPI table loader patches the ACPI tables. After patching them,
checksums aren't correct any more. It has to calculate a new checksum
for the ACPI table. For that reason, basl has to keep track of checksums
and has to cause the qemu loader to create new checksums for the tables.

The qemu ACPI table loader isn't supported yet. However, the address of all tables is unknown as long as bhyve hasn't finished ACPI table creation. So, the checksum of tables which include pointer to other tables are unknown too. This requires tracking of checksums too.

This is the 7. patch required to merge D36983

Diff Detail

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

Event Timeline

corvink retitled this revision from [acpi-table part 7] bhyve: add basl support for checksums to [PATCH 7/19] bhyve: add basl support for checksums.Oct 14 2022, 9:44 AM
usr.sbin/bhyve/basl.c
60

In the final version we have a bunch of different lists, each is 1-to-1 with the table list. Why don't you embed these structures in struct basl_table instead, so there's only one list and no need for backpointers everywhere?

122
125
148
166
  • rebase
  • turn basl_checksums into a member variable of basl_table to avoid global variables and backpointer
usr.sbin/bhyve/basl.c
208

I would maybe merge this comment with the comment below (so you don't need a separate comment below) by just saying that the second one updates the checksums in the installed tables.

usr.sbin/bhyve/basl.c
208

Nevermind, I see how it factors into later commits.

This revision is now accepted and ready to land.Nov 11 2022, 6:29 PM
This revision was automatically updated to reflect the committed changes.