* [PATCH] lscpu: detect VMware hypervisor
@ 2011-06-16 20:54 Stephen Hemminger
2011-06-20 10:54 ` Karel Zak
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2011-06-16 20:54 UTC (permalink / raw)
To: util-linux
Add detection of VMware.
Tested on VMware Workstation 7.1.4
---
sys-utils/lscpu.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c
index 0d94883..8edf997 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__ */
--
1.7.2.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] lscpu: detect VMware hypervisor
2011-06-16 20:54 [PATCH] lscpu: detect VMware hypervisor Stephen Hemminger
@ 2011-06-20 10:54 ` Karel Zak
0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2011-06-20 10:54 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: util-linux
On Thu, Jun 16, 2011 at 04:54:07PM -0400, Stephen Hemminger wrote:
> Add detection of VMware.
> Tested on VMware Workstation 7.1.4
> ---
> sys-utils/lscpu.c | 8 ++++++--
> 1 files changed, 6 insertions(+), 2 deletions(-)
Applied, thanks.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-06-20 10:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-16 20:54 [PATCH] lscpu: detect VMware hypervisor Stephen Hemminger
2011-06-20 10:54 ` Karel Zak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox