summaryrefslogtreecommitdiffstats
path: root/sys-utils/lscpu.c
diff options
context:
space:
mode:
authorStephen Hemminger2011-06-16 22:54:07 +0200
committerKarel Zak2011-06-20 12:53:28 +0200
commit99fbc877e508ec0926c5d43903e2c17fec13e426 (patch)
tree4c44531b588db3ad162e5c48ff27ff3487acd2ff /sys-utils/lscpu.c
parentmisc: hurd build fixes (diff)
downloadkernel-qcow2-util-linux-99fbc877e508ec0926c5d43903e2c17fec13e426.tar.gz
kernel-qcow2-util-linux-99fbc877e508ec0926c5d43903e2c17fec13e426.tar.xz
kernel-qcow2-util-linux-99fbc877e508ec0926c5d43903e2c17fec13e426.zip
lscpu: detect VMware hypervisor
Add detection of VMware. Tested on VMware Workstation 7.1.4 Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Diffstat (limited to 'sys-utils/lscpu.c')
-rw-r--r--sys-utils/lscpu.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c
index 0d948835f..8edf99706 100644
--- a/sys-utils/lscpu.c
+++ b/sys-utils/lscpu.c
@@ -66,13 +66,15 @@ enum {
HYPER_NONE = 0,
HYPER_XEN,
HYPER_KVM,
- HYPER_MSHV
+ HYPER_MSHV,
+ HYPER_VMWARE
};
const char *hv_vendors[] = {
[HYPER_NONE] = NULL,
[HYPER_XEN] = "Xen",
[HYPER_KVM] = "KVM",
- [HYPER_MSHV] = "Microsoft"
+ [HYPER_MSHV] = "Microsoft",
+ [HYPER_VMWARE] = "VMware"
};
/* CPU modes */
@@ -511,6 +513,8 @@ read_hypervisor_cpuid(struct lscpu_desc *desc)
desc->hyper = HYPER_KVM;
else if (!strncmp("Microsoft Hv", hyper_vendor_id, 12))
desc->hyper = HYPER_MSHV;
+ else if (!strncmp("VMwareVMware", hyper_vendor_id, 12))
+ desc->hyper = HYPER_VMWARE;
}
#else /* ! __x86_64__ */