Page MenuHomeFreeBSD

abstract out the vm detection via smbios..
ClosedPublic

Authored by jmg on Feb 26 2023, 7:07 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 26, 6:12 PM
Unknown Object (File)
Fri, Apr 26, 6:11 PM
Unknown Object (File)
Fri, Apr 26, 6:11 PM
Unknown Object (File)
Fri, Apr 26, 1:59 PM
Unknown Object (File)
Fri, Apr 26, 1:34 PM
Unknown Object (File)
Fri, Apr 26, 1:34 PM
Unknown Object (File)
Sat, Apr 6, 9:37 PM
Unknown Object (File)
Sat, Apr 6, 7:45 PM
Subscribers

Details

Summary

This makes the detection of VMs common between platforms that
have SMBios.

Note, I'm not sure what is correct copyright. I just added the
people who touched the code that I relocated.. Neither person had
added their own copyright to the original file.

Adding them as reviewers so they can approve/disagree w/ the
attribution.

Test Plan

Have built VMs of i386, amd64, arm64, and booted them under qemu
and verified that they all detect they are VMs. Note that I don't
have a good way to verify that i386/amd64 is using this code, as
qemu sets the HV bit in CPUID, so this code is not explicitly run.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 50035
Build 46927: arc lint + arc unit

Event Timeline

jmg requested review of this revision.Feb 26 2023, 7:07 PM
sys/dev/smbios/smbios_subr.c
38

Please do not add these two lines for a new file.

45

I do not think this comment is needed

48
60

Modulo kib's comments.... this looks good...

This revision is now accepted and ready to land.Feb 27 2023, 4:13 AM
jmg marked 4 inline comments as done.

implement kib's comments

This revision now requires review to proceed.Feb 27 2023, 11:23 PM

not sure how it included a file AFTER the commit hash, but arc is
weird.. hopefully this will work..

This revision is now accepted and ready to land.Feb 28 2023, 10:26 AM
This revision was automatically updated to reflect the committed changes.