summaryrefslogtreecommitdiff
path: root/utility
diff options
context:
space:
mode:
authorNicolas Norvez <norvez@chromium.org>2016-08-09 11:42:08 +0100
committerchrome-bot <chrome-bot@chromium.org>2016-08-10 15:31:09 -0700
commit969ce32e407f32671ab79444238b9ddf98c7d960 (patch)
treee8146908b31123638589485863129ac102e99b1f /utility
parentd46461cec2aa7547b3722623b85dcfb2f298f859 (diff)
downloadvboot-969ce32e407f32671ab79444238b9ddf98c7d960.tar.gz
Detect and report VM environment in crossystem
Add "inside_vm" command to crossystem. x86: If there is no HWID and mainfw_type is "nonchrome", report that the host is a VM. If HWID is present, it's not a VM. ARM: Detection not implemented and so far no ARM VMs exist, always report that the system is not a VM BUG=chromium:632303 TEST=emerge-cyan vboot_reference and test binary on cyan QEMU and HW BRANCH=none Change-Id: I18f5cb24b68e51f3097d9aafd9f0db0e610d322a Reviewed-on: https://chromium-review.googlesource.com/367240 Commit-Ready: Nicolas Norvez <norvez@chromium.org> Tested-by: Nicolas Norvez <norvez@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'utility')
-rw-r--r--utility/crossystem.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/utility/crossystem.c b/utility/crossystem.c
index c88a444d..6278e30f 100644
--- a/utility/crossystem.c
+++ b/utility/crossystem.c
@@ -69,6 +69,7 @@ const Param sys_param_list[] = {
{"fw_prev_tried", IS_STRING, "Firmware tried on previous boot (vboot2)"},
{"fw_prev_result", IS_STRING, "Firmware result of previous boot (vboot2)"},
{"hwid", IS_STRING, "Hardware ID"},
+ {"inside_vm", 0, "Running in a VM?"},
{"kern_nv", 0, "Non-volatile field for kernel use", "0x%08x"},
{"kernkey_vfy", IS_STRING, "Type of verification done on kernel key block"},
{"loc_idx", CAN_WRITE, "Localization index for firmware screens (writable)"},