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)
Sat, Apr 6, 9:37 PM
Unknown Object (File)
Sat, Apr 6, 7:45 PM
Unknown Object (File)
Jan 26 2024, 9:59 PM
Unknown Object (File)
Jan 26 2024, 9:59 PM
Unknown Object (File)
Dec 28 2023, 12:56 AM
Unknown Object (File)
Dec 23 2023, 2:38 AM
Unknown Object (File)
Dec 12 2023, 9:56 AM
Unknown Object (File)
Nov 4 2023, 9:47 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 Not Applicable
Unit
Tests Not Applicable

Event Timeline

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

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

46

I do not think this comment is needed

49
61

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.