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)
Fri, Dec 13, 3:25 PM
Unknown Object (File)
Tue, Nov 26, 4:36 AM
Unknown Object (File)
Nov 23 2024, 2:28 AM
Unknown Object (File)
Nov 16 2024, 11:02 AM
Unknown Object (File)
Nov 16 2024, 11:01 AM
Unknown Object (File)
Nov 16 2024, 8:23 AM
Unknown Object (File)
Oct 8 2024, 7:03 AM
Unknown Object (File)
Oct 8 2024, 7:03 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 Not Applicable
Unit
Tests Not Applicable

Event Timeline

usr.sbin/bhyve/qemu_fwcfg.c
142

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

usr.sbin/bhyve/qemu_fwcfg.c
142

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.