Page MenuHomeFreeBSD

Fix bhyve type19 SMBIOS handling to avoid losing 4GB
ClosedPublic

Authored by bcran on Nov 24 2020, 4:51 AM.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

bcran requested review of this revision.Nov 24 2020, 4:51 AM

This fixes the amount of memory displayed in the UiApp to be the same as passed on the bhyve command line. Otherwise, 8GB gets displayed as 4, 32GB as 28 etc.

This revision is now accepted and ready to land.Nov 24 2020, 1:17 PM
usr.sbin/bhyve/smbiostbl.c
760 ↗(On Diff #79922)

Isnt this tied to the xsaddr setting in the preceding line, such that this should more correctly be written:

type19->xeaddr = guest_himem + type19->xsaddr;
jhb added a subscriber: jhb.
jhb added inline comments.
usr.sbin/bhyve/smbiostbl.c
760 ↗(On Diff #79922)

Perhaps, though that's relatively minor (and it won't ever move). The other nitpick one could observe is to perhaps order it as 'start + size' instead of 'size + start', i.e. xsaddr + guest_himem, but any of the variants is fine with me TBH.

usr.sbin/bhyve/smbiostbl.c
760 ↗(On Diff #79922)

I agree, @rgrimes - I'll fix it to be type19->xsaddr + guest_himem;