Project

General

Profile

Actions

Feature #14451

closed

loader: want mechanism to test if we are virtualized

Added by Toomas Soome 7 months ago. Updated 7 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
bootloader
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

add isvirtualized? word ( -- addr len flag | flag )

if we are running in virtual machine, return true and addr len with string data, false otherwise.

Testing done: build/install/boot. In loader, we can have code like:

: vm?
isvirtualized? if
type cr
else
s" running on hw" type cr
then
;

Running in vmware fusion gets us string "VMwareVMware", on physical system, got only 0 (false).

Actions #1

Updated by Electric Monk 7 months ago

  • Gerrit CR set to 1982
Actions #2

Updated by Toomas Soome 7 months ago

  • Description updated (diff)
Actions #3

Updated by Toomas Soome 7 months ago

  • Description updated (diff)
Actions #4

Updated by Toomas Soome 7 months ago

  • Description updated (diff)
Actions #5

Updated by Electric Monk 7 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit 8c65387009c4cfaa0924c78065b46a4d4a178d41

commit  8c65387009c4cfaa0924c78065b46a4d4a178d41
Author: Toomas Soome <tsoome@me.com>
Date:   2022-01-28T16:38:20.000Z

    14451 loader: want mechanism to test if we are virtualized
    Reviewed by: Andy Fiddaman <andy@omnios.org>
    Reviewed by: Jason King <jason.brian.king@gmail.com>
    Approved by: Robert Mustacchi <rm@fingolfin.org>

Actions

Also available in: Atom PDF