Re: Hypervisor & Virtualization lscpu test fail

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 11, 2013 at 1:44 AM, Luis Aranguren <pizzaman@xxxxxxxxxxx> wrote:
> Thanks for the reply. I include the output file from mk-input.sh, I have
> to note that there were a three permission denied instances.

Oh, I did not look the code before asking the stuff from /proc/. It
seems the lscpu detects virtualization by looking characteristics of
cpu. See cpuid() from

https://github.com/karelzak/util-linux/blob/master/sys-utils/lscpu.c#L453

Perhaps turning off call to that function is the most sensible thing
to do. Any thoughts?

diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c
index 824c8b7..27f2567 100644
--- a/sys-utils/lscpu.c
+++ b/sys-utils/lscpu.c
@@ -1217,9 +1217,9 @@ print_summary(struct lscpu_desc *desc, struct
lscpu_modifier *mod)
 		else if (!strcmp(desc->virtflag, "vmx"))
 			print_s(_("Virtualization:"), "VT-x");
 	}
-	if (desc->hypervisor)
+	if (desc->hypervisor && mod->system == SYSTEM_LIVE)
 		print_s(_("Hypervisor:"), desc->hypervisor);
-	if (desc->hyper) {
+	if (desc->hyper && mod->system == SYSTEM_LIVE) {
 		print_s(_("Hypervisor vendor:"), hv_vendors[desc->hyper]);
 		print_s(_("Virtualization type:"), _(virt_types[desc->virtype]));
 	}

> Feel free to use it as part of the regression test suite.

Thank you.

-- 
   Sami Kerola
   http://www.iki.fi/kerolasa/
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux