From 7572fb2b8cb69512ca230b7fcfa11577526843f4 Mon Sep 17 00:00:00 2001 From: Stanislav Brabec Date: Mon, 30 Jan 2017 17:01:50 +0100 Subject: lscpu: Detect Windows Subsystem for Linux Windows 10 implements Windows Subsystem for Linux (WSL). WSL does not implement support for SIGSEGV handler, which is used inside is_vmware_platform(). As a result, lscpu crashes there. Implement WSL detection, and as a side effect, work around the crash. Note that none of existing virtualization types exactly matches. But the the closest would be "container". References: Provide a way to positively detect WSL from an app compiled on Linux. https://github.com/Microsoft/BashOnWindows/issues/423 missing support for SIGSEGV handler https://github.com/Microsoft/BashOnWindows/issues/1637 Signed-off-by: Stanislav Brabec --- sys-utils/lscpu.h | 1 + 1 file changed, 1 insertion(+) (limited to 'sys-utils/lscpu.h') diff --git a/sys-utils/lscpu.h b/sys-utils/lscpu.h index b9aa25562..4906c2636 100644 --- a/sys-utils/lscpu.h +++ b/sys-utils/lscpu.h @@ -18,6 +18,7 @@ enum { HYPER_OS400, HYPER_PHYP, HYPER_SPAR, + HYPER_WSL, }; extern int read_hypervisor_dmi(void); -- cgit v1.2.3-55-g7522