Bug 250728 - Filling smbios manufacturer and family string
Summary: Filling smbios manufacturer and family string
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bhyve (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-virtualization (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-29 22:10 UTC by Olivier Cochard
Modified: 2020-10-30 00:15 UTC (History)
2 users (show)

See Also:


Attachments
patch filling manufacturer and family smbios field (732 bytes, patch)
2020-10-29 22:10 UTC, Olivier Cochard
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Cochard freebsd_committer 2020-10-29 22:10:22 UTC
Created attachment 219209 [details]
patch filling manufacturer and family smbios field

bhyve is not reporting smbios.system.maker neither smbios.system.family: It currently uses the standard method of one space character.
But reporting this non-visible character create not-so-funny debugging session with tools parsing those field.


So, to prevent returning this non-visible character my proposal is to improve bhyve to return those strings:
smbios.system.family="Virtual Machine"
smbios.system.maker="BHYVE"

For information, Amazon Instances are reporting:
smbios.system.family="Default string"
smbios.system.maker="Amazon EC2"

and VirtualBox VMs:
smbios.system.family="Virtual Machine"
smbios.system.maker="innotek GmbH"
Comment 1 Peter Grehan freebsd_committer 2020-10-29 22:17:48 UTC
Looks fine to me: I'd say go ahead and commit this.
Comment 2 VVD 2020-10-29 22:40:08 UTC
> "BHYVE",		/* manufacturer string */
Why not:
> "FreeBSD",		/* manufacturer string */
?
Comment 3 Olivier Cochard freebsd_committer 2020-10-29 23:09:02 UTC
(In reply to VVD from comment #2)

Yes this seems a better idea to use 'FreeBSD' as manufacturer:

With my previous idea:

smbios.system.family="Virtual Machine"
smbios.system.maker="BHYVE"
smbios.system.product="BHYVE"
smbios.system.serial="None"
smbios.system.sku="None"
smbios.system.uuid="3c7d953f-dce9-11ea-b840-0cc47ad8c988"
smbios.system.version="1.0"


By using 'FreeBSD' :

smbios.system.family="Virtual Machine"
smbios.system.maker="FreeBSD"
smbios.system.product="BHYVE"
smbios.system.serial="None"
smbios.system.sku="None"
smbios.system.uuid="3c7d953f-dce9-11ea-b840-0cc47ad8c988"
smbios.system.version="1.0"
Comment 4 commit-hook freebsd_committer 2020-10-30 00:04:58 UTC
A commit references this bug:

Author: olivier
Date: Fri Oct 30 00:03:59 UTC 2020
New revision: 367152
URL: https://svnweb.freebsd.org/changeset/base/367152

Log:
  bhyve currently reports each of "smbios.system.maker" and
  "smbios.system.family" as " ".
  This presents challenges for both humans and tools when trying to parse output
  that uses those results.
  The new values reported are now:
  smbios.system.family="Virtual Machine"
  smbios.system.maker="FreeBSD"

  PR:		250728
  Approved by:	grehan@FreeBSD.org
  Sponsored by:	Netflix

Changes:
  head/usr.sbin/bhyve/smbiostbl.c