Page MenuHomeFreeBSD

bhyve: add helper to add fwcfg items
ClosedPublic

Authored by corvink on Feb 1 2023, 11:10 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 29, 10:54 PM
Unknown Object (File)
Fri, Apr 26, 2:09 AM
Unknown Object (File)
Fri, Apr 26, 2:09 AM
Unknown Object (File)
Fri, Apr 26, 2:09 AM
Unknown Object (File)
Fri, Apr 26, 2:09 AM
Unknown Object (File)
Thu, Apr 25, 8:05 PM
Unknown Object (File)
Wed, Apr 17, 4:29 PM
Unknown Object (File)
Mar 20 2024, 2:42 AM
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 49406
Build 46296: arc lint + arc unit

Event Timeline

usr.sbin/bhyve/qemu_fwcfg.c
147

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

usr.sbin/bhyve/qemu_fwcfg.c
147

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.