Propagate SMBIOS fields for sysinfo and chassis#78
Merged
Coffeeri merged 5 commits intoFeb 10, 2026
Merged
Conversation
20af178 to
12af9dc
Compare
Coffeeri
commented
Feb 9, 2026
12af9dc to
9b969db
Compare
phip1611
requested changes
Feb 9, 2026
Member
phip1611
left a comment
There was a problem hiding this comment.
Could you please find a way to split the refeactorings and the additions into at least two, possibly more, commits? This will simplify review a lot :)
94c2023 to
46b0207
Compare
phip1611
approved these changes
Feb 10, 2026
Member
phip1611
left a comment
There was a problem hiding this comment.
LGTM! Left a few nits.
Further: Please evaluate if you can create a meaningul unit test for the table construction
46b0207 to
477aabf
Compare
olivereanderson
approved these changes
Feb 10, 2026
477aabf to
8d47337
Compare
phip1611
reviewed
Feb 10, 2026
328eb98 to
2040259
Compare
Member
|
great first contribution to (our fork of) CHV! |
2040259 to
af4afc3
Compare
Split the System Information write into helper functions and reuse the string writer so the table layout and inputs are unchanged. On-behalf-of: SAP leander.kohler@sap.com Signed-off-by: Leander Kohler <leander.kohler@cyberus-technology.de>
Add a small SMBIOS config that carries serial_number, uuid, and OEM strings, and pass it from platform config into x86_64 setup. On-behalf-of: SAP leander.kohler@sap.com Signed-off-by: Leander Kohler <leander.kohler@cyberus-technology.de>
Extend SMBIOS System Information with manufacturer, product, version, family, sku, serial, and uuid fields, add a chassis asset tag, and pass a structured SMBIOS config from --platform into arch setup. Keep OEM strings and legacy serial_number/uuid options working for compatibility. The platform option naming follows `dmidecode -s <field>`. Fields: - system_manufacturer - system_product_name - system_version - system_family - system_serial_number - system_uuid - chassis_asset_tag On-behalf-of: SAP leander.kohler@sap.com Signed-off-by: Leander Kohler <leander.kohler@cyberus-technology.de>
Mark serial_number/uuid as deprecated in the OpenAPI schema and emit warnings when those legacy --platform keys are used, while continuing to accept them for compatibility. On-behalf-of: SAP leander.kohler@sap.com Signed-off-by: Leander Kohler <leander.kohler@cyberus-technology.de>
Add unit tests that walk the SMBIOS binary layout in guest memory and
verify structure ordering, string-set encoding, and error paths.
Tests added:
- smbios_chassis_empty_string_set_has_double_null: verify that
a chassis with no strings emits the double-NUL terminator required
by SMBIOS DSP0134 §6.1.3.
- smbios_chassis_oem_strings_layout: verify the full chain
(BIOS → System → Chassis → OEM → End) when a chassis asset tag and
OEM strings are configured.
- smbios_strings_terminators_default: verify the default table chain
(BIOS → System → End) and check that string indices and string-set
contents match for both structures.
- smbios_strings_too_many: exercise alloc_index up to the u8 limit
(255 strings) and verify the 256th is rejected.
- smbios_uuid_invalid_rejected: ensure a malformed UUID string is
rejected with Error::ParseUuid.
- smbios_uuid_written_le: ensure the UUID is stored in little-endian
byte order as required by SMBIOS Spec 7.2.1.
- smbios_write_fails_with_too_small_memory: verify that setup_smbios
fails with Error::WriteData when guest memory is too small to hold
anything beyond the entry point.
All tests also succeed when run with miri:
cargo +nightly miri test -p arch smbios
On-behalf-of: SAP leander.kohler@sap.com
Signed-off-by: Leander Kohler <leander.kohler@cyberus-technology.de>
2cee9fa to
602510f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wire SMBIOS data through the stack: extend System Information fields, add chassis info, and pass a structured SMBIOS config from --platform into arch setup. This unifies legacy serial/uuid handling with the new system_* keys and keeps OEM strings supported. The naming of platform options is based on
dmidecode -s <field>.Also wire new system_* SMBIOS fields and chassis asset tag through CLI/API, while still accepting legacy serial_number/uuid (deprecation follow-up).
Fields:
On-behalf-of: SAP leander.kohler@sap.com
Related PRs: