Page MenuHomeFreeBSD

Add support for hypervisor check on x86
ClosedPublic

Authored by sjg on Oct 17 2019, 8:48 PM.
Tags
None
Referenced Files
F81589339: D22069.id63466.diff
Thu, Apr 18, 2:25 PM
Unknown Object (File)
Mar 11 2024, 8:02 AM
Unknown Object (File)
Mar 11 2024, 8:02 AM
Unknown Object (File)
Mar 11 2024, 8:02 AM
Unknown Object (File)
Mar 11 2024, 8:01 AM
Unknown Object (File)
Mar 7 2024, 10:47 PM
Unknown Object (File)
Feb 3 2024, 3:46 AM
Unknown Object (File)
Jan 6 2024, 6:36 AM
Subscribers

Details

Summary

Add support for hypervisor check on x86

Add ficl words for isvirtualized
and move ficl inb and outb words to ficl/x86/sysdep.c
so can be shared by i386 and amd64

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sjg added reviewers: imp, kevans, stevek.
sjg retitled this revision from Allow loader.efi to identify non-standard boot setup to Add support for hypervisor check on x86.

Looks reasonably sane. Saw one magic number. Would like lua implementation, but won't block this based on that.

stand/libsa/x86/hypervisor.c
50 ↗(On Diff #63415)

Magic number?

This revision is now accepted and ready to land.Oct 17 2019, 10:44 PM
stand/libsa/x86/hypervisor.c
50 ↗(On Diff #63415)

Yes, the same bare number shows up in sys/x86/x86/identcpu.c identify_hypervisor_cpuid_base() which refers to a vmware kb article
if I read that correctly 0x40000000 is the hypervisor identifier

sjg edited the summary of this revision. (Show Details)

put x86,machine symlinks in include/

This revision now requires review to proceed.Oct 18 2019, 10:35 PM
bdrewery added a subscriber: bdrewery.

I only reviewed defs.mk. Looks fine.

stand/defs.mk
229 ↗(On Diff #63466)

I know this is pre-existing (and in kmod.mk) but what is this? I don't see the point.

This revision is now accepted and ready to land.Oct 18 2019, 10:41 PM
stand/defs.mk
229 ↗(On Diff #63466)

It's making path an absolute path. realpath $$path would do as well

stand/defs.mk
229 ↗(On Diff #63466)

Oh I was thinking zsh here which considers path == PATH. I see now.

This revision was automatically updated to reflect the committed changes.