Page MenuHomeFreeBSD

bhyve: add helper to add fwcfg items
ClosedPublic

Authored by corvink on Feb 1 2023, 11:10 AM.
Tags
None
Referenced Files
F102720746: D38334.diff
Sat, Nov 16, 8:23 AM
Unknown Object (File)
Oct 8 2024, 7:03 AM
Unknown Object (File)
Oct 8 2024, 7:03 AM
Unknown Object (File)
Oct 8 2024, 7:03 AM
Unknown Object (File)
Oct 8 2024, 7:03 AM
Unknown Object (File)
Oct 8 2024, 6:41 AM
Unknown Object (File)
Sep 23 2024, 2:00 AM
Unknown Object (File)
Sep 22 2024, 11:17 PM
Subscribers

Details

Summary

This helper makes it easier to add multiple fwcfg items. You can pass an
index and some data to the helper. The helper adds these information to
the fwcfg emulation so that the guest reads the given data on the
specified index.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 49591
Build 46481: arc lint + arc unit

Event Timeline

usr.sbin/bhyve/qemu_fwcfg.c
150

Should we validate the indices, if only with assert()?

usr.sbin/bhyve/qemu_fwcfg.c
150

I'm not sure about this. items is defined as struct qemu_fwcfg_item items[QEMU_FWCFG_MAX_ARCHS][QEMU_FWCFG_MAX_ENTRIES];. The value of idx is masked. So, it's impossible for idx to be too large.

This revision is now accepted and ready to land.Feb 14 2023, 2:55 PM
This revision was automatically updated to reflect the committed changes.