Page MenuHomeFreeBSD

Add support for hypervisor check on x86
ClosedPublic

Authored by sjg on Oct 17 2019, 8:48 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 2, 12:45 PM
Unknown Object (File)
Tue, Apr 30, 9:27 AM
Unknown Object (File)
Tue, Apr 30, 9:27 AM
Unknown Object (File)
Tue, Apr 30, 8:08 AM
Unknown Object (File)
Tue, Apr 30, 8:05 AM
Unknown Object (File)
Tue, Apr 30, 6:09 AM
Unknown Object (File)
Sun, Apr 28, 9:07 AM
Unknown Object (File)
Tue, Apr 23, 11:32 PM
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 Passed
Unit
No Test Coverage
Build Status
Buildable 27091
Build 25372: arc lint + arc unit

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

Magic number?

This revision is now accepted and ready to land.Oct 17 2019, 10:44 PM
stand/libsa/x86/hypervisor.c
50

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.