From 98f12528e969b901af19882cdf2451115eaee312 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 17 Oct 2017 12:16:07 +0100 Subject: [PATCH 01/48] Include upstream patches since 1.18 was released. --- 0001-Missing-have_cpuinfo-check.patch | 25 ++++++++++ 0002-Remove-bashisms.patch | 48 +++++++++++++++++++ ...can-access-cpuid-from-Intel-CPUs-sta.patch | 35 ++++++++++++++ virt-what.spec | 12 ++++- 4 files changed, 118 insertions(+), 2 deletions(-) create mode 100644 0001-Missing-have_cpuinfo-check.patch create mode 100644 0002-Remove-bashisms.patch create mode 100644 0003-As-xen-pv-guest-can-access-cpuid-from-Intel-CPUs-sta.patch diff --git a/0001-Missing-have_cpuinfo-check.patch b/0001-Missing-have_cpuinfo-check.patch new file mode 100644 index 0000000..91d3926 --- /dev/null +++ b/0001-Missing-have_cpuinfo-check.patch @@ -0,0 +1,25 @@ +From eefc1e7e3dd8fb422baf0f13aec1df9880541b83 Mon Sep 17 00:00:00 2001 +From: Jasper Lievisse Adriaanse +Date: Thu, 10 Aug 2017 08:44:01 +0100 +Subject: [PATCH 1/3] Missing have_cpuinfo check. + +--- + virt-what.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/virt-what.in b/virt-what.in +index 8c27b11..9050035 100644 +--- a/virt-what.in ++++ b/virt-what.in +@@ -308,7 +308,7 @@ if ! "$skip_qemu_kvm"; then + # option, since /proc/cpuinfo will not contain the QEMU + # string. QEMU 2.10 added a new CPUID leaf, so this + # problem only triggered for older QEMU +- if grep -q 'QEMU' "${root}/proc/cpuinfo"; then ++ if have_cpuinfo && grep -q 'QEMU' "${root}/proc/cpuinfo"; then + echo qemu + fi + fi +-- +2.13.2 + diff --git a/0002-Remove-bashisms.patch b/0002-Remove-bashisms.patch new file mode 100644 index 0000000..9e2d7fe --- /dev/null +++ b/0002-Remove-bashisms.patch @@ -0,0 +1,48 @@ +From 9d90704a05dee7704470eff818a1c44aeef6c880 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Guido=20G=C3=BCnther?= +Date: Fri, 4 Aug 2017 12:02:08 -0300 +Subject: [PATCH 2/3] Remove bashisms + +Use [ instead of [[ so we fall back to test if necessary: + + http://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html + +Gbp-Pq: Name Remove-bashisms.patch +--- + virt-what.in | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/virt-what.in b/virt-what.in +index 9050035..a05e0db 100644 +--- a/virt-what.in ++++ b/virt-what.in +@@ -360,20 +360,20 @@ if [ "$cpuid" = "OpenBSDVMM58" ]; then + fi + + # Check for LDoms +-if [[ "$arch" == sparc* && -e ${root}/dev/mdesc ]]; then ++if [ "${arch#sparc}" != "$arch" ] && [ -e "${root}/dev/mdesc" ]; then + echo ldoms +- if [[ -d ${root}/sys/class/vlds/ctrl && \ +- -d ${root}/sys/class/vlds/sp ]]; then ++ if [ -d "${root}/sys/class/vlds/ctrl" ] && \ ++ [ -d "${root}/sys/class/vlds/sp" ]; then + echo ldoms-control + else + echo ldoms-guest + fi + MDPROP="${root}/usr/lib/ldoms/mdprop.py" +- if [[ -x ${MDPROP} ]]; then +- if [[ -n $($MDPROP -v iodevice device-type=pciex) ]]; then ++ if [ -x "${MDPROP}" ]; then ++ if [ -n "$($MDPROP -v iodevice device-type=pciex)" ]; then + echo ldoms-root + echo ldoms-io +- elif [[ -n $($MDPROP -v iov-device vf-id=0) ]]; then ++ elif [ -n "$($MDPROP -v iov-device vf-id=0)" ]; then + echo ldoms-io + fi + fi +-- +2.13.2 + diff --git a/0003-As-xen-pv-guest-can-access-cpuid-from-Intel-CPUs-sta.patch b/0003-As-xen-pv-guest-can-access-cpuid-from-Intel-CPUs-sta.patch new file mode 100644 index 0000000..54de9a7 --- /dev/null +++ b/0003-As-xen-pv-guest-can-access-cpuid-from-Intel-CPUs-sta.patch @@ -0,0 +1,35 @@ +From a821dc9961d457c086fffcc16a911cb6f9f8659a Mon Sep 17 00:00:00 2001 +From: xiliang +Date: Sun, 18 Jun 2017 00:33:28 +0800 +Subject: [PATCH 3/3] As xen pv guest can access cpuid from Intel CPUs started + IvyBridge onwards have CPUID Faulting, added one more check in virt-what. + +--- + virt-what.in | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/virt-what.in b/virt-what.in +index a05e0db..247348e 100644 +--- a/virt-what.in ++++ b/virt-what.in +@@ -1,6 +1,6 @@ + #!/bin/sh - + # @configure_input@ +-# Copyright (C) 2008-2015 Red Hat Inc. ++# Copyright (C) 2008-2017 Red Hat Inc. + # + # This program is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by +@@ -223,7 +223,8 @@ fi + + # Check for Xen. + +-if [ "$cpuid" = "XenVMMXenVMM" ]; then ++if [ "$cpuid" = "XenVMMXenVMM" ] && ++ ! echo "$dmi" | grep -q 'No SMBIOS nor DMI entry point found, sorry'; then + echo xen; echo xen-hvm + # Check for AWS + if echo "$dmi" | grep -q 'Version: [0-9]\.[0-9]\.amazon'; then +-- +2.13.2 + diff --git a/virt-what.spec b/virt-what.spec index c2592a7..cf317e1 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -1,12 +1,17 @@ Name: virt-what Version: 1.18 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Detect if we are running in a virtual machine License: GPLv2+ URL: http://people.redhat.com/~rjones/virt-what/ Source0: http://people.redhat.com/~rjones/virt-what/files/%{name}-%{version}.tar.gz +# Patches from upstream since 1.18 was released. +Patch0001: 0001-Missing-have_cpuinfo-check.patch +Patch0002: 0002-Remove-bashisms.patch +Patch0003: 0003-As-xen-pv-guest-can-access-cpuid-from-Intel-CPUs-sta.patch + # This is provided by the build root, but we make it explicit # anyway in case this was dropped from the build root in future. BuildRequires: /usr/bin/pod2man @@ -75,7 +80,7 @@ Current types of virtualization detected: %prep -%setup -q +%autosetup -q %build @@ -101,6 +106,9 @@ fi %changelog +* Tue Oct 17 2017 Richard W.M. Jones - 1.18-2 +- Include upstream patches since 1.18 was released. + * Mon Jul 31 2017 Richard W.M. Jones - 1.18-1 - New upstream version 1.18. - Update RPM description section with complete list of supported guests. From 9e362f545849b2917b68dbaef809336d1407599f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 17 Oct 2017 12:19:09 +0100 Subject: [PATCH 02/48] Use autopatch instead of autosetup. --- virt-what.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/virt-what.spec b/virt-what.spec index cf317e1..f841197 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -80,7 +80,8 @@ Current types of virtualization detected: %prep -%autosetup -q +%setup -q +%autopatch -p1 %build From b52116c5f326c38cf7585d252475d39a01da80fd Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 17 Oct 2017 12:22:41 +0100 Subject: [PATCH 03/48] Remove extraneous space. --- virt-what.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virt-what.spec b/virt-what.spec index f841197..82e3635 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -94,7 +94,7 @@ make install DESTDIR=$RPM_BUILD_ROOT %check -if ! make check ; then +if ! make check ; then cat test-suite.log exit 1 fi From c39c7a78373509c572af99f39c35016790485a71 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 17 Oct 2017 12:25:31 +0100 Subject: [PATCH 04/48] dmidecode is also available on aarch64. --- virt-what.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/virt-what.spec b/virt-what.spec index 82e3635..c42d88a 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -1,6 +1,6 @@ Name: virt-what Version: 1.18 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Detect if we are running in a virtual machine License: GPLv2+ @@ -21,7 +21,7 @@ BuildRequires: util-linux # virt-what script uses dmidecode and getopt (from util-linux). # RPM cannot detect this so make the dependencies explicit here. -%ifarch %{ix86} x86_64 +%ifarch aarch64 %{ix86} x86_64 Requires: dmidecode %endif Requires: util-linux @@ -107,8 +107,9 @@ fi %changelog -* Tue Oct 17 2017 Richard W.M. Jones - 1.18-2 +* Tue Oct 17 2017 Richard W.M. Jones - 1.18-3 - Include upstream patches since 1.18 was released. +- dmidecode is also available on aarch64. * Mon Jul 31 2017 Richard W.M. Jones - 1.18-1 - New upstream version 1.18. From aff96098a0439e3e207575374865589ce1c83098 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 17 Oct 2017 14:49:40 +0100 Subject: [PATCH 05/48] Add: Recognize ppc64le (little endian) virtualization (RHBZ#1147876). --- 0001-Missing-have_cpuinfo-check.patch | 2 +- 0002-Remove-bashisms.patch | 2 +- ...can-access-cpuid-from-Intel-CPUs-sta.patch | 2 +- ...e-little-endian-virtualization-RHBZ-.patch | 28 +++++++++++++++++++ virt-what.spec | 5 ++-- 5 files changed, 34 insertions(+), 5 deletions(-) create mode 100644 0004-Recognize-ppc64le-little-endian-virtualization-RHBZ-.patch diff --git a/0001-Missing-have_cpuinfo-check.patch b/0001-Missing-have_cpuinfo-check.patch index 91d3926..2c2216e 100644 --- a/0001-Missing-have_cpuinfo-check.patch +++ b/0001-Missing-have_cpuinfo-check.patch @@ -1,7 +1,7 @@ From eefc1e7e3dd8fb422baf0f13aec1df9880541b83 Mon Sep 17 00:00:00 2001 From: Jasper Lievisse Adriaanse Date: Thu, 10 Aug 2017 08:44:01 +0100 -Subject: [PATCH 1/3] Missing have_cpuinfo check. +Subject: [PATCH 1/4] Missing have_cpuinfo check. --- virt-what.in | 2 +- diff --git a/0002-Remove-bashisms.patch b/0002-Remove-bashisms.patch index 9e2d7fe..7b88642 100644 --- a/0002-Remove-bashisms.patch +++ b/0002-Remove-bashisms.patch @@ -1,7 +1,7 @@ From 9d90704a05dee7704470eff818a1c44aeef6c880 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= Date: Fri, 4 Aug 2017 12:02:08 -0300 -Subject: [PATCH 2/3] Remove bashisms +Subject: [PATCH 2/4] Remove bashisms Use [ instead of [[ so we fall back to test if necessary: diff --git a/0003-As-xen-pv-guest-can-access-cpuid-from-Intel-CPUs-sta.patch b/0003-As-xen-pv-guest-can-access-cpuid-from-Intel-CPUs-sta.patch index 54de9a7..bd42694 100644 --- a/0003-As-xen-pv-guest-can-access-cpuid-from-Intel-CPUs-sta.patch +++ b/0003-As-xen-pv-guest-can-access-cpuid-from-Intel-CPUs-sta.patch @@ -1,7 +1,7 @@ From a821dc9961d457c086fffcc16a911cb6f9f8659a Mon Sep 17 00:00:00 2001 From: xiliang Date: Sun, 18 Jun 2017 00:33:28 +0800 -Subject: [PATCH 3/3] As xen pv guest can access cpuid from Intel CPUs started +Subject: [PATCH 3/4] As xen pv guest can access cpuid from Intel CPUs started IvyBridge onwards have CPUID Faulting, added one more check in virt-what. --- diff --git a/0004-Recognize-ppc64le-little-endian-virtualization-RHBZ-.patch b/0004-Recognize-ppc64le-little-endian-virtualization-RHBZ-.patch new file mode 100644 index 0000000..98f0492 --- /dev/null +++ b/0004-Recognize-ppc64le-little-endian-virtualization-RHBZ-.patch @@ -0,0 +1,28 @@ +From 7db94c8fe63f2c7ec3ac27cc5ff54ec1e1686aeb Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 17 Oct 2017 14:47:09 +0100 +Subject: [PATCH 4/4] Recognize ppc64le (little endian) virtualization + (RHBZ#1147876). + +Tested by Laurent Vivier, see: +https://bugzilla.redhat.com/show_bug.cgi?id=1147876#c35 & ff. +--- + virt-what.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/virt-what.in b/virt-what.in +index 247348e..29b7b0d 100644 +--- a/virt-what.in ++++ b/virt-what.in +@@ -339,7 +339,7 @@ fi + # example /proc/ppc64/lparcfg systemtype line + # system_type=IBM pSeries (emulated by qemu) + +-if [ "$arch" = "ppc64" ]; then ++if [ "$arch" = "ppc64" ] || [ "$arch" = "ppc64le" ] ; then + if have_cpuinfo && grep -q 'platform.**pSeries' "${root}/proc/cpuinfo"; then + if grep -q 'model.*emulated by qemu' "${root}/proc/cpuinfo"; then + echo ibm_power-kvm +-- +2.13.2 + diff --git a/virt-what.spec b/virt-what.spec index c42d88a..d7bfedf 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -1,6 +1,6 @@ Name: virt-what Version: 1.18 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Detect if we are running in a virtual machine License: GPLv2+ @@ -11,6 +11,7 @@ Source0: http://people.redhat.com/~rjones/virt-what/files/%{name}-%{versi Patch0001: 0001-Missing-have_cpuinfo-check.patch Patch0002: 0002-Remove-bashisms.patch Patch0003: 0003-As-xen-pv-guest-can-access-cpuid-from-Intel-CPUs-sta.patch +Patch0004: 0004-Recognize-ppc64le-little-endian-virtualization-RHBZ-.patch # This is provided by the build root, but we make it explicit # anyway in case this was dropped from the build root in future. @@ -107,7 +108,7 @@ fi %changelog -* Tue Oct 17 2017 Richard W.M. Jones - 1.18-3 +* Tue Oct 17 2017 Richard W.M. Jones - 1.18-4 - Include upstream patches since 1.18 was released. - dmidecode is also available on aarch64. From 6190ddc12be6ac64cb4ce74865b6e64f32205a85 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 9 Feb 2018 20:34:25 +0000 Subject: [PATCH 06/48] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- virt-what.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-what.spec b/virt-what.spec index d7bfedf..f18fb65 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -1,6 +1,6 @@ Name: virt-what Version: 1.18 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Detect if we are running in a virtual machine License: GPLv2+ @@ -108,6 +108,9 @@ fi %changelog +* Fri Feb 09 2018 Fedora Release Engineering - 1.18-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Tue Oct 17 2017 Richard W.M. Jones - 1.18-4 - Include upstream patches since 1.18 was released. - dmidecode is also available on aarch64. From 859dfb556c31b650b6e049b5fdba2851e0320cd7 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 9 Jul 2018 19:06:53 +0200 Subject: [PATCH 07/48] add BuildRequires: gcc Reference: https://fedoraproject.org/wiki/Changes/Remove_GCC_from_BuildRoot --- virt-what.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/virt-what.spec b/virt-what.spec index f18fb65..a316984 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -15,6 +15,7 @@ Patch0004: 0004-Recognize-ppc64le-little-endian-virtualization-RHBZ-.patch # This is provided by the build root, but we make it explicit # anyway in case this was dropped from the build root in future. +BuildRequires: gcc BuildRequires: /usr/bin/pod2man # Required at build time in order to do 'make check' (for getopt). From 51c53d0bbc27466271c9a10160f65d4bcf624477 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 14 Jul 2018 08:35:22 +0000 Subject: [PATCH 08/48] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- virt-what.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-what.spec b/virt-what.spec index a316984..10ee911 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -1,6 +1,6 @@ Name: virt-what Version: 1.18 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Detect if we are running in a virtual machine License: GPLv2+ @@ -109,6 +109,9 @@ fi %changelog +* Sat Jul 14 2018 Fedora Release Engineering - 1.18-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Fri Feb 09 2018 Fedora Release Engineering - 1.18-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From 60cf6fe03eac33a7ffdf03ca9db1d59fbbbd2543 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 31 Oct 2018 19:13:48 +0000 Subject: [PATCH 09/48] New upstream version 1.19. Fixes support for AWS. Remove patches which are now upstream. --- 0001-Missing-have_cpuinfo-check.patch | 25 ---------- 0002-Remove-bashisms.patch | 48 ------------------- ...can-access-cpuid-from-Intel-CPUs-sta.patch | 35 -------------- ...e-little-endian-virtualization-RHBZ-.patch | 28 ----------- sources | 2 +- virt-what.spec | 17 ++++--- 6 files changed, 9 insertions(+), 146 deletions(-) delete mode 100644 0001-Missing-have_cpuinfo-check.patch delete mode 100644 0002-Remove-bashisms.patch delete mode 100644 0003-As-xen-pv-guest-can-access-cpuid-from-Intel-CPUs-sta.patch delete mode 100644 0004-Recognize-ppc64le-little-endian-virtualization-RHBZ-.patch diff --git a/0001-Missing-have_cpuinfo-check.patch b/0001-Missing-have_cpuinfo-check.patch deleted file mode 100644 index 2c2216e..0000000 --- a/0001-Missing-have_cpuinfo-check.patch +++ /dev/null @@ -1,25 +0,0 @@ -From eefc1e7e3dd8fb422baf0f13aec1df9880541b83 Mon Sep 17 00:00:00 2001 -From: Jasper Lievisse Adriaanse -Date: Thu, 10 Aug 2017 08:44:01 +0100 -Subject: [PATCH 1/4] Missing have_cpuinfo check. - ---- - virt-what.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/virt-what.in b/virt-what.in -index 8c27b11..9050035 100644 ---- a/virt-what.in -+++ b/virt-what.in -@@ -308,7 +308,7 @@ if ! "$skip_qemu_kvm"; then - # option, since /proc/cpuinfo will not contain the QEMU - # string. QEMU 2.10 added a new CPUID leaf, so this - # problem only triggered for older QEMU -- if grep -q 'QEMU' "${root}/proc/cpuinfo"; then -+ if have_cpuinfo && grep -q 'QEMU' "${root}/proc/cpuinfo"; then - echo qemu - fi - fi --- -2.13.2 - diff --git a/0002-Remove-bashisms.patch b/0002-Remove-bashisms.patch deleted file mode 100644 index 7b88642..0000000 --- a/0002-Remove-bashisms.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 9d90704a05dee7704470eff818a1c44aeef6c880 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Guido=20G=C3=BCnther?= -Date: Fri, 4 Aug 2017 12:02:08 -0300 -Subject: [PATCH 2/4] Remove bashisms - -Use [ instead of [[ so we fall back to test if necessary: - - http://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html - -Gbp-Pq: Name Remove-bashisms.patch ---- - virt-what.in | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/virt-what.in b/virt-what.in -index 9050035..a05e0db 100644 ---- a/virt-what.in -+++ b/virt-what.in -@@ -360,20 +360,20 @@ if [ "$cpuid" = "OpenBSDVMM58" ]; then - fi - - # Check for LDoms --if [[ "$arch" == sparc* && -e ${root}/dev/mdesc ]]; then -+if [ "${arch#sparc}" != "$arch" ] && [ -e "${root}/dev/mdesc" ]; then - echo ldoms -- if [[ -d ${root}/sys/class/vlds/ctrl && \ -- -d ${root}/sys/class/vlds/sp ]]; then -+ if [ -d "${root}/sys/class/vlds/ctrl" ] && \ -+ [ -d "${root}/sys/class/vlds/sp" ]; then - echo ldoms-control - else - echo ldoms-guest - fi - MDPROP="${root}/usr/lib/ldoms/mdprop.py" -- if [[ -x ${MDPROP} ]]; then -- if [[ -n $($MDPROP -v iodevice device-type=pciex) ]]; then -+ if [ -x "${MDPROP}" ]; then -+ if [ -n "$($MDPROP -v iodevice device-type=pciex)" ]; then - echo ldoms-root - echo ldoms-io -- elif [[ -n $($MDPROP -v iov-device vf-id=0) ]]; then -+ elif [ -n "$($MDPROP -v iov-device vf-id=0)" ]; then - echo ldoms-io - fi - fi --- -2.13.2 - diff --git a/0003-As-xen-pv-guest-can-access-cpuid-from-Intel-CPUs-sta.patch b/0003-As-xen-pv-guest-can-access-cpuid-from-Intel-CPUs-sta.patch deleted file mode 100644 index bd42694..0000000 --- a/0003-As-xen-pv-guest-can-access-cpuid-from-Intel-CPUs-sta.patch +++ /dev/null @@ -1,35 +0,0 @@ -From a821dc9961d457c086fffcc16a911cb6f9f8659a Mon Sep 17 00:00:00 2001 -From: xiliang -Date: Sun, 18 Jun 2017 00:33:28 +0800 -Subject: [PATCH 3/4] As xen pv guest can access cpuid from Intel CPUs started - IvyBridge onwards have CPUID Faulting, added one more check in virt-what. - ---- - virt-what.in | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/virt-what.in b/virt-what.in -index a05e0db..247348e 100644 ---- a/virt-what.in -+++ b/virt-what.in -@@ -1,6 +1,6 @@ - #!/bin/sh - - # @configure_input@ --# Copyright (C) 2008-2015 Red Hat Inc. -+# Copyright (C) 2008-2017 Red Hat Inc. - # - # This program is free software; you can redistribute it and/or modify - # it under the terms of the GNU General Public License as published by -@@ -223,7 +223,8 @@ fi - - # Check for Xen. - --if [ "$cpuid" = "XenVMMXenVMM" ]; then -+if [ "$cpuid" = "XenVMMXenVMM" ] && -+ ! echo "$dmi" | grep -q 'No SMBIOS nor DMI entry point found, sorry'; then - echo xen; echo xen-hvm - # Check for AWS - if echo "$dmi" | grep -q 'Version: [0-9]\.[0-9]\.amazon'; then --- -2.13.2 - diff --git a/0004-Recognize-ppc64le-little-endian-virtualization-RHBZ-.patch b/0004-Recognize-ppc64le-little-endian-virtualization-RHBZ-.patch deleted file mode 100644 index 98f0492..0000000 --- a/0004-Recognize-ppc64le-little-endian-virtualization-RHBZ-.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 7db94c8fe63f2c7ec3ac27cc5ff54ec1e1686aeb Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Tue, 17 Oct 2017 14:47:09 +0100 -Subject: [PATCH 4/4] Recognize ppc64le (little endian) virtualization - (RHBZ#1147876). - -Tested by Laurent Vivier, see: -https://bugzilla.redhat.com/show_bug.cgi?id=1147876#c35 & ff. ---- - virt-what.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/virt-what.in b/virt-what.in -index 247348e..29b7b0d 100644 ---- a/virt-what.in -+++ b/virt-what.in -@@ -339,7 +339,7 @@ fi - # example /proc/ppc64/lparcfg systemtype line - # system_type=IBM pSeries (emulated by qemu) - --if [ "$arch" = "ppc64" ]; then -+if [ "$arch" = "ppc64" ] || [ "$arch" = "ppc64le" ] ; then - if have_cpuinfo && grep -q 'platform.**pSeries' "${root}/proc/cpuinfo"; then - if grep -q 'model.*emulated by qemu' "${root}/proc/cpuinfo"; then - echo ibm_power-kvm --- -2.13.2 - diff --git a/sources b/sources index 1863be0..7055766 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (virt-what-1.18.tar.gz) = 8085a38111d5664f411f5bb9d2ee221bc22e5b0f2d993e8d518718b3f63b16ba73e052b1623c090493cf8fef52fd237ba823377503a32b4b7d03cc5380d5c613 +SHA512 (virt-what-1.19.tar.gz) = 7b6e6c00e3f35cea236cc5f5fdf28d13e9e38143f280dfcbf083ebf0dca2cb677752b8daec5b2956a08405d1fe5368f9f633ce11a854928c31121a35ee4c6820 diff --git a/virt-what.spec b/virt-what.spec index 10ee911..f5a536f 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -1,18 +1,12 @@ Name: virt-what -Version: 1.18 -Release: 6%{?dist} +Version: 1.19 +Release: 1%{?dist} Summary: Detect if we are running in a virtual machine License: GPLv2+ URL: http://people.redhat.com/~rjones/virt-what/ Source0: http://people.redhat.com/~rjones/virt-what/files/%{name}-%{version}.tar.gz -# Patches from upstream since 1.18 was released. -Patch0001: 0001-Missing-have_cpuinfo-check.patch -Patch0002: 0002-Remove-bashisms.patch -Patch0003: 0003-As-xen-pv-guest-can-access-cpuid-from-Intel-CPUs-sta.patch -Patch0004: 0004-Recognize-ppc64le-little-endian-virtualization-RHBZ-.patch - # This is provided by the build root, but we make it explicit # anyway in case this was dropped from the build root in future. BuildRequires: gcc @@ -46,7 +40,7 @@ know about or can't detect. Current types of virtualization detected: - - aws Amazon Web Services cloud guest + - aws Amazon Web Services - bhyve FreeBSD hypervisor - docker Docker container - hyperv Microsoft Hyper-V @@ -109,6 +103,11 @@ fi %changelog +* Wed Oct 31 2018 Richard W.M. Jones - 1.19-1 +- New upstream version 1.19. +- Fixes support for AWS. +- Remove patches which are now upstream. + * Sat Jul 14 2018 Fedora Release Engineering - 1.18-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From 2d60237cc8dcdd261971616686a617a444e61f1a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 31 Oct 2018 19:47:02 +0000 Subject: [PATCH 10/48] Use autosetup + git to apply patches. --- virt-what.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/virt-what.spec b/virt-what.spec index f5a536f..41974a6 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -7,6 +7,8 @@ License: GPLv2+ URL: http://people.redhat.com/~rjones/virt-what/ Source0: http://people.redhat.com/~rjones/virt-what/files/%{name}-%{version}.tar.gz +BuildRequires: git + # This is provided by the build root, but we make it explicit # anyway in case this was dropped from the build root in future. BuildRequires: gcc @@ -76,8 +78,7 @@ Current types of virtualization detected: %prep -%setup -q -%autopatch -p1 +%autosetup -S git %build From f79bb0eea66841995fefcff5ec53ee94bf370260 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 3 Feb 2019 11:21:14 +0000 Subject: [PATCH 11/48] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- virt-what.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-what.spec b/virt-what.spec index 41974a6..ef8b41e 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -1,6 +1,6 @@ Name: virt-what Version: 1.19 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Detect if we are running in a virtual machine License: GPLv2+ @@ -104,6 +104,9 @@ fi %changelog +* Sun Feb 03 2019 Fedora Release Engineering - 1.19-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Wed Oct 31 2018 Richard W.M. Jones - 1.19-1 - New upstream version 1.19. - Fixes support for AWS. From 72888f3f16b0ea0d7bf1c67696eb6476e1d57f31 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 27 Jul 2019 03:03:55 +0000 Subject: [PATCH 12/48] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- virt-what.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-what.spec b/virt-what.spec index ef8b41e..c6cc562 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -1,6 +1,6 @@ Name: virt-what Version: 1.19 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Detect if we are running in a virtual machine License: GPLv2+ @@ -104,6 +104,9 @@ fi %changelog +* Sat Jul 27 2019 Fedora Release Engineering - 1.19-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Sun Feb 03 2019 Fedora Release Engineering - 1.19-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 03f2496ee7dcd2d2a3962ed3c8562c2ccb407735 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 3 Oct 2019 10:24:10 +0100 Subject: [PATCH 13/48] New upstream version 1.20. --- sources | 2 +- virt-what.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 7055766..1e18e3b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (virt-what-1.19.tar.gz) = 7b6e6c00e3f35cea236cc5f5fdf28d13e9e38143f280dfcbf083ebf0dca2cb677752b8daec5b2956a08405d1fe5368f9f633ce11a854928c31121a35ee4c6820 +SHA512 (virt-what-1.20.tar.gz) = edf74903122bfb422c7a5ecba711bb64d6ef668828f208dfc0571ef14f2643456c14bc9a77dfea209df3d93869ac0a2c9fd039779922eddc6ebd9d988585dea4 diff --git a/virt-what.spec b/virt-what.spec index c6cc562..7907a8c 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -1,6 +1,6 @@ Name: virt-what -Version: 1.19 -Release: 3%{?dist} +Version: 1.20 +Release: 1%{?dist} Summary: Detect if we are running in a virtual machine License: GPLv2+ @@ -104,6 +104,9 @@ fi %changelog +* Thu Oct 3 2019 Richard W.M. Jones - 1.20-1 +- New upstream version 1.20. + * Sat Jul 27 2019 Fedora Release Engineering - 1.19-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From 4fda3d110579e27b2752ff6eb3b8b9cf50f95dba Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 31 Jan 2020 03:15:48 +0000 Subject: [PATCH 14/48] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- virt-what.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-what.spec b/virt-what.spec index 7907a8c..ba6f9ef 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -1,6 +1,6 @@ Name: virt-what Version: 1.20 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Detect if we are running in a virtual machine License: GPLv2+ @@ -104,6 +104,9 @@ fi %changelog +* Fri Jan 31 2020 Fedora Release Engineering - 1.20-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Thu Oct 3 2019 Richard W.M. Jones - 1.20-1 - New upstream version 1.20. From 2f04bd6b572414743caeb7bc00862db9cdc3b8ed Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 14 Jul 2020 14:45:59 +0000 Subject: [PATCH 15/48] Use make macros https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro --- virt-what.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/virt-what.spec b/virt-what.spec index ba6f9ef..e6c0f80 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -1,6 +1,6 @@ Name: virt-what Version: 1.20 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Detect if we are running in a virtual machine License: GPLv2+ @@ -87,7 +87,7 @@ make %install -make install DESTDIR=$RPM_BUILD_ROOT +%make_install %check @@ -104,6 +104,10 @@ fi %changelog +* Tue Jul 14 2020 Tom Stellard - 1.20-3 +- Use make macros +- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro + * Fri Jan 31 2020 Fedora Release Engineering - 1.20-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From c90f9c724f4e0cecbcd085b2554fef27fd82a9f6 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jul 2020 13:47:42 +0000 Subject: [PATCH 16/48] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- virt-what.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-what.spec b/virt-what.spec index e6c0f80..5ff141b 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -1,6 +1,6 @@ Name: virt-what Version: 1.20 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Detect if we are running in a virtual machine License: GPLv2+ @@ -104,6 +104,9 @@ fi %changelog +* Wed Jul 29 2020 Fedora Release Engineering - 1.20-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Tue Jul 14 2020 Tom Stellard - 1.20-3 - Use make macros - https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro From 58bb861115b2d6ca3cb559f70cdcc24401b30ade Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 9 Jan 2021 00:44:24 +0000 Subject: [PATCH 17/48] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- virt-what.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/virt-what.spec b/virt-what.spec index 5ff141b..8f2b46f 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -7,6 +7,7 @@ License: GPLv2+ URL: http://people.redhat.com/~rjones/virt-what/ Source0: http://people.redhat.com/~rjones/virt-what/files/%{name}-%{version}.tar.gz +BuildRequires: make BuildRequires: git # This is provided by the build root, but we make it explicit From 5e664b8e2c166a85747712b57e060dae5b5c88f8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 27 Jan 2021 23:09:22 +0000 Subject: [PATCH 18/48] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- virt-what.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-what.spec b/virt-what.spec index 8f2b46f..e280655 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -1,6 +1,6 @@ Name: virt-what Version: 1.20 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Detect if we are running in a virtual machine License: GPLv2+ @@ -105,6 +105,9 @@ fi %changelog +* Wed Jan 27 2021 Fedora Release Engineering - 1.20-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Wed Jul 29 2020 Fedora Release Engineering - 1.20-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 34d5e2a28233c69f4e60320b9f024dee67b5ba10 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 13 Apr 2021 11:06:14 +0100 Subject: [PATCH 19/48] Add all patches since 1.20 in preparation for 1.21 release. --- 0001-Fix-virt-what-cpuid-helper.patch | 118 +++++ ...Nutanix-Acropolis-Hypervisor-AHV-RHB.patch | 405 ++++++++++++++++++ 0003-helper-Fix-KVM-signature.patch | 38 ++ ...tection-of-MS-Surfacebook-2-as-a-vir.patch | 27 ++ 0005-docker-Check-for-.dockerenv-too.patch | 46 ++ ...ker-Lookup-from-proc-self-cgroup-too.patch | 61 +++ 0007-Add-podman-support.patch | 232 ++++++++++ ...Simplify-and-fix-invocation-of-cpuid.patch | 60 +++ virt-what.spec | 26 +- 9 files changed, 1008 insertions(+), 5 deletions(-) create mode 100644 0001-Fix-virt-what-cpuid-helper.patch create mode 100644 0002-Add-support-for-Nutanix-Acropolis-Hypervisor-AHV-RHB.patch create mode 100644 0003-helper-Fix-KVM-signature.patch create mode 100644 0004-Fix-incorrect-detection-of-MS-Surfacebook-2-as-a-vir.patch create mode 100644 0005-docker-Check-for-.dockerenv-too.patch create mode 100644 0006-docker-Lookup-from-proc-self-cgroup-too.patch create mode 100644 0007-Add-podman-support.patch create mode 100644 0008-Simplify-and-fix-invocation-of-cpuid.patch diff --git a/0001-Fix-virt-what-cpuid-helper.patch b/0001-Fix-virt-what-cpuid-helper.patch new file mode 100644 index 0000000..feeb0ab --- /dev/null +++ b/0001-Fix-virt-what-cpuid-helper.patch @@ -0,0 +1,118 @@ +From 0a0d9fa7c85c5474870cae37832d28ccd899d4ee Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Fri, 4 Oct 2019 15:57:42 +0300 +Subject: [PATCH 1/8] Fix virt-what-cpuid-helper. + +The value returned in %eax is the max_entry (eg. 0x40000000 +if there are no further leafs). However it is not reliable. +In addition if there are multiple leafs we should probably +only print the highest one. + +Also use uint32_t instead of unsigned int. + +Thanks: Paolo Bonzini. +--- + virt-what-cpuid-helper.c | 67 ++++++++++++++++++++++++++++------------ + 1 file changed, 48 insertions(+), 19 deletions(-) + +diff --git a/virt-what-cpuid-helper.c b/virt-what-cpuid-helper.c +index 7812545..0cd4a6f 100644 +--- a/virt-what-cpuid-helper.c ++++ b/virt-what-cpuid-helper.c +@@ -1,5 +1,5 @@ + /* virt-what-cpuid-helper: Are we running inside KVM or Xen HVM? +- * Copyright (C) 2008 Red Hat Inc. ++ * Copyright (C) 2008-2019 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +@@ -21,14 +21,35 @@ + */ + + #include ++#include ++#include + #include + + #if defined(__i386__) || defined(__x86_64__) + +-static unsigned int +-cpuid (unsigned int eax, char *sig) ++/* Known x86 hypervisor signatures. Note that if you add a new test ++ * to virt-what.in you may need to update this list. The signature is ++ * always 12 bytes except in the case of KVM. ++ */ ++static int ++known_signature (char *sig) + { +- unsigned int *sig32 = (unsigned int *) sig; ++ return ++ strcmp (sig, "bhyve bhyve ") == 0 || ++ strcmp (sig, "KVMKVMKVM") == 0 || ++ strcmp (sig, "LKVMLKVMLKVM") == 0 || ++ strcmp (sig, "Microsoft Hv") == 0 || ++ strcmp (sig, "OpenBSDVMM58") == 0 || ++ strcmp (sig, "TCGTCGTCGTCG") == 0 || ++ strcmp (sig, "VMwareVMware") == 0 || ++ strcmp (sig, "XenVMMXenVMM") == 0 || ++ 0; ++} ++ ++static uint32_t ++cpuid (uint32_t eax, char *sig) ++{ ++ uint32_t *sig32 = (uint32_t *) sig; + + asm volatile ( + "xchgl %%ebx,%1; xor %%ebx,%%ebx; cpuid; xchgl %%ebx,%1" +@@ -43,24 +64,32 @@ static void + cpu_sig (void) + { + char sig[13]; +- unsigned int base = 0x40000000, leaf = base; +- unsigned int max_entries; ++ const uint32_t base = 0x40000000; ++ uint32_t leaf; + +- memset (sig, 0, sizeof sig); +- max_entries = cpuid (leaf, sig); +- puts (sig); +- +- /* Most hypervisors only have information in leaf 0x40000000, but +- * upstream Xen contains further leaf entries (in particular when +- * used with Viridian [HyperV] extensions). CPUID is supposed to +- * return the maximum leaf offset in %eax, so that's what we use, +- * but only if it looks sensible. ++ /* Most hypervisors only have information in leaf 0x40000000. ++ * ++ * Some hypervisors have "Viridian [HyperV] extensions", and those ++ * must appear in slot 0x40000000, but they will also have the true ++ * hypervisor in a higher slot. ++ * ++ * CPUID is supposed to return the maximum leaf offset in %eax, but ++ * this is not reliable. Instead we check the returned signatures ++ * against a known list (the others will be empty or garbage) and ++ * only print the ones we know about. This is OK because if we add ++ * a new test in virt-what we can update the list. ++ * ++ * By searching backwards we only print the highest entry, thus ++ * ignoring Viridian for Xen (and Nutanix). If we ever encounter a ++ * hypervisor that has more than 2 entries we may need to revisit ++ * this. + */ +- if (max_entries > 3 && max_entries < 0x10000) { +- for (leaf = base + 0x100; leaf <= base + max_entries; leaf += 0x100) { +- memset (sig, 0, sizeof sig); +- cpuid (leaf, sig); ++ for (leaf = base + 0xff00; leaf >= base; leaf -= 0x100) { ++ memset (sig, 0, sizeof sig); ++ cpuid (leaf, sig); ++ if (known_signature (sig)) { + puts (sig); ++ break; + } + } + } +-- +2.29.0.rc2 + diff --git a/0002-Add-support-for-Nutanix-Acropolis-Hypervisor-AHV-RHB.patch b/0002-Add-support-for-Nutanix-Acropolis-Hypervisor-AHV-RHB.patch new file mode 100644 index 0000000..470df9a --- /dev/null +++ b/0002-Add-support-for-Nutanix-Acropolis-Hypervisor-AHV-RHB.patch @@ -0,0 +1,405 @@ +From f317e788dd7c2a35c2ae0f64fa50ab720382ebf5 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Fri, 4 Oct 2019 16:25:55 +0300 +Subject: [PATCH 2/8] Add support for Nutanix Acropolis Hypervisor (AHV) + (RHBZ#1756381). + +Thanks: Cristian Seres for providing access to a guest. +--- + configure.ac | 2 + + tests/nutanix-ahv/Makefile.am | 28 ++++ + tests/nutanix-ahv/proc/cpuinfo | 27 ++++ + tests/nutanix-ahv/proc/self/status | 55 ++++++++ + tests/nutanix-ahv/sbin/dmidecode | 123 ++++++++++++++++++ + tests/nutanix-ahv/sbin/uname | 2 + + tests/nutanix-ahv/sbin/virt-what-cpuid-helper | 2 + + tests/nutanix-ahv/test.sh | 32 +++++ + virt-what.in | 10 +- + virt-what.pod | 6 + + 10 files changed, 286 insertions(+), 1 deletion(-) + create mode 100644 tests/nutanix-ahv/Makefile.am + create mode 100644 tests/nutanix-ahv/proc/cpuinfo + create mode 100644 tests/nutanix-ahv/proc/self/status + create mode 100755 tests/nutanix-ahv/sbin/dmidecode + create mode 100755 tests/nutanix-ahv/sbin/uname + create mode 100755 tests/nutanix-ahv/sbin/virt-what-cpuid-helper + create mode 100755 tests/nutanix-ahv/test.sh + +diff --git a/configure.ac b/configure.ac +index c45f469..58b3d77 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -51,6 +51,7 @@ tests="\ + lkvm-arm \ + lx86 \ + lxc \ ++ nutanix-ahv \ + parallels-desktop \ + ppc64-baremetal \ + ppc64-kvm \ +@@ -93,6 +94,7 @@ AC_CONFIG_FILES([Makefile + tests/lkvm-arm/Makefile + tests/lx86/Makefile + tests/lxc/Makefile ++ tests/nutanix-ahv/Makefile + tests/parallels-desktop/Makefile + tests/ppc64-baremetal/Makefile + tests/ppc64-kvm/Makefile +diff --git a/tests/nutanix-ahv/Makefile.am b/tests/nutanix-ahv/Makefile.am +new file mode 100644 +index 0000000..b748df8 +--- /dev/null ++++ b/tests/nutanix-ahv/Makefile.am +@@ -0,0 +1,28 @@ ++# Makefile for virt-what ++# Copyright (C) 2008-2011 Red Hat Inc. ++# ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ ++CLEANFILES = *~ ++ ++TESTS = test.sh ++ ++EXTRA_DIST = \ ++ test.sh \ ++ proc/cpuinfo \ ++ proc/self/status \ ++ sbin/dmidecode \ ++ sbin/uname \ ++ sbin/virt-what-cpuid-helper +diff --git a/tests/nutanix-ahv/proc/cpuinfo b/tests/nutanix-ahv/proc/cpuinfo +new file mode 100644 +index 0000000..d7a1f68 +--- /dev/null ++++ b/tests/nutanix-ahv/proc/cpuinfo +@@ -0,0 +1,27 @@ ++processor : 0 ++vendor_id : GenuineIntel ++cpu family : 15 ++model : 6 ++model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz ++stepping : 1 ++microcode : 0x1 ++cpu MHz : 2199.998 ++cache size : 16384 KB ++physical id : 0 ++siblings : 1 ++core id : 0 ++cpu cores : 1 ++apicid : 0 ++initial apicid : 0 ++fpu : yes ++fpu_exception : yes ++cpuid level : 13 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc nopl cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f avx512dq rdseed adx smap clflushopt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 arat md_clear ++bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs ++bogomips : 4399.99 ++clflush size : 64 ++cache_alignment : 128 ++address sizes : 46 bits physical, 48 bits virtual ++power management: ++ +diff --git a/tests/nutanix-ahv/proc/self/status b/tests/nutanix-ahv/proc/self/status +new file mode 100644 +index 0000000..7b4eed0 +--- /dev/null ++++ b/tests/nutanix-ahv/proc/self/status +@@ -0,0 +1,55 @@ ++Name: cat ++Umask: 0022 ++State: R (running) ++Tgid: 18508 ++Ngid: 0 ++Pid: 18508 ++PPid: 18506 ++TracerPid: 0 ++Uid: 0 0 0 0 ++Gid: 0 0 0 0 ++FDSize: 64 ++Groups: 0 ++NStgid: 18508 ++NSpid: 18508 ++NSpgid: 18506 ++NSsid: 1945 ++VmPeak: 5392 kB ++VmSize: 5392 kB ++VmLck: 0 kB ++VmPin: 0 kB ++VmHWM: 760 kB ++VmRSS: 760 kB ++RssAnon: 68 kB ++RssFile: 692 kB ++RssShmem: 0 kB ++VmData: 312 kB ++VmStk: 132 kB ++VmExe: 28 kB ++VmLib: 1456 kB ++VmPTE: 48 kB ++VmSwap: 0 kB ++HugetlbPages: 0 kB ++CoreDumping: 0 ++THP_enabled: 1 ++Threads: 1 ++SigQ: 3/7359 ++SigPnd: 0000000000000000 ++ShdPnd: 0000000000000000 ++SigBlk: 0000000000000000 ++SigIgn: 0000000000000000 ++SigCgt: 0000000000000000 ++CapInh: 0000000000000000 ++CapPrm: 0000003fffffffff ++CapEff: 0000003fffffffff ++CapBnd: 0000003fffffffff ++CapAmb: 0000000000000000 ++NoNewPrivs: 0 ++Seccomp: 0 ++Speculation_Store_Bypass: thread vulnerable ++Cpus_allowed: ffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff ++Cpus_allowed_list: 0-239 ++Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 ++Mems_allowed_list: 0 ++voluntary_ctxt_switches: 0 ++nonvoluntary_ctxt_switches: 2 +diff --git a/tests/nutanix-ahv/sbin/dmidecode b/tests/nutanix-ahv/sbin/dmidecode +new file mode 100755 +index 0000000..3774819 +--- /dev/null ++++ b/tests/nutanix-ahv/sbin/dmidecode +@@ -0,0 +1,123 @@ ++#!/bin/sh - ++cat <<'EOF' ++i# dmidecode 3.2 ++Getting SMBIOS data from sysfs. ++SMBIOS 2.8 present. ++9 structures occupying 486 bytes. ++Table at 0x000F73C0. ++ ++Handle 0x0000, DMI type 0, 24 bytes ++BIOS Information ++ Vendor: SeaBIOS ++ Version: 1.9.1-5.el6 ++ Release Date: 04/01/2014 ++ Address: 0xE8000 ++ Runtime Size: 96 kB ++ ROM Size: 64 kB ++ Characteristics: ++ BIOS characteristics not supported ++ Targeted content distribution is supported ++ BIOS Revision: 0.0 ++ ++Handle 0x0100, DMI type 1, 27 bytes ++System Information ++ Manufacturer: Nutanix ++ Product Name: AHV ++ Version: RHEL 7.3.0 PC (i440FX + PIIX, 1996) ++ Serial Number: B913C223-EEDE-4DFC-BB43-BE1495F4388D ++ UUID: b913c223-eede-4dfc-bb43-be1495f4388d ++ Wake-up Type: Power Switch ++ SKU Number: Not Specified ++ Family: Red Hat Enterprise Linux ++ ++Handle 0x0300, DMI type 3, 21 bytes ++Chassis Information ++ Manufacturer: Red Hat ++ Type: Other ++ Lock: Not Present ++ Version: RHEL 7.3.0 PC (i440FX + PIIX, 1996) ++ Serial Number: Not Specified ++ Asset Tag: Not Specified ++ Boot-up State: Safe ++ Power Supply State: Safe ++ Thermal State: Safe ++ Security Status: Unknown ++ OEM Information: 0x00000000 ++ Height: Unspecified ++ Number Of Power Cords: Unspecified ++ Contained Elements: 0 ++ ++Handle 0x0400, DMI type 4, 42 bytes ++Processor Information ++ Socket Designation: CPU 0 ++ Type: Central Processor ++ Family: Other ++ Manufacturer: Red Hat ++ ID: 61 0F 00 00 FF FB 8B 0F ++ Version: RHEL 7.3.0 PC (i440FX + PIIX, 1996) ++ Voltage: Unknown ++ External Clock: Unknown ++ Max Speed: 2000 MHz ++ Current Speed: 2000 MHz ++ Status: Populated, Enabled ++ Upgrade: Other ++ L1 Cache Handle: Not Provided ++ L2 Cache Handle: Not Provided ++ L3 Cache Handle: Not Provided ++ Serial Number: Not Specified ++ Asset Tag: Not Specified ++ Part Number: Not Specified ++ Core Count: 1 ++ Core Enabled: 1 ++ Thread Count: 1 ++ Characteristics: None ++ ++Handle 0x1000, DMI type 16, 23 bytes ++Physical Memory Array ++ Location: Other ++ Use: System Memory ++ Error Correction Type: Multi-bit ECC ++ Maximum Capacity: 2 GB ++ Error Information Handle: Not Provided ++ Number Of Devices: 1 ++ ++Handle 0x1100, DMI type 17, 40 bytes ++Memory Device ++ Array Handle: 0x1000 ++ Error Information Handle: Not Provided ++ Total Width: Unknown ++ Data Width: Unknown ++ Size: 2048 MB ++ Form Factor: DIMM ++ Set: None ++ Locator: DIMM 0 ++ Bank Locator: Not Specified ++ Type: RAM ++ Type Detail: Other ++ Speed: Unknown ++ Manufacturer: Red Hat ++ Serial Number: Not Specified ++ Asset Tag: Not Specified ++ Part Number: Not Specified ++ Rank: Unknown ++ Configured Memory Speed: Unknown ++ Minimum Voltage: Unknown ++ Maximum Voltage: Unknown ++ Configured Voltage: Unknown ++ ++Handle 0x1300, DMI type 19, 31 bytes ++Memory Array Mapped Address ++ Starting Address: 0x00000000000 ++ Ending Address: 0x0007FFFFFFF ++ Range Size: 2 GB ++ Physical Array Handle: 0x1000 ++ Partition Width: 1 ++ ++Handle 0x2000, DMI type 32, 11 bytes ++System Boot Information ++ Status: No errors detected ++ ++Handle 0x7F00, DMI type 127, 4 bytes ++End Of Table ++ ++EOF +diff --git a/tests/nutanix-ahv/sbin/uname b/tests/nutanix-ahv/sbin/uname +new file mode 100755 +index 0000000..ab0ec89 +--- /dev/null ++++ b/tests/nutanix-ahv/sbin/uname +@@ -0,0 +1,2 @@ ++#!/bin/sh - ++echo x86_64 +diff --git a/tests/nutanix-ahv/sbin/virt-what-cpuid-helper b/tests/nutanix-ahv/sbin/virt-what-cpuid-helper +new file mode 100755 +index 0000000..f52a9d7 +--- /dev/null ++++ b/tests/nutanix-ahv/sbin/virt-what-cpuid-helper +@@ -0,0 +1,2 @@ ++#!/bin/sh - ++echo KVMKVMKVM +diff --git a/tests/nutanix-ahv/test.sh b/tests/nutanix-ahv/test.sh +new file mode 100755 +index 0000000..3d934b2 +--- /dev/null ++++ b/tests/nutanix-ahv/test.sh +@@ -0,0 +1,32 @@ ++# Test for Nutanix AHV ++# Copyright (C) 2019 Red Hat Inc. ++# ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ ++output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)" ++expected="nutanix_ahv" ++ ++if [ "$output" != "$expected" ]; then ++ echo "$0: test failed because output did not match expected" ++ echo "Expected output was:" ++ echo "----------------------------------------" ++ echo "$expected" ++ echo "----------------------------------------" ++ echo "But the actual output of the program was:" ++ echo "----------------------------------------" ++ echo "$output" ++ echo "----------------------------------------" ++ exit 1 ++fi +diff --git a/virt-what.in b/virt-what.in +index f685461..9eafa05 100644 +--- a/virt-what.in ++++ b/virt-what.in +@@ -1,6 +1,6 @@ + #!/bin/sh - + # @configure_input@ +-# Copyright (C) 2008-2017 Red Hat Inc. ++# Copyright (C) 2008-2019 Red Hat Inc. + # + # This program is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by +@@ -220,6 +220,14 @@ if echo "$dmi" | grep -q 'Vendor: Parallels'; then + skip_qemu_kvm=true + fi + ++# Check for Nutanix AHV. ++# This is sufficiently different from KVM and has Viridian extensions, ++# so skip the KVM test. ++if echo "$dmi" | grep -q 'Manufacturer: Nutanix'; then ++ echo nutanix_ahv ++ skip_qemu_kvm=true ++fi ++ + # Check for oVirt/RHEV. + if echo "$dmi" | grep -q 'Manufacturer: oVirt'; then + echo ovirt +diff --git a/virt-what.pod b/virt-what.pod +index 5a0bdfc..ea5cb77 100644 +--- a/virt-what.pod ++++ b/virt-what.pod +@@ -177,6 +177,12 @@ is lkvm (a.k.a kvmtool). + + Status: contributed by Andrew Jones + ++=item B ++ ++The guest is running inside Nutanix Acropolis Hypervisor (AHV). ++ ++Status: confirmed by RWMJ. ++ + =item B + + The guest appears to be running inside an OpenVZ or Virtuozzo +-- +2.29.0.rc2 + diff --git a/0003-helper-Fix-KVM-signature.patch b/0003-helper-Fix-KVM-signature.patch new file mode 100644 index 0000000..2416e7a --- /dev/null +++ b/0003-helper-Fix-KVM-signature.patch @@ -0,0 +1,38 @@ +From 5cdf740942a4f443977344428dfe6c43f232f0eb Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Fri, 4 Oct 2019 18:30:01 +0100 +Subject: [PATCH 3/8] helper: Fix KVM signature. + +Thanks: Paolo Bonzini. +--- + virt-what-cpuid-helper.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/virt-what-cpuid-helper.c b/virt-what-cpuid-helper.c +index 0cd4a6f..9c6cdb2 100644 +--- a/virt-what-cpuid-helper.c ++++ b/virt-what-cpuid-helper.c +@@ -28,15 +28,16 @@ + #if defined(__i386__) || defined(__x86_64__) + + /* Known x86 hypervisor signatures. Note that if you add a new test +- * to virt-what.in you may need to update this list. The signature is +- * always 12 bytes except in the case of KVM. ++ * to virt-what.in you may need to update this list. Note the ++ * signature is always 12 bytes long, plus we add \0 to the end to ++ * make it 13 bytes. + */ + static int +-known_signature (char *sig) ++known_signature (const char *sig) + { + return + strcmp (sig, "bhyve bhyve ") == 0 || +- strcmp (sig, "KVMKVMKVM") == 0 || ++ memcmp (sig, "KVMKVMKVM\0\0\0", 12) == 0 || + strcmp (sig, "LKVMLKVMLKVM") == 0 || + strcmp (sig, "Microsoft Hv") == 0 || + strcmp (sig, "OpenBSDVMM58") == 0 || +-- +2.29.0.rc2 + diff --git a/0004-Fix-incorrect-detection-of-MS-Surfacebook-2-as-a-vir.patch b/0004-Fix-incorrect-detection-of-MS-Surfacebook-2-as-a-vir.patch new file mode 100644 index 0000000..c7c98d8 --- /dev/null +++ b/0004-Fix-incorrect-detection-of-MS-Surfacebook-2-as-a-vir.patch @@ -0,0 +1,27 @@ +From 3aa4ad0f81c35a56960871b68731b6e948d95f56 Mon Sep 17 00:00:00 2001 +From: willem van de velde +Date: Tue, 22 Oct 2019 11:58:01 +0100 +Subject: [PATCH 4/8] Fix incorrect detection of MS Surfacebook 2 as a virtual + machine. + +--- + virt-what.in | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/virt-what.in b/virt-what.in +index 9eafa05..a61ce91 100644 +--- a/virt-what.in ++++ b/virt-what.in +@@ -132,7 +132,8 @@ fi + # The negative check for cpuid is to distinguish this from Hyper-V + # which also has the same manufacturer string in the SM-BIOS data. + if [ "$cpuid" != "Microsoft Hv" ] && +- echo "$dmi" | grep -q 'Manufacturer: Microsoft Corporation'; then ++ echo "$dmi" | grep -q 'Manufacturer: Microsoft Corporation' && ++ echo "$dmi" | grep -q 'Product Name: Virtual Machine'; then + echo virtualpc + fi + +-- +2.29.0.rc2 + diff --git a/0005-docker-Check-for-.dockerenv-too.patch b/0005-docker-Check-for-.dockerenv-too.patch new file mode 100644 index 0000000..64367b1 --- /dev/null +++ b/0005-docker-Check-for-.dockerenv-too.patch @@ -0,0 +1,46 @@ +From e2c49cda221f95cb65b1b3ac3ae15aa41d92f519 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Skytt=C3=A4?= +Date: Sun, 1 Dec 2019 07:58:04 +0200 +Subject: [PATCH 5/8] docker: Check for /.dockerenv too + +/.dockerinit may no longer exist. + +Ref https://github.com/moby/moby/issues/18355 +--- + tests/docker/.dockerenv | 0 + tests/docker/Makefile.am | 1 + + virt-what.in | 2 +- + 3 files changed, 2 insertions(+), 1 deletion(-) + create mode 100644 tests/docker/.dockerenv + +diff --git a/tests/docker/.dockerenv b/tests/docker/.dockerenv +new file mode 100644 +index 0000000..e69de29 +diff --git a/tests/docker/Makefile.am b/tests/docker/Makefile.am +index e0ea991..e2a95d8 100644 +--- a/tests/docker/Makefile.am ++++ b/tests/docker/Makefile.am +@@ -21,6 +21,7 @@ TESTS = test.sh + + EXTRA_DIST = \ + test.sh \ ++ .dockerenv \ + .dockerinit \ + proc/cpuinfo \ + proc/self/status \ +diff --git a/virt-what.in b/virt-what.in +index a61ce91..db16b5f 100644 +--- a/virt-what.in ++++ b/virt-what.in +@@ -345,7 +345,7 @@ if ! "$skip_lkvm"; then + fi + + # Check for Docker. +-if [ -f "${root}/.dockerinit" ]; then ++if [ -f "${root}/.dockerenv" ] || [ -f "${root}/.dockerinit" ]; then + echo docker + fi + +-- +2.29.0.rc2 + diff --git a/0006-docker-Lookup-from-proc-self-cgroup-too.patch b/0006-docker-Lookup-from-proc-self-cgroup-too.patch new file mode 100644 index 0000000..3d9c936 --- /dev/null +++ b/0006-docker-Lookup-from-proc-self-cgroup-too.patch @@ -0,0 +1,61 @@ +From 57f0c3cc6a7e631f644d67f05b002c6004bb6601 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Skytt=C3=A4?= +Date: Sun, 1 Dec 2019 08:21:32 +0200 +Subject: [PATCH 6/8] docker: Lookup from /proc/self/cgroup too + +Refs https://github.com/moby/moby/issues/18355 +--- + tests/docker/Makefile.am | 1 + + tests/docker/proc/self/cgroup | 13 +++++++++++++ + virt-what.in | 3 ++- + 3 files changed, 16 insertions(+), 1 deletion(-) + create mode 100644 tests/docker/proc/self/cgroup + +diff --git a/tests/docker/Makefile.am b/tests/docker/Makefile.am +index e2a95d8..401f372 100644 +--- a/tests/docker/Makefile.am ++++ b/tests/docker/Makefile.am +@@ -24,6 +24,7 @@ EXTRA_DIST = \ + .dockerenv \ + .dockerinit \ + proc/cpuinfo \ ++ proc/self/cgroup \ + proc/self/status \ + sbin/dmidecode \ + sbin/uname \ +diff --git a/tests/docker/proc/self/cgroup b/tests/docker/proc/self/cgroup +new file mode 100644 +index 0000000..5547637 +--- /dev/null ++++ b/tests/docker/proc/self/cgroup +@@ -0,0 +1,13 @@ ++12:devices:/docker/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae ++11:blkio:/docker/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae ++10:perf_event:/docker/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae ++9:pids:/docker/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae ++8:cpuset:/docker/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae ++7:rdma:/ ++6:hugetlb:/docker/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae ++5:net_cls,net_prio:/docker/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae ++4:memory:/docker/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae ++3:freezer:/docker/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae ++2:cpu,cpuacct:/docker/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae ++1:name=systemd:/docker/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae ++0::/system.slice/containerd.service +diff --git a/virt-what.in b/virt-what.in +index db16b5f..d43916b 100644 +--- a/virt-what.in ++++ b/virt-what.in +@@ -345,7 +345,8 @@ if ! "$skip_lkvm"; then + fi + + # Check for Docker. +-if [ -f "${root}/.dockerenv" ] || [ -f "${root}/.dockerinit" ]; then ++if [ -f "${root}/.dockerenv" ] || [ -f "${root}/.dockerinit" ] || \ ++ grep -qF /docker/ "${root}/proc/self/cgroup" 2>/dev/null; then + echo docker + fi + +-- +2.29.0.rc2 + diff --git a/0007-Add-podman-support.patch b/0007-Add-podman-support.patch new file mode 100644 index 0000000..1300d34 --- /dev/null +++ b/0007-Add-podman-support.patch @@ -0,0 +1,232 @@ +From 1df728aa4b1d2814265f9c86494f7d55ee0cf9af Mon Sep 17 00:00:00 2001 +From: Jordan Webb +Date: Mon, 13 Apr 2020 21:41:30 +0000 +Subject: [PATCH 7/8] Add podman support + +--- + configure.ac | 2 ++ + tests/podman/1/environ | Bin 0 -> 155 bytes + tests/podman/Makefile.am | 29 ++++++++++++++++++++ + tests/podman/proc/cpuinfo | 0 + tests/podman/proc/self/cgroup | 10 +++++++ + tests/podman/proc/self/status | 0 + tests/podman/sbin/dmidecode | 6 +++++ + tests/podman/sbin/uname | 2 ++ + tests/podman/sbin/virt-what-cpuid-helper | 2 ++ + tests/podman/test.sh | 32 +++++++++++++++++++++++ + virt-what.in | 10 ++++++- + virt-what.pod | 6 +++++ + 12 files changed, 98 insertions(+), 1 deletion(-) + create mode 100644 tests/podman/1/environ + create mode 100644 tests/podman/Makefile.am + create mode 100644 tests/podman/proc/cpuinfo + create mode 100644 tests/podman/proc/self/cgroup + create mode 100644 tests/podman/proc/self/status + create mode 100755 tests/podman/sbin/dmidecode + create mode 100755 tests/podman/sbin/uname + create mode 100755 tests/podman/sbin/virt-what-cpuid-helper + create mode 100755 tests/podman/test.sh + +diff --git a/configure.ac b/configure.ac +index 58b3d77..97d22bb 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -53,6 +53,7 @@ tests="\ + lxc \ + nutanix-ahv \ + parallels-desktop \ ++ podman \ + ppc64-baremetal \ + ppc64-kvm \ + ppc64-lpar-dedicated \ +@@ -96,6 +97,7 @@ AC_CONFIG_FILES([Makefile + tests/lxc/Makefile + tests/nutanix-ahv/Makefile + tests/parallels-desktop/Makefile ++ tests/podman/Makefile + tests/ppc64-baremetal/Makefile + tests/ppc64-kvm/Makefile + tests/ppc64-lpar-dedicated/Makefile +diff --git a/tests/podman/1/environ b/tests/podman/1/environ +new file mode 100644 +index 0000000000000000000000000000000000000000..dd6f0d4d67a151ab7bab97565b0737b8dbf7db44 +GIT binary patch +literal 155 +zcmYL>K?=hl5JhL*%XorW3^JI2CJ>u-F>Rni)ncUd_?@JS?B@UX=Ygfcpaw_1MfC|) +zr4V1LmeOGMJmGP5qhtJ+`+g?F^0V`SgdCeIPY%CrtqJUC&fa%yMZLtVmasj+>YHQl +YMd8IEi3Dr7m)t_kYsGhYq>$nA11>u+CjbBd + +literal 0 +HcmV?d00001 + +diff --git a/tests/podman/Makefile.am b/tests/podman/Makefile.am +new file mode 100644 +index 0000000..a4c70ad +--- /dev/null ++++ b/tests/podman/Makefile.am +@@ -0,0 +1,29 @@ ++# Makefile for virt-what ++# Copyright (C) 2008-2011 Red Hat Inc. ++# ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ ++CLEANFILES = *~ ++ ++TESTS = test.sh ++ ++EXTRA_DIST = \ ++ test.sh \ ++ proc/cpuinfo \ ++ proc/self/cgroup \ ++ proc/self/status \ ++ sbin/dmidecode \ ++ sbin/uname \ ++ sbin/virt-what-cpuid-helper +diff --git a/tests/podman/proc/cpuinfo b/tests/podman/proc/cpuinfo +new file mode 100644 +index 0000000..e69de29 +diff --git a/tests/podman/proc/self/cgroup b/tests/podman/proc/self/cgroup +new file mode 100644 +index 0000000..11fc74e +--- /dev/null ++++ b/tests/podman/proc/self/cgroup +@@ -0,0 +1,10 @@ ++11:perf_event:/machine.slice/libpod-2ed85a65b4d6aedbf4e6bd1bb2d29e6d7778791bd02532788eb16954cebf01da.scope ++10:devices:/machine.slice/libpod-2ed85a65b4d6aedbf4e6bd1bb2d29e6d7778791bd02532788eb16954cebf01da.scope ++8:pids:/machine.slice/libpod-2ed85a65b4d6aedbf4e6bd1bb2d29e6d7778791bd02532788eb16954cebf01da.scope ++7:blkio:/machine.slice/libpod-2ed85a65b4d6aedbf4e6bd1bb2d29e6d7778791bd02532788eb16954cebf01da.scope ++6:cpu,cpuacct:/machine.slice/libpod-2ed85a65b4d6aedbf4e6bd1bb2d29e6d7778791bd02532788eb16954cebf01da.scope ++5:net_cls,net_prio:/machine.slice/libpod-2ed85a65b4d6aedbf4e6bd1bb2d29e6d7778791bd02532788eb16954cebf01da.scope ++4:freezer:/machine.slice/libpod-2ed85a65b4d6aedbf4e6bd1bb2d29e6d7778791bd02532788eb16954cebf01da.scope ++3:cpuset:/machine.slice/libpod-2ed85a65b4d6aedbf4e6bd1bb2d29e6d7778791bd02532788eb16954cebf01da.scope ++2:memory:/machine.slice/libpod-2ed85a65b4d6aedbf4e6bd1bb2d29e6d7778791bd02532788eb16954cebf01da.scope ++1:name=systemd:/machine.slice/libpod-2ed85a65b4d6aedbf4e6bd1bb2d29e6d7778791bd02532788eb16954cebf01da.scope +diff --git a/tests/podman/proc/self/status b/tests/podman/proc/self/status +new file mode 100644 +index 0000000..e69de29 +diff --git a/tests/podman/sbin/dmidecode b/tests/podman/sbin/dmidecode +new file mode 100755 +index 0000000..d9992ad +--- /dev/null ++++ b/tests/podman/sbin/dmidecode +@@ -0,0 +1,6 @@ ++#!/bin/sh - ++cat <<'EOF' ++# dmidecode 2.11 ++/dev/mem: Operation not permitted ++EOF ++exit 1 +diff --git a/tests/podman/sbin/uname b/tests/podman/sbin/uname +new file mode 100755 +index 0000000..ab0ec89 +--- /dev/null ++++ b/tests/podman/sbin/uname +@@ -0,0 +1,2 @@ ++#!/bin/sh - ++echo x86_64 +diff --git a/tests/podman/sbin/virt-what-cpuid-helper b/tests/podman/sbin/virt-what-cpuid-helper +new file mode 100755 +index 0000000..ad82504 +--- /dev/null ++++ b/tests/podman/sbin/virt-what-cpuid-helper +@@ -0,0 +1,2 @@ ++#!/bin/sh - ++echo @ +diff --git a/tests/podman/test.sh b/tests/podman/test.sh +new file mode 100755 +index 0000000..6db58e5 +--- /dev/null ++++ b/tests/podman/test.sh +@@ -0,0 +1,32 @@ ++# Test for Podman ++# Copyright (C) 2008-2011 Red Hat Inc. ++# ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ ++output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)" ++expected="podman" ++ ++if [ "$output" != "$expected" ]; then ++ echo "$0: test failed because output did not match expected" ++ echo "Expected output was:" ++ echo "----------------------------------------" ++ echo "$expected" ++ echo "----------------------------------------" ++ echo "But the actual output of the program was:" ++ echo "----------------------------------------" ++ echo "$output" ++ echo "----------------------------------------" ++ exit 1 ++fi +diff --git a/virt-what.in b/virt-what.in +index d43916b..d52171c 100644 +--- a/virt-what.in ++++ b/virt-what.in +@@ -165,7 +165,7 @@ fi + # Added by Marc Fournier + + if [ -e "${root}/proc/1/environ" ] && +- cat "${root}/proc/1/environ" | tr '\000' '\n' | grep -Eiq '^container='; then ++ cat "${root}/proc/1/environ" | tr '\000' '\n' | grep -Eiq '^container=lxc'; then + echo lxc + fi + +@@ -350,6 +350,14 @@ if [ -f "${root}/.dockerenv" ] || [ -f "${root}/.dockerinit" ] || \ + echo docker + fi + ++# Check for Podman. ++if [ -e "${root}/proc/1/environ" ] && ++ cat "${root}/proc/1/environ" | tr '\000' '\n' | grep -Eiq '^container=podman'; then ++ echo podman ++elif grep -qF /libpod- "${root}/proc/self/cgroup" 2>/dev/null; then ++ echo podman ++fi ++ + # Check ppc64 lpar, kvm or powerkvm + + # example /proc/cpuinfo line indicating 'not baremetal' +diff --git a/virt-what.pod b/virt-what.pod +index ea5cb77..405537b 100644 +--- a/virt-what.pod ++++ b/virt-what.pod +@@ -204,6 +204,12 @@ The guest is running inside Parallels Virtual Platform + + Status: contributed by Justin Clift + ++=item B ++ ++This is a Podman container. ++ ++Status: contributed by Jordan Webb ++ + =item B + + The guest is running inside IBM PowerVM Lx86 Linux/x86 emulator. +-- +2.29.0.rc2 + diff --git a/0008-Simplify-and-fix-invocation-of-cpuid.patch b/0008-Simplify-and-fix-invocation-of-cpuid.patch new file mode 100644 index 0000000..5bccb57 --- /dev/null +++ b/0008-Simplify-and-fix-invocation-of-cpuid.patch @@ -0,0 +1,60 @@ +From 60d903fbb7653bc9754228bdab4c6933fcda1e72 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 13 Apr 2021 09:35:07 +0100 +Subject: [PATCH 8/8] Simplify and fix invocation of cpuid. + +Fixes a crash on some platforms identified by Yongkui Guo in +https://bugzilla.redhat.com/show_bug.cgi?id=1756381#c15 +--- + virt-what-cpuid-helper.c | 24 ++++++++++++++++-------- + 1 file changed, 16 insertions(+), 8 deletions(-) + +diff --git a/virt-what-cpuid-helper.c b/virt-what-cpuid-helper.c +index 9c6cdb2..fdceb62 100644 +--- a/virt-what-cpuid-helper.c ++++ b/virt-what-cpuid-helper.c +@@ -47,17 +47,25 @@ known_signature (const char *sig) + 0; + } + ++/* Copied from the Linux kernel definition in ++ * arch/x86/include/asm/processor.h ++ */ ++static inline void ++cpuid (uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx) ++{ ++ asm volatile ("cpuid" ++ : "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx) ++ : "0" (*eax), "2" (*ecx) ++ : "memory"); ++} ++ + static uint32_t +-cpuid (uint32_t eax, char *sig) ++cpuid_leaf (uint32_t eax, char *sig) + { + uint32_t *sig32 = (uint32_t *) sig; + +- asm volatile ( +- "xchgl %%ebx,%1; xor %%ebx,%%ebx; cpuid; xchgl %%ebx,%1" +- : "=a" (eax), "+r" (sig32[0]), "=c" (sig32[1]), "=d" (sig32[2]) +- : "0" (eax)); +- sig[12] = 0; +- ++ cpuid (&eax, &sig32[0], &sig32[1], &sig32[2]); ++ sig[12] = 0; /* \0-terminate the string to make string comparison possible */ + return eax; + } + +@@ -87,7 +95,7 @@ cpu_sig (void) + */ + for (leaf = base + 0xff00; leaf >= base; leaf -= 0x100) { + memset (sig, 0, sizeof sig); +- cpuid (leaf, sig); ++ cpuid_leaf (leaf, sig); + if (known_signature (sig)) { + puts (sig); + break; +-- +2.29.0.rc2 + diff --git a/virt-what.spec b/virt-what.spec index e280655..1eea3bf 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -1,13 +1,24 @@ Name: virt-what -Version: 1.20 -Release: 5%{?dist} +Version: 1.21 +Release: 0.1%{?dist} Summary: Detect if we are running in a virtual machine License: GPLv2+ URL: http://people.redhat.com/~rjones/virt-what/ -Source0: http://people.redhat.com/~rjones/virt-what/files/%{name}-%{version}.tar.gz +#Source0: http://people.redhat.com/~rjones/virt-what/files/%%{name}-%%{version}.tar.gz +Source0: http://people.redhat.com/~rjones/virt-what/files/%{name}-1.20.tar.gz -BuildRequires: make +# These are all the patches added since 1.20. +Patch0001: 0001-Fix-virt-what-cpuid-helper.patch +Patch0002: 0002-Add-support-for-Nutanix-Acropolis-Hypervisor-AHV-RHB.patch +Patch0003: 0003-helper-Fix-KVM-signature.patch +Patch0004: 0004-Fix-incorrect-detection-of-MS-Surfacebook-2-as-a-vir.patch +Patch0005: 0005-docker-Check-for-.dockerenv-too.patch +Patch0006: 0006-docker-Lookup-from-proc-self-cgroup-too.patch +Patch0007: 0007-Add-podman-support.patch +Patch0008: 0008-Simplify-and-fix-invocation-of-cpuid.patch + +BuildRequires: make BuildRequires: git # This is provided by the build root, but we make it explicit @@ -60,6 +71,7 @@ Current types of virtualization detected: - lxc Linux LXC container - kvm Linux Kernel Virtual Machine (KVM) - lkvm LKVM / kvmtool + - nutanix_ahv Nutanix Acropolis Hypervisor (AHV) - openvz OpenVZ or Virtuozzo - ovirt oVirt node - parallels Parallels Virtual Platform @@ -79,7 +91,8 @@ Current types of virtualization detected: %prep -%autosetup -S git +#%%autosetup -S git +%autosetup -S git -n %{name}-1.20 %build @@ -105,6 +118,9 @@ fi %changelog +* Tue Apr 13 2021 Richard W.M. Jones - 1.21-0.1 +- Add all patches since 1.20 in preparation for 1.21 release. + * Wed Jan 27 2021 Fedora Release Engineering - 1.20-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From fdac88bb69c4db5cc0df057a8929252937cfc124 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 13 Apr 2021 11:14:10 +0100 Subject: [PATCH 20/48] Always rebuild upstream autotools files. --- virt-what.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/virt-what.spec b/virt-what.spec index 1eea3bf..1e08841 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -20,6 +20,7 @@ Patch0008: 0008-Simplify-and-fix-invocation-of-cpuid.patch BuildRequires: make BuildRequires: git +BuildRequires: autoconf, automake, libtool # This is provided by the build root, but we make it explicit # anyway in case this was dropped from the build root in future. @@ -94,6 +95,9 @@ Current types of virtualization detected: #%%autosetup -S git %autosetup -S git -n %{name}-1.20 +# Always rebuild upstream autotools files. +autoreconf -i + %build %configure From 8f53b993c1495460a5ae55d284bb536fd3bb4188 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 19 Apr 2021 13:02:16 +0100 Subject: [PATCH 21/48] New upstream version 1.21. --- .gitignore | 1 + 0001-Fix-virt-what-cpuid-helper.patch | 118 ----- ...Nutanix-Acropolis-Hypervisor-AHV-RHB.patch | 405 ------------------ 0003-helper-Fix-KVM-signature.patch | 38 -- ...tection-of-MS-Surfacebook-2-as-a-vir.patch | 27 -- 0005-docker-Check-for-.dockerenv-too.patch | 46 -- ...ker-Lookup-from-proc-self-cgroup-too.patch | 61 --- 0007-Add-podman-support.patch | 232 ---------- ...Simplify-and-fix-invocation-of-cpuid.patch | 60 --- sources | 3 +- virt-what.spec | 21 +- 11 files changed, 9 insertions(+), 1003 deletions(-) delete mode 100644 0001-Fix-virt-what-cpuid-helper.patch delete mode 100644 0002-Add-support-for-Nutanix-Acropolis-Hypervisor-AHV-RHB.patch delete mode 100644 0003-helper-Fix-KVM-signature.patch delete mode 100644 0004-Fix-incorrect-detection-of-MS-Surfacebook-2-as-a-vir.patch delete mode 100644 0005-docker-Check-for-.dockerenv-too.patch delete mode 100644 0006-docker-Lookup-from-proc-self-cgroup-too.patch delete mode 100644 0007-Add-podman-support.patch delete mode 100644 0008-Simplify-and-fix-invocation-of-cpuid.patch diff --git a/.gitignore b/.gitignore index 5f64095..6fc170f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /virt-what-*.tar.gz +/virt-what-1.21.tar.gz.sig diff --git a/0001-Fix-virt-what-cpuid-helper.patch b/0001-Fix-virt-what-cpuid-helper.patch deleted file mode 100644 index feeb0ab..0000000 --- a/0001-Fix-virt-what-cpuid-helper.patch +++ /dev/null @@ -1,118 +0,0 @@ -From 0a0d9fa7c85c5474870cae37832d28ccd899d4ee Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Fri, 4 Oct 2019 15:57:42 +0300 -Subject: [PATCH 1/8] Fix virt-what-cpuid-helper. - -The value returned in %eax is the max_entry (eg. 0x40000000 -if there are no further leafs). However it is not reliable. -In addition if there are multiple leafs we should probably -only print the highest one. - -Also use uint32_t instead of unsigned int. - -Thanks: Paolo Bonzini. ---- - virt-what-cpuid-helper.c | 67 ++++++++++++++++++++++++++++------------ - 1 file changed, 48 insertions(+), 19 deletions(-) - -diff --git a/virt-what-cpuid-helper.c b/virt-what-cpuid-helper.c -index 7812545..0cd4a6f 100644 ---- a/virt-what-cpuid-helper.c -+++ b/virt-what-cpuid-helper.c -@@ -1,5 +1,5 @@ - /* virt-what-cpuid-helper: Are we running inside KVM or Xen HVM? -- * Copyright (C) 2008 Red Hat Inc. -+ * Copyright (C) 2008-2019 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by -@@ -21,14 +21,35 @@ - */ - - #include -+#include -+#include - #include - - #if defined(__i386__) || defined(__x86_64__) - --static unsigned int --cpuid (unsigned int eax, char *sig) -+/* Known x86 hypervisor signatures. Note that if you add a new test -+ * to virt-what.in you may need to update this list. The signature is -+ * always 12 bytes except in the case of KVM. -+ */ -+static int -+known_signature (char *sig) - { -- unsigned int *sig32 = (unsigned int *) sig; -+ return -+ strcmp (sig, "bhyve bhyve ") == 0 || -+ strcmp (sig, "KVMKVMKVM") == 0 || -+ strcmp (sig, "LKVMLKVMLKVM") == 0 || -+ strcmp (sig, "Microsoft Hv") == 0 || -+ strcmp (sig, "OpenBSDVMM58") == 0 || -+ strcmp (sig, "TCGTCGTCGTCG") == 0 || -+ strcmp (sig, "VMwareVMware") == 0 || -+ strcmp (sig, "XenVMMXenVMM") == 0 || -+ 0; -+} -+ -+static uint32_t -+cpuid (uint32_t eax, char *sig) -+{ -+ uint32_t *sig32 = (uint32_t *) sig; - - asm volatile ( - "xchgl %%ebx,%1; xor %%ebx,%%ebx; cpuid; xchgl %%ebx,%1" -@@ -43,24 +64,32 @@ static void - cpu_sig (void) - { - char sig[13]; -- unsigned int base = 0x40000000, leaf = base; -- unsigned int max_entries; -+ const uint32_t base = 0x40000000; -+ uint32_t leaf; - -- memset (sig, 0, sizeof sig); -- max_entries = cpuid (leaf, sig); -- puts (sig); -- -- /* Most hypervisors only have information in leaf 0x40000000, but -- * upstream Xen contains further leaf entries (in particular when -- * used with Viridian [HyperV] extensions). CPUID is supposed to -- * return the maximum leaf offset in %eax, so that's what we use, -- * but only if it looks sensible. -+ /* Most hypervisors only have information in leaf 0x40000000. -+ * -+ * Some hypervisors have "Viridian [HyperV] extensions", and those -+ * must appear in slot 0x40000000, but they will also have the true -+ * hypervisor in a higher slot. -+ * -+ * CPUID is supposed to return the maximum leaf offset in %eax, but -+ * this is not reliable. Instead we check the returned signatures -+ * against a known list (the others will be empty or garbage) and -+ * only print the ones we know about. This is OK because if we add -+ * a new test in virt-what we can update the list. -+ * -+ * By searching backwards we only print the highest entry, thus -+ * ignoring Viridian for Xen (and Nutanix). If we ever encounter a -+ * hypervisor that has more than 2 entries we may need to revisit -+ * this. - */ -- if (max_entries > 3 && max_entries < 0x10000) { -- for (leaf = base + 0x100; leaf <= base + max_entries; leaf += 0x100) { -- memset (sig, 0, sizeof sig); -- cpuid (leaf, sig); -+ for (leaf = base + 0xff00; leaf >= base; leaf -= 0x100) { -+ memset (sig, 0, sizeof sig); -+ cpuid (leaf, sig); -+ if (known_signature (sig)) { - puts (sig); -+ break; - } - } - } --- -2.29.0.rc2 - diff --git a/0002-Add-support-for-Nutanix-Acropolis-Hypervisor-AHV-RHB.patch b/0002-Add-support-for-Nutanix-Acropolis-Hypervisor-AHV-RHB.patch deleted file mode 100644 index 470df9a..0000000 --- a/0002-Add-support-for-Nutanix-Acropolis-Hypervisor-AHV-RHB.patch +++ /dev/null @@ -1,405 +0,0 @@ -From f317e788dd7c2a35c2ae0f64fa50ab720382ebf5 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Fri, 4 Oct 2019 16:25:55 +0300 -Subject: [PATCH 2/8] Add support for Nutanix Acropolis Hypervisor (AHV) - (RHBZ#1756381). - -Thanks: Cristian Seres for providing access to a guest. ---- - configure.ac | 2 + - tests/nutanix-ahv/Makefile.am | 28 ++++ - tests/nutanix-ahv/proc/cpuinfo | 27 ++++ - tests/nutanix-ahv/proc/self/status | 55 ++++++++ - tests/nutanix-ahv/sbin/dmidecode | 123 ++++++++++++++++++ - tests/nutanix-ahv/sbin/uname | 2 + - tests/nutanix-ahv/sbin/virt-what-cpuid-helper | 2 + - tests/nutanix-ahv/test.sh | 32 +++++ - virt-what.in | 10 +- - virt-what.pod | 6 + - 10 files changed, 286 insertions(+), 1 deletion(-) - create mode 100644 tests/nutanix-ahv/Makefile.am - create mode 100644 tests/nutanix-ahv/proc/cpuinfo - create mode 100644 tests/nutanix-ahv/proc/self/status - create mode 100755 tests/nutanix-ahv/sbin/dmidecode - create mode 100755 tests/nutanix-ahv/sbin/uname - create mode 100755 tests/nutanix-ahv/sbin/virt-what-cpuid-helper - create mode 100755 tests/nutanix-ahv/test.sh - -diff --git a/configure.ac b/configure.ac -index c45f469..58b3d77 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -51,6 +51,7 @@ tests="\ - lkvm-arm \ - lx86 \ - lxc \ -+ nutanix-ahv \ - parallels-desktop \ - ppc64-baremetal \ - ppc64-kvm \ -@@ -93,6 +94,7 @@ AC_CONFIG_FILES([Makefile - tests/lkvm-arm/Makefile - tests/lx86/Makefile - tests/lxc/Makefile -+ tests/nutanix-ahv/Makefile - tests/parallels-desktop/Makefile - tests/ppc64-baremetal/Makefile - tests/ppc64-kvm/Makefile -diff --git a/tests/nutanix-ahv/Makefile.am b/tests/nutanix-ahv/Makefile.am -new file mode 100644 -index 0000000..b748df8 ---- /dev/null -+++ b/tests/nutanix-ahv/Makefile.am -@@ -0,0 +1,28 @@ -+# Makefile for virt-what -+# Copyright (C) 2008-2011 Red Hat Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+CLEANFILES = *~ -+ -+TESTS = test.sh -+ -+EXTRA_DIST = \ -+ test.sh \ -+ proc/cpuinfo \ -+ proc/self/status \ -+ sbin/dmidecode \ -+ sbin/uname \ -+ sbin/virt-what-cpuid-helper -diff --git a/tests/nutanix-ahv/proc/cpuinfo b/tests/nutanix-ahv/proc/cpuinfo -new file mode 100644 -index 0000000..d7a1f68 ---- /dev/null -+++ b/tests/nutanix-ahv/proc/cpuinfo -@@ -0,0 +1,27 @@ -+processor : 0 -+vendor_id : GenuineIntel -+cpu family : 15 -+model : 6 -+model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz -+stepping : 1 -+microcode : 0x1 -+cpu MHz : 2199.998 -+cache size : 16384 KB -+physical id : 0 -+siblings : 1 -+core id : 0 -+cpu cores : 1 -+apicid : 0 -+initial apicid : 0 -+fpu : yes -+fpu_exception : yes -+cpuid level : 13 -+wp : yes -+flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc nopl cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f avx512dq rdseed adx smap clflushopt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 arat md_clear -+bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs -+bogomips : 4399.99 -+clflush size : 64 -+cache_alignment : 128 -+address sizes : 46 bits physical, 48 bits virtual -+power management: -+ -diff --git a/tests/nutanix-ahv/proc/self/status b/tests/nutanix-ahv/proc/self/status -new file mode 100644 -index 0000000..7b4eed0 ---- /dev/null -+++ b/tests/nutanix-ahv/proc/self/status -@@ -0,0 +1,55 @@ -+Name: cat -+Umask: 0022 -+State: R (running) -+Tgid: 18508 -+Ngid: 0 -+Pid: 18508 -+PPid: 18506 -+TracerPid: 0 -+Uid: 0 0 0 0 -+Gid: 0 0 0 0 -+FDSize: 64 -+Groups: 0 -+NStgid: 18508 -+NSpid: 18508 -+NSpgid: 18506 -+NSsid: 1945 -+VmPeak: 5392 kB -+VmSize: 5392 kB -+VmLck: 0 kB -+VmPin: 0 kB -+VmHWM: 760 kB -+VmRSS: 760 kB -+RssAnon: 68 kB -+RssFile: 692 kB -+RssShmem: 0 kB -+VmData: 312 kB -+VmStk: 132 kB -+VmExe: 28 kB -+VmLib: 1456 kB -+VmPTE: 48 kB -+VmSwap: 0 kB -+HugetlbPages: 0 kB -+CoreDumping: 0 -+THP_enabled: 1 -+Threads: 1 -+SigQ: 3/7359 -+SigPnd: 0000000000000000 -+ShdPnd: 0000000000000000 -+SigBlk: 0000000000000000 -+SigIgn: 0000000000000000 -+SigCgt: 0000000000000000 -+CapInh: 0000000000000000 -+CapPrm: 0000003fffffffff -+CapEff: 0000003fffffffff -+CapBnd: 0000003fffffffff -+CapAmb: 0000000000000000 -+NoNewPrivs: 0 -+Seccomp: 0 -+Speculation_Store_Bypass: thread vulnerable -+Cpus_allowed: ffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff -+Cpus_allowed_list: 0-239 -+Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 -+Mems_allowed_list: 0 -+voluntary_ctxt_switches: 0 -+nonvoluntary_ctxt_switches: 2 -diff --git a/tests/nutanix-ahv/sbin/dmidecode b/tests/nutanix-ahv/sbin/dmidecode -new file mode 100755 -index 0000000..3774819 ---- /dev/null -+++ b/tests/nutanix-ahv/sbin/dmidecode -@@ -0,0 +1,123 @@ -+#!/bin/sh - -+cat <<'EOF' -+i# dmidecode 3.2 -+Getting SMBIOS data from sysfs. -+SMBIOS 2.8 present. -+9 structures occupying 486 bytes. -+Table at 0x000F73C0. -+ -+Handle 0x0000, DMI type 0, 24 bytes -+BIOS Information -+ Vendor: SeaBIOS -+ Version: 1.9.1-5.el6 -+ Release Date: 04/01/2014 -+ Address: 0xE8000 -+ Runtime Size: 96 kB -+ ROM Size: 64 kB -+ Characteristics: -+ BIOS characteristics not supported -+ Targeted content distribution is supported -+ BIOS Revision: 0.0 -+ -+Handle 0x0100, DMI type 1, 27 bytes -+System Information -+ Manufacturer: Nutanix -+ Product Name: AHV -+ Version: RHEL 7.3.0 PC (i440FX + PIIX, 1996) -+ Serial Number: B913C223-EEDE-4DFC-BB43-BE1495F4388D -+ UUID: b913c223-eede-4dfc-bb43-be1495f4388d -+ Wake-up Type: Power Switch -+ SKU Number: Not Specified -+ Family: Red Hat Enterprise Linux -+ -+Handle 0x0300, DMI type 3, 21 bytes -+Chassis Information -+ Manufacturer: Red Hat -+ Type: Other -+ Lock: Not Present -+ Version: RHEL 7.3.0 PC (i440FX + PIIX, 1996) -+ Serial Number: Not Specified -+ Asset Tag: Not Specified -+ Boot-up State: Safe -+ Power Supply State: Safe -+ Thermal State: Safe -+ Security Status: Unknown -+ OEM Information: 0x00000000 -+ Height: Unspecified -+ Number Of Power Cords: Unspecified -+ Contained Elements: 0 -+ -+Handle 0x0400, DMI type 4, 42 bytes -+Processor Information -+ Socket Designation: CPU 0 -+ Type: Central Processor -+ Family: Other -+ Manufacturer: Red Hat -+ ID: 61 0F 00 00 FF FB 8B 0F -+ Version: RHEL 7.3.0 PC (i440FX + PIIX, 1996) -+ Voltage: Unknown -+ External Clock: Unknown -+ Max Speed: 2000 MHz -+ Current Speed: 2000 MHz -+ Status: Populated, Enabled -+ Upgrade: Other -+ L1 Cache Handle: Not Provided -+ L2 Cache Handle: Not Provided -+ L3 Cache Handle: Not Provided -+ Serial Number: Not Specified -+ Asset Tag: Not Specified -+ Part Number: Not Specified -+ Core Count: 1 -+ Core Enabled: 1 -+ Thread Count: 1 -+ Characteristics: None -+ -+Handle 0x1000, DMI type 16, 23 bytes -+Physical Memory Array -+ Location: Other -+ Use: System Memory -+ Error Correction Type: Multi-bit ECC -+ Maximum Capacity: 2 GB -+ Error Information Handle: Not Provided -+ Number Of Devices: 1 -+ -+Handle 0x1100, DMI type 17, 40 bytes -+Memory Device -+ Array Handle: 0x1000 -+ Error Information Handle: Not Provided -+ Total Width: Unknown -+ Data Width: Unknown -+ Size: 2048 MB -+ Form Factor: DIMM -+ Set: None -+ Locator: DIMM 0 -+ Bank Locator: Not Specified -+ Type: RAM -+ Type Detail: Other -+ Speed: Unknown -+ Manufacturer: Red Hat -+ Serial Number: Not Specified -+ Asset Tag: Not Specified -+ Part Number: Not Specified -+ Rank: Unknown -+ Configured Memory Speed: Unknown -+ Minimum Voltage: Unknown -+ Maximum Voltage: Unknown -+ Configured Voltage: Unknown -+ -+Handle 0x1300, DMI type 19, 31 bytes -+Memory Array Mapped Address -+ Starting Address: 0x00000000000 -+ Ending Address: 0x0007FFFFFFF -+ Range Size: 2 GB -+ Physical Array Handle: 0x1000 -+ Partition Width: 1 -+ -+Handle 0x2000, DMI type 32, 11 bytes -+System Boot Information -+ Status: No errors detected -+ -+Handle 0x7F00, DMI type 127, 4 bytes -+End Of Table -+ -+EOF -diff --git a/tests/nutanix-ahv/sbin/uname b/tests/nutanix-ahv/sbin/uname -new file mode 100755 -index 0000000..ab0ec89 ---- /dev/null -+++ b/tests/nutanix-ahv/sbin/uname -@@ -0,0 +1,2 @@ -+#!/bin/sh - -+echo x86_64 -diff --git a/tests/nutanix-ahv/sbin/virt-what-cpuid-helper b/tests/nutanix-ahv/sbin/virt-what-cpuid-helper -new file mode 100755 -index 0000000..f52a9d7 ---- /dev/null -+++ b/tests/nutanix-ahv/sbin/virt-what-cpuid-helper -@@ -0,0 +1,2 @@ -+#!/bin/sh - -+echo KVMKVMKVM -diff --git a/tests/nutanix-ahv/test.sh b/tests/nutanix-ahv/test.sh -new file mode 100755 -index 0000000..3d934b2 ---- /dev/null -+++ b/tests/nutanix-ahv/test.sh -@@ -0,0 +1,32 @@ -+# Test for Nutanix AHV -+# Copyright (C) 2019 Red Hat Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)" -+expected="nutanix_ahv" -+ -+if [ "$output" != "$expected" ]; then -+ echo "$0: test failed because output did not match expected" -+ echo "Expected output was:" -+ echo "----------------------------------------" -+ echo "$expected" -+ echo "----------------------------------------" -+ echo "But the actual output of the program was:" -+ echo "----------------------------------------" -+ echo "$output" -+ echo "----------------------------------------" -+ exit 1 -+fi -diff --git a/virt-what.in b/virt-what.in -index f685461..9eafa05 100644 ---- a/virt-what.in -+++ b/virt-what.in -@@ -1,6 +1,6 @@ - #!/bin/sh - - # @configure_input@ --# Copyright (C) 2008-2017 Red Hat Inc. -+# Copyright (C) 2008-2019 Red Hat Inc. - # - # This program is free software; you can redistribute it and/or modify - # it under the terms of the GNU General Public License as published by -@@ -220,6 +220,14 @@ if echo "$dmi" | grep -q 'Vendor: Parallels'; then - skip_qemu_kvm=true - fi - -+# Check for Nutanix AHV. -+# This is sufficiently different from KVM and has Viridian extensions, -+# so skip the KVM test. -+if echo "$dmi" | grep -q 'Manufacturer: Nutanix'; then -+ echo nutanix_ahv -+ skip_qemu_kvm=true -+fi -+ - # Check for oVirt/RHEV. - if echo "$dmi" | grep -q 'Manufacturer: oVirt'; then - echo ovirt -diff --git a/virt-what.pod b/virt-what.pod -index 5a0bdfc..ea5cb77 100644 ---- a/virt-what.pod -+++ b/virt-what.pod -@@ -177,6 +177,12 @@ is lkvm (a.k.a kvmtool). - - Status: contributed by Andrew Jones - -+=item B -+ -+The guest is running inside Nutanix Acropolis Hypervisor (AHV). -+ -+Status: confirmed by RWMJ. -+ - =item B - - The guest appears to be running inside an OpenVZ or Virtuozzo --- -2.29.0.rc2 - diff --git a/0003-helper-Fix-KVM-signature.patch b/0003-helper-Fix-KVM-signature.patch deleted file mode 100644 index 2416e7a..0000000 --- a/0003-helper-Fix-KVM-signature.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 5cdf740942a4f443977344428dfe6c43f232f0eb Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Fri, 4 Oct 2019 18:30:01 +0100 -Subject: [PATCH 3/8] helper: Fix KVM signature. - -Thanks: Paolo Bonzini. ---- - virt-what-cpuid-helper.c | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/virt-what-cpuid-helper.c b/virt-what-cpuid-helper.c -index 0cd4a6f..9c6cdb2 100644 ---- a/virt-what-cpuid-helper.c -+++ b/virt-what-cpuid-helper.c -@@ -28,15 +28,16 @@ - #if defined(__i386__) || defined(__x86_64__) - - /* Known x86 hypervisor signatures. Note that if you add a new test -- * to virt-what.in you may need to update this list. The signature is -- * always 12 bytes except in the case of KVM. -+ * to virt-what.in you may need to update this list. Note the -+ * signature is always 12 bytes long, plus we add \0 to the end to -+ * make it 13 bytes. - */ - static int --known_signature (char *sig) -+known_signature (const char *sig) - { - return - strcmp (sig, "bhyve bhyve ") == 0 || -- strcmp (sig, "KVMKVMKVM") == 0 || -+ memcmp (sig, "KVMKVMKVM\0\0\0", 12) == 0 || - strcmp (sig, "LKVMLKVMLKVM") == 0 || - strcmp (sig, "Microsoft Hv") == 0 || - strcmp (sig, "OpenBSDVMM58") == 0 || --- -2.29.0.rc2 - diff --git a/0004-Fix-incorrect-detection-of-MS-Surfacebook-2-as-a-vir.patch b/0004-Fix-incorrect-detection-of-MS-Surfacebook-2-as-a-vir.patch deleted file mode 100644 index c7c98d8..0000000 --- a/0004-Fix-incorrect-detection-of-MS-Surfacebook-2-as-a-vir.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 3aa4ad0f81c35a56960871b68731b6e948d95f56 Mon Sep 17 00:00:00 2001 -From: willem van de velde -Date: Tue, 22 Oct 2019 11:58:01 +0100 -Subject: [PATCH 4/8] Fix incorrect detection of MS Surfacebook 2 as a virtual - machine. - ---- - virt-what.in | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/virt-what.in b/virt-what.in -index 9eafa05..a61ce91 100644 ---- a/virt-what.in -+++ b/virt-what.in -@@ -132,7 +132,8 @@ fi - # The negative check for cpuid is to distinguish this from Hyper-V - # which also has the same manufacturer string in the SM-BIOS data. - if [ "$cpuid" != "Microsoft Hv" ] && -- echo "$dmi" | grep -q 'Manufacturer: Microsoft Corporation'; then -+ echo "$dmi" | grep -q 'Manufacturer: Microsoft Corporation' && -+ echo "$dmi" | grep -q 'Product Name: Virtual Machine'; then - echo virtualpc - fi - --- -2.29.0.rc2 - diff --git a/0005-docker-Check-for-.dockerenv-too.patch b/0005-docker-Check-for-.dockerenv-too.patch deleted file mode 100644 index 64367b1..0000000 --- a/0005-docker-Check-for-.dockerenv-too.patch +++ /dev/null @@ -1,46 +0,0 @@ -From e2c49cda221f95cb65b1b3ac3ae15aa41d92f519 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ville=20Skytt=C3=A4?= -Date: Sun, 1 Dec 2019 07:58:04 +0200 -Subject: [PATCH 5/8] docker: Check for /.dockerenv too - -/.dockerinit may no longer exist. - -Ref https://github.com/moby/moby/issues/18355 ---- - tests/docker/.dockerenv | 0 - tests/docker/Makefile.am | 1 + - virt-what.in | 2 +- - 3 files changed, 2 insertions(+), 1 deletion(-) - create mode 100644 tests/docker/.dockerenv - -diff --git a/tests/docker/.dockerenv b/tests/docker/.dockerenv -new file mode 100644 -index 0000000..e69de29 -diff --git a/tests/docker/Makefile.am b/tests/docker/Makefile.am -index e0ea991..e2a95d8 100644 ---- a/tests/docker/Makefile.am -+++ b/tests/docker/Makefile.am -@@ -21,6 +21,7 @@ TESTS = test.sh - - EXTRA_DIST = \ - test.sh \ -+ .dockerenv \ - .dockerinit \ - proc/cpuinfo \ - proc/self/status \ -diff --git a/virt-what.in b/virt-what.in -index a61ce91..db16b5f 100644 ---- a/virt-what.in -+++ b/virt-what.in -@@ -345,7 +345,7 @@ if ! "$skip_lkvm"; then - fi - - # Check for Docker. --if [ -f "${root}/.dockerinit" ]; then -+if [ -f "${root}/.dockerenv" ] || [ -f "${root}/.dockerinit" ]; then - echo docker - fi - --- -2.29.0.rc2 - diff --git a/0006-docker-Lookup-from-proc-self-cgroup-too.patch b/0006-docker-Lookup-from-proc-self-cgroup-too.patch deleted file mode 100644 index 3d9c936..0000000 --- a/0006-docker-Lookup-from-proc-self-cgroup-too.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 57f0c3cc6a7e631f644d67f05b002c6004bb6601 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ville=20Skytt=C3=A4?= -Date: Sun, 1 Dec 2019 08:21:32 +0200 -Subject: [PATCH 6/8] docker: Lookup from /proc/self/cgroup too - -Refs https://github.com/moby/moby/issues/18355 ---- - tests/docker/Makefile.am | 1 + - tests/docker/proc/self/cgroup | 13 +++++++++++++ - virt-what.in | 3 ++- - 3 files changed, 16 insertions(+), 1 deletion(-) - create mode 100644 tests/docker/proc/self/cgroup - -diff --git a/tests/docker/Makefile.am b/tests/docker/Makefile.am -index e2a95d8..401f372 100644 ---- a/tests/docker/Makefile.am -+++ b/tests/docker/Makefile.am -@@ -24,6 +24,7 @@ EXTRA_DIST = \ - .dockerenv \ - .dockerinit \ - proc/cpuinfo \ -+ proc/self/cgroup \ - proc/self/status \ - sbin/dmidecode \ - sbin/uname \ -diff --git a/tests/docker/proc/self/cgroup b/tests/docker/proc/self/cgroup -new file mode 100644 -index 0000000..5547637 ---- /dev/null -+++ b/tests/docker/proc/self/cgroup -@@ -0,0 +1,13 @@ -+12:devices:/docker/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae -+11:blkio:/docker/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae -+10:perf_event:/docker/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae -+9:pids:/docker/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae -+8:cpuset:/docker/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae -+7:rdma:/ -+6:hugetlb:/docker/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae -+5:net_cls,net_prio:/docker/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae -+4:memory:/docker/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae -+3:freezer:/docker/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae -+2:cpu,cpuacct:/docker/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae -+1:name=systemd:/docker/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae -+0::/system.slice/containerd.service -diff --git a/virt-what.in b/virt-what.in -index db16b5f..d43916b 100644 ---- a/virt-what.in -+++ b/virt-what.in -@@ -345,7 +345,8 @@ if ! "$skip_lkvm"; then - fi - - # Check for Docker. --if [ -f "${root}/.dockerenv" ] || [ -f "${root}/.dockerinit" ]; then -+if [ -f "${root}/.dockerenv" ] || [ -f "${root}/.dockerinit" ] || \ -+ grep -qF /docker/ "${root}/proc/self/cgroup" 2>/dev/null; then - echo docker - fi - --- -2.29.0.rc2 - diff --git a/0007-Add-podman-support.patch b/0007-Add-podman-support.patch deleted file mode 100644 index 1300d34..0000000 --- a/0007-Add-podman-support.patch +++ /dev/null @@ -1,232 +0,0 @@ -From 1df728aa4b1d2814265f9c86494f7d55ee0cf9af Mon Sep 17 00:00:00 2001 -From: Jordan Webb -Date: Mon, 13 Apr 2020 21:41:30 +0000 -Subject: [PATCH 7/8] Add podman support - ---- - configure.ac | 2 ++ - tests/podman/1/environ | Bin 0 -> 155 bytes - tests/podman/Makefile.am | 29 ++++++++++++++++++++ - tests/podman/proc/cpuinfo | 0 - tests/podman/proc/self/cgroup | 10 +++++++ - tests/podman/proc/self/status | 0 - tests/podman/sbin/dmidecode | 6 +++++ - tests/podman/sbin/uname | 2 ++ - tests/podman/sbin/virt-what-cpuid-helper | 2 ++ - tests/podman/test.sh | 32 +++++++++++++++++++++++ - virt-what.in | 10 ++++++- - virt-what.pod | 6 +++++ - 12 files changed, 98 insertions(+), 1 deletion(-) - create mode 100644 tests/podman/1/environ - create mode 100644 tests/podman/Makefile.am - create mode 100644 tests/podman/proc/cpuinfo - create mode 100644 tests/podman/proc/self/cgroup - create mode 100644 tests/podman/proc/self/status - create mode 100755 tests/podman/sbin/dmidecode - create mode 100755 tests/podman/sbin/uname - create mode 100755 tests/podman/sbin/virt-what-cpuid-helper - create mode 100755 tests/podman/test.sh - -diff --git a/configure.ac b/configure.ac -index 58b3d77..97d22bb 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -53,6 +53,7 @@ tests="\ - lxc \ - nutanix-ahv \ - parallels-desktop \ -+ podman \ - ppc64-baremetal \ - ppc64-kvm \ - ppc64-lpar-dedicated \ -@@ -96,6 +97,7 @@ AC_CONFIG_FILES([Makefile - tests/lxc/Makefile - tests/nutanix-ahv/Makefile - tests/parallels-desktop/Makefile -+ tests/podman/Makefile - tests/ppc64-baremetal/Makefile - tests/ppc64-kvm/Makefile - tests/ppc64-lpar-dedicated/Makefile -diff --git a/tests/podman/1/environ b/tests/podman/1/environ -new file mode 100644 -index 0000000000000000000000000000000000000000..dd6f0d4d67a151ab7bab97565b0737b8dbf7db44 -GIT binary patch -literal 155 -zcmYL>K?=hl5JhL*%XorW3^JI2CJ>u-F>Rni)ncUd_?@JS?B@UX=Ygfcpaw_1MfC|) -zr4V1LmeOGMJmGP5qhtJ+`+g?F^0V`SgdCeIPY%CrtqJUC&fa%yMZLtVmasj+>YHQl -YMd8IEi3Dr7m)t_kYsGhYq>$nA11>u+CjbBd - -literal 0 -HcmV?d00001 - -diff --git a/tests/podman/Makefile.am b/tests/podman/Makefile.am -new file mode 100644 -index 0000000..a4c70ad ---- /dev/null -+++ b/tests/podman/Makefile.am -@@ -0,0 +1,29 @@ -+# Makefile for virt-what -+# Copyright (C) 2008-2011 Red Hat Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+CLEANFILES = *~ -+ -+TESTS = test.sh -+ -+EXTRA_DIST = \ -+ test.sh \ -+ proc/cpuinfo \ -+ proc/self/cgroup \ -+ proc/self/status \ -+ sbin/dmidecode \ -+ sbin/uname \ -+ sbin/virt-what-cpuid-helper -diff --git a/tests/podman/proc/cpuinfo b/tests/podman/proc/cpuinfo -new file mode 100644 -index 0000000..e69de29 -diff --git a/tests/podman/proc/self/cgroup b/tests/podman/proc/self/cgroup -new file mode 100644 -index 0000000..11fc74e ---- /dev/null -+++ b/tests/podman/proc/self/cgroup -@@ -0,0 +1,10 @@ -+11:perf_event:/machine.slice/libpod-2ed85a65b4d6aedbf4e6bd1bb2d29e6d7778791bd02532788eb16954cebf01da.scope -+10:devices:/machine.slice/libpod-2ed85a65b4d6aedbf4e6bd1bb2d29e6d7778791bd02532788eb16954cebf01da.scope -+8:pids:/machine.slice/libpod-2ed85a65b4d6aedbf4e6bd1bb2d29e6d7778791bd02532788eb16954cebf01da.scope -+7:blkio:/machine.slice/libpod-2ed85a65b4d6aedbf4e6bd1bb2d29e6d7778791bd02532788eb16954cebf01da.scope -+6:cpu,cpuacct:/machine.slice/libpod-2ed85a65b4d6aedbf4e6bd1bb2d29e6d7778791bd02532788eb16954cebf01da.scope -+5:net_cls,net_prio:/machine.slice/libpod-2ed85a65b4d6aedbf4e6bd1bb2d29e6d7778791bd02532788eb16954cebf01da.scope -+4:freezer:/machine.slice/libpod-2ed85a65b4d6aedbf4e6bd1bb2d29e6d7778791bd02532788eb16954cebf01da.scope -+3:cpuset:/machine.slice/libpod-2ed85a65b4d6aedbf4e6bd1bb2d29e6d7778791bd02532788eb16954cebf01da.scope -+2:memory:/machine.slice/libpod-2ed85a65b4d6aedbf4e6bd1bb2d29e6d7778791bd02532788eb16954cebf01da.scope -+1:name=systemd:/machine.slice/libpod-2ed85a65b4d6aedbf4e6bd1bb2d29e6d7778791bd02532788eb16954cebf01da.scope -diff --git a/tests/podman/proc/self/status b/tests/podman/proc/self/status -new file mode 100644 -index 0000000..e69de29 -diff --git a/tests/podman/sbin/dmidecode b/tests/podman/sbin/dmidecode -new file mode 100755 -index 0000000..d9992ad ---- /dev/null -+++ b/tests/podman/sbin/dmidecode -@@ -0,0 +1,6 @@ -+#!/bin/sh - -+cat <<'EOF' -+# dmidecode 2.11 -+/dev/mem: Operation not permitted -+EOF -+exit 1 -diff --git a/tests/podman/sbin/uname b/tests/podman/sbin/uname -new file mode 100755 -index 0000000..ab0ec89 ---- /dev/null -+++ b/tests/podman/sbin/uname -@@ -0,0 +1,2 @@ -+#!/bin/sh - -+echo x86_64 -diff --git a/tests/podman/sbin/virt-what-cpuid-helper b/tests/podman/sbin/virt-what-cpuid-helper -new file mode 100755 -index 0000000..ad82504 ---- /dev/null -+++ b/tests/podman/sbin/virt-what-cpuid-helper -@@ -0,0 +1,2 @@ -+#!/bin/sh - -+echo @ -diff --git a/tests/podman/test.sh b/tests/podman/test.sh -new file mode 100755 -index 0000000..6db58e5 ---- /dev/null -+++ b/tests/podman/test.sh -@@ -0,0 +1,32 @@ -+# Test for Podman -+# Copyright (C) 2008-2011 Red Hat Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)" -+expected="podman" -+ -+if [ "$output" != "$expected" ]; then -+ echo "$0: test failed because output did not match expected" -+ echo "Expected output was:" -+ echo "----------------------------------------" -+ echo "$expected" -+ echo "----------------------------------------" -+ echo "But the actual output of the program was:" -+ echo "----------------------------------------" -+ echo "$output" -+ echo "----------------------------------------" -+ exit 1 -+fi -diff --git a/virt-what.in b/virt-what.in -index d43916b..d52171c 100644 ---- a/virt-what.in -+++ b/virt-what.in -@@ -165,7 +165,7 @@ fi - # Added by Marc Fournier - - if [ -e "${root}/proc/1/environ" ] && -- cat "${root}/proc/1/environ" | tr '\000' '\n' | grep -Eiq '^container='; then -+ cat "${root}/proc/1/environ" | tr '\000' '\n' | grep -Eiq '^container=lxc'; then - echo lxc - fi - -@@ -350,6 +350,14 @@ if [ -f "${root}/.dockerenv" ] || [ -f "${root}/.dockerinit" ] || \ - echo docker - fi - -+# Check for Podman. -+if [ -e "${root}/proc/1/environ" ] && -+ cat "${root}/proc/1/environ" | tr '\000' '\n' | grep -Eiq '^container=podman'; then -+ echo podman -+elif grep -qF /libpod- "${root}/proc/self/cgroup" 2>/dev/null; then -+ echo podman -+fi -+ - # Check ppc64 lpar, kvm or powerkvm - - # example /proc/cpuinfo line indicating 'not baremetal' -diff --git a/virt-what.pod b/virt-what.pod -index ea5cb77..405537b 100644 ---- a/virt-what.pod -+++ b/virt-what.pod -@@ -204,6 +204,12 @@ The guest is running inside Parallels Virtual Platform - - Status: contributed by Justin Clift - -+=item B -+ -+This is a Podman container. -+ -+Status: contributed by Jordan Webb -+ - =item B - - The guest is running inside IBM PowerVM Lx86 Linux/x86 emulator. --- -2.29.0.rc2 - diff --git a/0008-Simplify-and-fix-invocation-of-cpuid.patch b/0008-Simplify-and-fix-invocation-of-cpuid.patch deleted file mode 100644 index 5bccb57..0000000 --- a/0008-Simplify-and-fix-invocation-of-cpuid.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 60d903fbb7653bc9754228bdab4c6933fcda1e72 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Tue, 13 Apr 2021 09:35:07 +0100 -Subject: [PATCH 8/8] Simplify and fix invocation of cpuid. - -Fixes a crash on some platforms identified by Yongkui Guo in -https://bugzilla.redhat.com/show_bug.cgi?id=1756381#c15 ---- - virt-what-cpuid-helper.c | 24 ++++++++++++++++-------- - 1 file changed, 16 insertions(+), 8 deletions(-) - -diff --git a/virt-what-cpuid-helper.c b/virt-what-cpuid-helper.c -index 9c6cdb2..fdceb62 100644 ---- a/virt-what-cpuid-helper.c -+++ b/virt-what-cpuid-helper.c -@@ -47,17 +47,25 @@ known_signature (const char *sig) - 0; - } - -+/* Copied from the Linux kernel definition in -+ * arch/x86/include/asm/processor.h -+ */ -+static inline void -+cpuid (uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx) -+{ -+ asm volatile ("cpuid" -+ : "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx) -+ : "0" (*eax), "2" (*ecx) -+ : "memory"); -+} -+ - static uint32_t --cpuid (uint32_t eax, char *sig) -+cpuid_leaf (uint32_t eax, char *sig) - { - uint32_t *sig32 = (uint32_t *) sig; - -- asm volatile ( -- "xchgl %%ebx,%1; xor %%ebx,%%ebx; cpuid; xchgl %%ebx,%1" -- : "=a" (eax), "+r" (sig32[0]), "=c" (sig32[1]), "=d" (sig32[2]) -- : "0" (eax)); -- sig[12] = 0; -- -+ cpuid (&eax, &sig32[0], &sig32[1], &sig32[2]); -+ sig[12] = 0; /* \0-terminate the string to make string comparison possible */ - return eax; - } - -@@ -87,7 +95,7 @@ cpu_sig (void) - */ - for (leaf = base + 0xff00; leaf >= base; leaf -= 0x100) { - memset (sig, 0, sizeof sig); -- cpuid (leaf, sig); -+ cpuid_leaf (leaf, sig); - if (known_signature (sig)) { - puts (sig); - break; --- -2.29.0.rc2 - diff --git a/sources b/sources index 1e18e3b..6989970 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -SHA512 (virt-what-1.20.tar.gz) = edf74903122bfb422c7a5ecba711bb64d6ef668828f208dfc0571ef14f2643456c14bc9a77dfea209df3d93869ac0a2c9fd039779922eddc6ebd9d988585dea4 +SHA512 (virt-what-1.21.tar.gz) = 14ace184c4aee5a09b855c1f5acaa619057aed1b9bf03c91ed1003e6a39ea69162c9fe452ea8162c7fe29825e0e2202cfc7d76e82f0cecea3e32405e5eb9f717 +SHA512 (virt-what-1.21.tar.gz.sig) = f07368ab53ecf221e57f924f78e56d6fb56823522f62aea1ff107c1649f31964ad661e79c450487067de1f40436e5b5b7c3b5a1fd1cc7233c2d201ab5e594bf3 diff --git a/virt-what.spec b/virt-what.spec index 1e08841..200d301 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -1,22 +1,11 @@ Name: virt-what Version: 1.21 -Release: 0.1%{?dist} +Release: 1%{?dist} Summary: Detect if we are running in a virtual machine License: GPLv2+ URL: http://people.redhat.com/~rjones/virt-what/ -#Source0: http://people.redhat.com/~rjones/virt-what/files/%%{name}-%%{version}.tar.gz -Source0: http://people.redhat.com/~rjones/virt-what/files/%{name}-1.20.tar.gz - -# These are all the patches added since 1.20. -Patch0001: 0001-Fix-virt-what-cpuid-helper.patch -Patch0002: 0002-Add-support-for-Nutanix-Acropolis-Hypervisor-AHV-RHB.patch -Patch0003: 0003-helper-Fix-KVM-signature.patch -Patch0004: 0004-Fix-incorrect-detection-of-MS-Surfacebook-2-as-a-vir.patch -Patch0005: 0005-docker-Check-for-.dockerenv-too.patch -Patch0006: 0006-docker-Lookup-from-proc-self-cgroup-too.patch -Patch0007: 0007-Add-podman-support.patch -Patch0008: 0008-Simplify-and-fix-invocation-of-cpuid.patch +Source0: http://people.redhat.com/~rjones/virt-what/files/%%{name}-%%{version}.tar.gz BuildRequires: make BuildRequires: git @@ -92,8 +81,7 @@ Current types of virtualization detected: %prep -#%%autosetup -S git -%autosetup -S git -n %{name}-1.20 +%autosetup -S git # Always rebuild upstream autotools files. autoreconf -i @@ -122,6 +110,9 @@ fi %changelog +* Mon Apr 19 2021 Richard W.M. Jones - 1.21-1 +- New upstream version 1.21. + * Tue Apr 13 2021 Richard W.M. Jones - 1.21-0.1 - Add all patches since 1.20 in preparation for 1.21 release. From a696f8929e5a323668ac8e73c68ae5073c01ed87 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 2 Jun 2021 13:24:38 +0100 Subject: [PATCH 22/48] Add gating tests for RHEL 9 (RHBZ#1967057) --- gating.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 gating.yaml diff --git a/gating.yaml b/gating.yaml new file mode 100755 index 0000000..d8e2e96 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,10 @@ +--- !Policy +product_versions: + - rhel-9 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: xen-ci.brew-build.tier1.functional} + - !PassingTestCaseRule {test_case_name: 3rd-esxi-esxi65.brew-build.tier1.functional} + - !PassingTestCaseRule {test_case_name: 3rd-hyperv-2019-ci.brew-build.tier1.functional} + - !PassingTestCaseRule {test_case_name: s1-aws-ci_x86_64.brew-build.tier1.functional} + - !PassingTestCaseRule {test_case_name: s1-aws-ci_aarch64.brew-build.tier1.functional} From 0ea9cb6a593b561dbead8224d91ea789d4db75ce Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 2 Jun 2021 13:50:00 +0100 Subject: [PATCH 23/48] Unify RHEL 8, RHEL 9 gating tests --- gating.yaml | 2 ++ tests/basic-test.sh | 6 ++++++ tests/tests.yml | 11 +++++++++++ 3 files changed, 19 insertions(+) create mode 100755 tests/basic-test.sh create mode 100644 tests/tests.yml diff --git a/gating.yaml b/gating.yaml index d8e2e96..f34986d 100755 --- a/gating.yaml +++ b/gating.yaml @@ -1,8 +1,10 @@ --- !Policy product_versions: + - rhel-8 - rhel-9 decision_context: osci_compose_gate rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} - !PassingTestCaseRule {test_case_name: xen-ci.brew-build.tier1.functional} - !PassingTestCaseRule {test_case_name: 3rd-esxi-esxi65.brew-build.tier1.functional} - !PassingTestCaseRule {test_case_name: 3rd-hyperv-2019-ci.brew-build.tier1.functional} diff --git a/tests/basic-test.sh b/tests/basic-test.sh new file mode 100755 index 0000000..e1dc226 --- /dev/null +++ b/tests/basic-test.sh @@ -0,0 +1,6 @@ +#!/bin/bash - +set -e +set -x + +# This test requires root to run. +virt-what diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..46cdaf4 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,11 @@ +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + required_packages: + - virt-what + tests: + - simple: + dir: . + run: ./basic-test.sh From 42b3d9df6b2095532018f7edaeca2d4c70cec170 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 20:34:00 +0000 Subject: [PATCH 24/48] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- virt-what.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-what.spec b/virt-what.spec index 200d301..16c55f2 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -1,6 +1,6 @@ Name: virt-what Version: 1.21 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Detect if we are running in a virtual machine License: GPLv2+ @@ -110,6 +110,9 @@ fi %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 1.21-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Mon Apr 19 2021 Richard W.M. Jones - 1.21-1 - New upstream version 1.21. From 3cfac2aa078da5d3c5a7f57bbada9455d3975b30 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jan 2022 04:04:46 +0000 Subject: [PATCH 25/48] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- virt-what.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-what.spec b/virt-what.spec index 16c55f2..66a35e0 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -1,6 +1,6 @@ Name: virt-what Version: 1.21 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Detect if we are running in a virtual machine License: GPLv2+ @@ -110,6 +110,9 @@ fi %changelog +* Sat Jan 22 2022 Fedora Release Engineering - 1.21-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Fri Jul 23 2021 Fedora Release Engineering - 1.21-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From e4d34f07af2b98bb088821c6f9e685a0199f758b Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 14 Apr 2022 14:13:26 +0100 Subject: [PATCH 26/48] New upstream version 1.22. --- .gitignore | 2 +- sources | 4 ++-- virt-what.spec | 7 +++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 6fc170f..58a512e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ /virt-what-*.tar.gz -/virt-what-1.21.tar.gz.sig +/virt-what-*.tar.gz.sig diff --git a/sources b/sources index 6989970..fdef991 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-what-1.21.tar.gz) = 14ace184c4aee5a09b855c1f5acaa619057aed1b9bf03c91ed1003e6a39ea69162c9fe452ea8162c7fe29825e0e2202cfc7d76e82f0cecea3e32405e5eb9f717 -SHA512 (virt-what-1.21.tar.gz.sig) = f07368ab53ecf221e57f924f78e56d6fb56823522f62aea1ff107c1649f31964ad661e79c450487067de1f40436e5b5b7c3b5a1fd1cc7233c2d201ab5e594bf3 +SHA512 (virt-what-1.22.tar.gz) = d430281edd9aaaa29f5475ab0a750ce0b2a3641fe5798769e38169e1c7879b2ee455f6c6c015cd069523045144ebcc3c4f58d205c4366b07721469a0aaa964d6 +SHA512 (virt-what-1.22.tar.gz.sig) = 36f6634b599dade9fcf7fa6b45196a8738a5f209ce30dcc67427bad52c2c539ad8918adeb78793fb4fb1413d155fc62a04f60e8f2c36c00fe9ae4286bdd461f7 diff --git a/virt-what.spec b/virt-what.spec index 66a35e0..fc205e7 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -1,6 +1,6 @@ Name: virt-what -Version: 1.21 -Release: 3%{?dist} +Version: 1.22 +Release: 1%{?dist} Summary: Detect if we are running in a virtual machine License: GPLv2+ @@ -110,6 +110,9 @@ fi %changelog +* Thu Apr 14 2022 Richard W.M. Jones - 1.22-1 +- New upstream version 1.22. + * Sat Jan 22 2022 Fedora Release Engineering - 1.21-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From fe4afca5a850c810bcb4924d616646039f90d011 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 14 Apr 2022 14:40:02 +0100 Subject: [PATCH 27/48] Fix Source0 line. --- virt-what.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/virt-what.spec b/virt-what.spec index fc205e7..0e762b5 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -1,11 +1,11 @@ Name: virt-what Version: 1.22 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Detect if we are running in a virtual machine License: GPLv2+ URL: http://people.redhat.com/~rjones/virt-what/ -Source0: http://people.redhat.com/~rjones/virt-what/files/%%{name}-%%{version}.tar.gz +Source0: http://people.redhat.com/~rjones/virt-what/files/%{name}-%{version}.tar.gz BuildRequires: make BuildRequires: git @@ -110,8 +110,9 @@ fi %changelog -* Thu Apr 14 2022 Richard W.M. Jones - 1.22-1 +* Thu Apr 14 2022 Richard W.M. Jones - 1.22-2 - New upstream version 1.22. +- Fix Source0 line. * Sat Jan 22 2022 Fedora Release Engineering - 1.21-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 707414b213a0a761881cfbe34001f5943a496473 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 23 Jun 2022 13:47:34 +0100 Subject: [PATCH 28/48] New upstream version 1.23 --- sources | 4 +-- virt-what.spec | 76 +++++++++++++++++++++++++++----------------------- 2 files changed, 43 insertions(+), 37 deletions(-) diff --git a/sources b/sources index fdef991..9d53eec 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-what-1.22.tar.gz) = d430281edd9aaaa29f5475ab0a750ce0b2a3641fe5798769e38169e1c7879b2ee455f6c6c015cd069523045144ebcc3c4f58d205c4366b07721469a0aaa964d6 -SHA512 (virt-what-1.22.tar.gz.sig) = 36f6634b599dade9fcf7fa6b45196a8738a5f209ce30dcc67427bad52c2c539ad8918adeb78793fb4fb1413d155fc62a04f60e8f2c36c00fe9ae4286bdd461f7 +SHA512 (virt-what-1.23.tar.gz) = 480f32618923dbbadc82e9d066cbd3ec2ab170d8d5a16d449a3bdedcd4f0edd23b78718d0feabc9d489c63bc8cfc35d9b267aa2087550e6acf696d90570c99f6 +SHA512 (virt-what-1.23.tar.gz.sig) = 16d722e3041abaa790283f78d7ebad4925a5932c63ef74cb472cd546bf65af127e125403a02b4f94e4fb17bc90a4c4945dc2ebfffe01375d069abc9a9c738d2f diff --git a/virt-what.spec b/virt-what.spec index 0e762b5..1c985fe 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -1,6 +1,6 @@ Name: virt-what -Version: 1.22 -Release: 2%{?dist} +Version: 1.23 +Release: 1%{?dist} Summary: Detect if we are running in a virtual machine License: GPLv2+ @@ -44,40 +44,42 @@ know about or can't detect. Current types of virtualization detected: - - aws Amazon Web Services - - bhyve FreeBSD hypervisor - - docker Docker container - - hyperv Microsoft Hyper-V - - ibm_power-kvm - IBM POWER KVM - - ibm_power-lpar_shared + - alibaba_cloud Alibaba cloud + - alibaba_cloud-ebm + - aws Amazon Web Services + - bhyve FreeBSD hypervisor + - docker Docker container + - google_cloud Google cloud + - hyperv Microsoft Hyper-V + - ibm_power-kvm IBM POWER KVM + - ibm_power-lpar_shared IBM POWER LPAR (hardware partition) - ibm_power-lpar_dedicated - IBM POWER LPAR (hardware partition) - - ibm_systemz-* - IBM SystemZ Direct / LPAR / z/VM / KVM - - ldoms Oracle VM Server for SPARC Logical Domains - - linux_vserver - Linux VServer container - - lxc Linux LXC container - - kvm Linux Kernel Virtual Machine (KVM) - - lkvm LKVM / kvmtool - - nutanix_ahv Nutanix Acropolis Hypervisor (AHV) - - openvz OpenVZ or Virtuozzo - - ovirt oVirt node - - parallels Parallels Virtual Platform - - powervm_lx86 IBM PowerVM Lx86 Linux/x86 emulator - - qemu QEMU (unaccelerated) - - rhev Red Hat Enterprise Virtualization - - uml User-Mode Linux (UML) - - virtage Hitachi Virtualization Manager (HVM) Virtage LPAR - - virtualbox VirtualBox - - virtualpc Microsoft VirtualPC - - vmm vmm OpenBSD hypervisor - - vmware VMware - - xen Xen - - xen-dom0 Xen dom0 (privileged domain) - - xen-domU Xen domU (paravirtualized guest domain) - - xen-hvm Xen guest fully virtualized (HVM) + - ibm_systemz-* IBM SystemZ Direct / LPAR / z/VM / KVM + - illumos-lx Illumos with Linux syscall emulation + - ldoms Oracle VM Server for SPARC Logical Domains + - linux_vserver Linux VServer container + - lxc Linux LXC container + - kvm Linux Kernel Virtual Machine (KVM) + - lkvm LKVM / kvmtool + - nutanix_ahv Nutanix Acropolis Hypervisor (AHV) + - openvz OpenVZ or Virtuozzo + - ovirt oVirt node + - parallels Parallels Virtual Platform + - podman Podman container + - powervm_lx86 IBM PowerVM Lx86 Linux/x86 emulator + - qemu QEMU (unaccelerated) + - redhat Red Hat hypervisor + - rhev Red Hat Enterprise Virtualization + - uml User-Mode Linux (UML) + - virtage Hitachi Virtualization Manager (HVM) Virtage LPAR + - virtualbox VirtualBox + - virtualpc Microsoft VirtualPC + - vmm vmm OpenBSD hypervisor + - vmware VMware + - xen Xen + - xen-dom0 Xen dom0 (privileged domain) + - xen-domU Xen domU (paravirtualized guest domain) + - xen-hvm Xen guest fully virtualized (HVM) %prep @@ -110,6 +112,10 @@ fi %changelog +* Thu Jun 23 2022 Richard W.M. Jones - 1.23-1 +- New upstream version 1.23 +- Update list of supported hypervisors + * Thu Apr 14 2022 Richard W.M. Jones - 1.22-2 - New upstream version 1.22. - Fix Source0 line. From ae3471150bec912f509fe8aedc3f423d1d72574e Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 23 Jun 2022 14:24:26 +0100 Subject: [PATCH 29/48] Fix %check for failures Run all the tests, even if some fail, and print all of the test-suite.log files. --- virt-what.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/virt-what.spec b/virt-what.spec index 1c985fe..25c9c4c 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -99,8 +99,8 @@ make %check -if ! make check ; then - cat test-suite.log +if ! make -k check ; then + find -name test-suite.log -exec cat {} \; exit 1 fi From 8b9584de780e2fb1131d4e4586e36e37af042b56 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 23 Jun 2022 14:48:38 +0100 Subject: [PATCH 30/48] New upstream version 1.24 --- sources | 4 ++-- virt-what.spec | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/sources b/sources index 9d53eec..305e6d5 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-what-1.23.tar.gz) = 480f32618923dbbadc82e9d066cbd3ec2ab170d8d5a16d449a3bdedcd4f0edd23b78718d0feabc9d489c63bc8cfc35d9b267aa2087550e6acf696d90570c99f6 -SHA512 (virt-what-1.23.tar.gz.sig) = 16d722e3041abaa790283f78d7ebad4925a5932c63ef74cb472cd546bf65af127e125403a02b4f94e4fb17bc90a4c4945dc2ebfffe01375d069abc9a9c738d2f +SHA512 (virt-what-1.24.tar.gz) = f6d14ea402f737ce45e67637076a5c11d3fcdbc64a738851fd0ffabec374074c7a9cf857719e0c8cad87b41fc4e78b825ebedafa6fa14e414a4068fca4f5d99c +SHA512 (virt-what-1.24.tar.gz.sig) = e2fb9d9f2f074971d579e8edac17c14b216a9780920c4dd38620ddba04c3126786c12be8c22ee1d6281dbe8917f616d0e64770ad8b15412ffacd20c339b51edc diff --git a/virt-what.spec b/virt-what.spec index 25c9c4c..d4614bf 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -1,5 +1,5 @@ Name: virt-what -Version: 1.23 +Version: 1.24 Release: 1%{?dist} Summary: Detect if we are running in a virtual machine License: GPLv2+ @@ -112,9 +112,10 @@ fi %changelog -* Thu Jun 23 2022 Richard W.M. Jones - 1.23-1 -- New upstream version 1.23 +* Thu Jun 23 2022 Richard W.M. Jones - 1.24-1 +- New upstream version 1.24 - Update list of supported hypervisors +- Fix %%check for failures * Thu Apr 14 2022 Richard W.M. Jones - 1.22-2 - New upstream version 1.22. From 3924440eebdc4380c5308be86f382ba2887eca09 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 23 Jul 2022 12:00:03 +0000 Subject: [PATCH 31/48] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- virt-what.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-what.spec b/virt-what.spec index d4614bf..a3bc1b1 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -1,6 +1,6 @@ Name: virt-what Version: 1.24 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Detect if we are running in a virtual machine License: GPLv2+ @@ -112,6 +112,9 @@ fi %changelog +* Sat Jul 23 2022 Fedora Release Engineering - 1.24-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Thu Jun 23 2022 Richard W.M. Jones - 1.24-1 - New upstream version 1.24 - Update list of supported hypervisors From fb70377d73a1c74b8d3e2bbf7c376267ef079097 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 9 Aug 2022 09:50:56 +0100 Subject: [PATCH 32/48] Add copy-patches maintainer script from RHEL 9.1 --- copy-patches.sh | 61 +++++++++++++++++++++++++++++++++++++++++++++++++ virt-what.spec | 3 +++ 2 files changed, 64 insertions(+) create mode 100755 copy-patches.sh diff --git a/copy-patches.sh b/copy-patches.sh new file mode 100755 index 0000000..af8f647 --- /dev/null +++ b/copy-patches.sh @@ -0,0 +1,61 @@ +#!/bin/bash - + +set -e + +# Maintainer script to copy patches from the git repo to the current +# directory. It's normally only used downstream (ie. in RHEL). Use +# it like this: +# ./copy-patches.sh + +project=virt-what +rhel_version=9.1 + +# Check we're in the right directory. +if [ ! -f $project.spec ]; then + echo "$0: run this from the directory containing '$project.spec'" + exit 1 +fi + +case `id -un` in + rjones) git_checkout=$HOME/d/$project-rhel-$rhel_version ;; + lacos) git_checkout=$HOME/src/v2v/$project ;; + *) git_checkout=$HOME/d/$project-rhel-$rhel_version ;; +esac +if [ ! -d $git_checkout ]; then + echo "$0: $git_checkout does not exist" + echo "This script is only for use by the maintainer when preparing a" + echo "$project release on RHEL." + exit 1 +fi + +# Get the base version of the project. +version=`grep '^Version:' $project.spec | awk '{print $2}'` +tag="v$version" + +# Remove any existing patches. +git rm -f [0-9]*.patch ||: +rm -f [0-9]*.patch + +# Get the patches. +(cd $git_checkout; rm -f [0-9]*.patch; git -c core.abbrev=9 format-patch -O/dev/null -N --submodule=diff $tag) +mv $git_checkout/[0-9]*.patch . + +# Remove any not to be applied. +rm -f *NOT-FOR-RPM*.patch + +# Add the patches. +git add [0-9]*.patch + +# Print out the patch lines. +echo +echo "--- Copy the following text into $project.spec file" +echo + +echo "# Patches." +for f in [0-9]*.patch; do + n=`echo $f | awk -F- '{print $1}'` + echo "Patch$n: $f" +done + +echo +echo "--- End of text" diff --git a/virt-what.spec b/virt-what.spec index a3bc1b1..d637037 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -7,6 +7,9 @@ License: GPLv2+ URL: http://people.redhat.com/~rjones/virt-what/ Source0: http://people.redhat.com/~rjones/virt-what/files/%{name}-%{version}.tar.gz +# Maintainer script which helps with handling patches. +Source1: copy-patches.sh + BuildRequires: make BuildRequires: git BuildRequires: autoconf, automake, libtool From 94b4a3e8fd79088a502e01484804d662c64c2ab0 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 17 Aug 2022 11:13:22 +0100 Subject: [PATCH 33/48] New upstream version 1.25 --- sources | 4 ++-- virt-what.spec | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index 305e6d5..23f1645 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-what-1.24.tar.gz) = f6d14ea402f737ce45e67637076a5c11d3fcdbc64a738851fd0ffabec374074c7a9cf857719e0c8cad87b41fc4e78b825ebedafa6fa14e414a4068fca4f5d99c -SHA512 (virt-what-1.24.tar.gz.sig) = e2fb9d9f2f074971d579e8edac17c14b216a9780920c4dd38620ddba04c3126786c12be8c22ee1d6281dbe8917f616d0e64770ad8b15412ffacd20c339b51edc +SHA512 (virt-what-1.25.tar.gz) = 0147b4b44ae0ee685977aa34dfa9bf30ae8e0eb31b7a6d5c0097d16f830fa6fb6afd7156964fc79f3fd5e82b2f68d921fd5306245cc63a2140f6dddc7fdd0e98 +SHA512 (virt-what-1.25.tar.gz.sig) = fee5eee4c9b888c6d89512b01cb3a482f8c788d4618c4b2c6e8e709e4d57aa76647463bb06912da2398fd1fd59cb28c38592b7a7de673f4aa27a77d1b2b969c3 diff --git a/virt-what.spec b/virt-what.spec index d637037..c2dd9c2 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -1,6 +1,6 @@ Name: virt-what -Version: 1.24 -Release: 2%{?dist} +Version: 1.25 +Release: 1%{?dist} Summary: Detect if we are running in a virtual machine License: GPLv2+ @@ -115,6 +115,9 @@ fi %changelog +* Wed Aug 17 2022 Richard W.M. Jones - 1.25-1 +- New upstream version 1.25 + * Sat Jul 23 2022 Fedora Release Engineering - 1.24-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 70331a9c4ae23f5e7a627c1e43eae7295ef77371 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 21 Jan 2023 06:23:54 +0000 Subject: [PATCH 34/48] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- virt-what.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-what.spec b/virt-what.spec index c2dd9c2..9bfce8d 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -1,6 +1,6 @@ Name: virt-what Version: 1.25 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Detect if we are running in a virtual machine License: GPLv2+ @@ -115,6 +115,9 @@ fi %changelog +* Sat Jan 21 2023 Fedora Release Engineering - 1.25-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Wed Aug 17 2022 Richard W.M. Jones - 1.25-1 - New upstream version 1.25 From 1e17d8ba8a4c142af107c24f4c696aa304a96d74 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 5 Jun 2023 16:05:14 +0100 Subject: [PATCH 35/48] Clean up BuildRequires and align --- virt-what.spec | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/virt-what.spec b/virt-what.spec index 9bfce8d..9c1cdbd 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -8,15 +8,12 @@ URL: http://people.redhat.com/~rjones/virt-what/ Source0: http://people.redhat.com/~rjones/virt-what/files/%{name}-%{version}.tar.gz # Maintainer script which helps with handling patches. -Source1: copy-patches.sh +Source1: copy-patches.sh +BuildRequires: gcc BuildRequires: make BuildRequires: git BuildRequires: autoconf, automake, libtool - -# This is provided by the build root, but we make it explicit -# anyway in case this was dropped from the build root in future. -BuildRequires: gcc BuildRequires: /usr/bin/pod2man # Required at build time in order to do 'make check' (for getopt). From a893346330249e20f12185706ecaadc736cbb293 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 5 Jun 2023 16:05:51 +0100 Subject: [PATCH 36/48] Migrated to SPDX license --- virt-what.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/virt-what.spec b/virt-what.spec index 9c1cdbd..884a0b8 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -1,8 +1,8 @@ Name: virt-what Version: 1.25 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Detect if we are running in a virtual machine -License: GPLv2+ +License: GPL-2.0-or-later URL: http://people.redhat.com/~rjones/virt-what/ Source0: http://people.redhat.com/~rjones/virt-what/files/%{name}-%{version}.tar.gz @@ -112,6 +112,9 @@ fi %changelog +* Mon Jun 05 2023 Richard W.M. Jones - 1.25-3 +- Migrated to SPDX license + * Sat Jan 21 2023 Fedora Release Engineering - 1.25-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From c14b05f6ff5b1dc49e6593c188fd9f3b681b9c6a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jul 2023 17:45:19 +0000 Subject: [PATCH 37/48] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- virt-what.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-what.spec b/virt-what.spec index 884a0b8..bdd2f52 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -1,6 +1,6 @@ Name: virt-what Version: 1.25 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Detect if we are running in a virtual machine License: GPL-2.0-or-later @@ -112,6 +112,9 @@ fi %changelog +* Sat Jul 22 2023 Fedora Release Engineering - 1.25-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Mon Jun 05 2023 Richard W.M. Jones - 1.25-3 - Migrated to SPDX license From c720a2a07a91a512f8d7efa372c7d8d33be713c2 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 27 Jan 2024 07:58:37 +0000 Subject: [PATCH 38/48] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- virt-what.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-what.spec b/virt-what.spec index bdd2f52..5c7a55f 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -1,6 +1,6 @@ Name: virt-what Version: 1.25 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Detect if we are running in a virtual machine License: GPL-2.0-or-later @@ -112,6 +112,9 @@ fi %changelog +* Sat Jan 27 2024 Fedora Release Engineering - 1.25-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sat Jul 22 2023 Fedora Release Engineering - 1.25-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 2fc97a7f26e924c531804c94ed3a5407151fa0ee Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 2 Jul 2024 11:12:58 +0100 Subject: [PATCH 39/48] New upstream version 1.26 Add new binary virt-what-cvm (for confidential VMs). --- sources | 4 ++-- virt-what.spec | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/sources b/sources index 23f1645..aacb2cf 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-what-1.25.tar.gz) = 0147b4b44ae0ee685977aa34dfa9bf30ae8e0eb31b7a6d5c0097d16f830fa6fb6afd7156964fc79f3fd5e82b2f68d921fd5306245cc63a2140f6dddc7fdd0e98 -SHA512 (virt-what-1.25.tar.gz.sig) = fee5eee4c9b888c6d89512b01cb3a482f8c788d4618c4b2c6e8e709e4d57aa76647463bb06912da2398fd1fd59cb28c38592b7a7de673f4aa27a77d1b2b969c3 +SHA512 (virt-what-1.26.tar.gz) = 1939e0f9c2ab9a17feb9f737e0823eb2f2950838e0724fb87119823213c1defc9c7229ed703e977540d6bfe0d681230e4131b4fcfe4db4864b784cba69254ee0 +SHA512 (virt-what-1.26.tar.gz.sig) = 25d691a7a4d90aa3347c44ba835db5deaf13e891675a26ed44114bdc62dbe161663db2924622d1633f9821623ddb9e14288183d1b17677510c7210e9b4e3b3b7 diff --git a/virt-what.spec b/virt-what.spec index 5c7a55f..efb0a09 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -1,6 +1,6 @@ Name: virt-what -Version: 1.25 -Release: 5%{?dist} +Version: 1.26 +Release: 1%{?dist} Summary: Detect if we are running in a virtual machine License: GPL-2.0-or-later @@ -107,11 +107,16 @@ fi %files %doc README COPYING %{_sbindir}/virt-what +%{_sbindir}/virt-what-cvm %{_libexecdir}/virt-what-cpuid-helper %{_mandir}/man1/*.1* %changelog +* Tue Jul 02 2024 Richard W.M. Jones - 1.26-1 +- New upstream version 1.26 +- Add new binary virt-what-cvm (for confidential VMs). + * Sat Jan 27 2024 Fedora Release Engineering - 1.25-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From bae22f7bad3adeee8125ad8a187fd90d47d2a26d Mon Sep 17 00:00:00 2001 From: boyang Date: Wed, 10 Jul 2024 14:33:31 +0800 Subject: [PATCH 40/48] Update product_versions in gating.yaml. --- gating.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gating.yaml b/gating.yaml index f34986d..f7046e8 100755 --- a/gating.yaml +++ b/gating.yaml @@ -1,12 +1,12 @@ --- !Policy product_versions: - - rhel-8 - - rhel-9 + - rhel-* decision_context: osci_compose_gate rules: - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} - !PassingTestCaseRule {test_case_name: xen-ci.brew-build.tier1.functional} - - !PassingTestCaseRule {test_case_name: 3rd-esxi-esxi65.brew-build.tier1.functional} + - !PassingTestCaseRule {test_case_name: 3rd-esxi-x86_64.brew-build.tier1.functional} + - !PassingTestCaseRule {test_case_name: 3rd-esxi-aarch64.brew-build.tier1.functional} - !PassingTestCaseRule {test_case_name: 3rd-hyperv-2019-ci.brew-build.tier1.functional} - !PassingTestCaseRule {test_case_name: s1-aws-ci_x86_64.brew-build.tier1.functional} - !PassingTestCaseRule {test_case_name: s1-aws-ci_aarch64.brew-build.tier1.functional} From 15bde580962e68d504abb8d102b1a6b1260ca57b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jul 2024 08:53:28 +0000 Subject: [PATCH 41/48] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- virt-what.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-what.spec b/virt-what.spec index efb0a09..0508e86 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -1,6 +1,6 @@ Name: virt-what Version: 1.26 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Detect if we are running in a virtual machine License: GPL-2.0-or-later @@ -113,6 +113,9 @@ fi %changelog +* Sat Jul 20 2024 Fedora Release Engineering - 1.26-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Tue Jul 02 2024 Richard W.M. Jones - 1.26-1 - New upstream version 1.26 - Add new binary virt-what-cvm (for confidential VMs). From a52ce05b966b18e35e155c3134901b45ade2c033 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 31 Aug 2024 10:42:20 +0100 Subject: [PATCH 42/48] New upstream version 1.27 --- sources | 4 ++-- virt-what.spec | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index aacb2cf..4ae525a 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-what-1.26.tar.gz) = 1939e0f9c2ab9a17feb9f737e0823eb2f2950838e0724fb87119823213c1defc9c7229ed703e977540d6bfe0d681230e4131b4fcfe4db4864b784cba69254ee0 -SHA512 (virt-what-1.26.tar.gz.sig) = 25d691a7a4d90aa3347c44ba835db5deaf13e891675a26ed44114bdc62dbe161663db2924622d1633f9821623ddb9e14288183d1b17677510c7210e9b4e3b3b7 +SHA512 (virt-what-1.27.tar.gz) = 8d10111e38a87504daccf36e9386863aa92308c96be65164412d92c56c12d42f38e6e251fabe7945ce74e1419fc82c0ac3cdbd0f25b19cd72feda2e199307d6f +SHA512 (virt-what-1.27.tar.gz.sig) = d3b189ba579388082f489219f1051841b888188f865d4718a49da0d85fde64c5d6ca5fa44dd33ef782f2d615444a6d942241a6de5722360f724344320acf1370 diff --git a/virt-what.spec b/virt-what.spec index 0508e86..85be39f 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -1,6 +1,6 @@ Name: virt-what -Version: 1.26 -Release: 2%{?dist} +Version: 1.27 +Release: 1%{?dist} Summary: Detect if we are running in a virtual machine License: GPL-2.0-or-later @@ -113,6 +113,9 @@ fi %changelog +* Sat Aug 31 2024 Richard W.M. Jones - 1.27-1 +- New upstream version 1.27 + * Sat Jul 20 2024 Fedora Release Engineering - 1.26-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From e4855aa09c83b4b3c2d7b1afa8f24423a641897f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 2 Sep 2024 16:30:35 +0100 Subject: [PATCH 43/48] Verify tarball signature --- libguestfs.keyring | Bin 0 -> 2823 bytes virt-what.spec | 10 +++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 libguestfs.keyring diff --git a/libguestfs.keyring b/libguestfs.keyring new file mode 100644 index 0000000000000000000000000000000000000000..bb3eb5537b7c398a10b7e2b26ca00af011d1a73e GIT binary patch literal 2823 zcma*o_cI%g0s!zNh@cv+7)4sDC~4KE_7;1u)D}doT2(9drl?iaDypbGOYOv{*;+Ne z_NqOjH0s^=-MxG7-Mt^)|M0o{WP+$kwNm-IfHZ)i6Laf8iDHZe#RnxvK!O)6rq(SO z@nx&>aN10t6koV0fbtX7ACWsLI0FyJ@Pfu|=B(A~m#PuweNW!6ZNw+iE3ku-=2jTl z-R1Kp&IJO$u+0}F)tr1faEy{Y7^AhU)R~C@f;L|U(;bZA7XFYV$_df=Lk(rcmOkB; z)S!`^x0lVz=h?HQMv1soy+K~IC@;3ib@n&WJo)^vM=e&012y5w5lC{1Vr$%-f)DP% zG8>+0I6T|x0-c17DN0oD5G)GJ#Tv0QA`_&1YxON$_gR+nsxWeR@+*U|;ZLu`<~ZZL zb}lAl0+}{y9KH#`dC0F=fKw4mK4tiq#hTXnNO|A2&LnCbl}J*`J=P6P2w)t%_#~Ni z<5CX?FlaaK45s4fc+`zxL=1ZQlr;uF8MB%kfJe&QF}FTU2GrLW zqJoL`^QF5~7La|K*qp<&i|iiuwuG5-c+Y`9hLqVU0-*=rT}zW^h4{n!24-?!w5B5L zJDHd~YR;~9RmRo6SXRVZTVuupiWE+tcT#U?Vt3D|Yd`JQml+mOs0ksk06veG>Pp2z z#$gwujCGqx!3oGYFjf5`VZ%40WH@#DMU8px4r`anayTMxVa8S98{78$W{Y!;Tf&rt zSzNbt%vP(LA0kH72+RFIT%0S@6L1R%0M>KpIoe{ZJ&?|OTt7orQ0hH2yK~J}8JshZ@W!LI z-M4NO3G6uuXK5#0R%+aih%MZ^WFL9}_K$Qbehiq7*6e-`(+o69#+mu^SL`>(PjE?$ z9v&ppPtvAeurx2;DNmz|ZRT#yC%{HfUf3#G4T^=Mjr9Px1o2T4nR zZ1pdjh{60h=v?i`kcvw;`D)ye0%1PQ9?@pTf4x9Uy*qWbcDF?m^#|U=sZiOQBTv2Y z(~KQ*e#|T6$(d4Ts2j0br{Rses!aL;(crmXCLY4B&~}|^F%LvR>xZ{aykw4w)kp)G z4Osxb<}R=Iv!|oBc|z)k#uVLs?9`AhKe_lhLRpA)6F3r*Zqo3lPHe9ol81_qi|G6E z4o8p3JOnWhHo?+waZ$Tpb-(8=hsu=04#-d2e^N!szo*8Pi~oqA#cCE_@*SO{6sje$ z@TI6RMbo~Lb#1F(g%6Q&6{ zGhr{7C@+l6doz=%hN^mxA)?LclnP^x9TpX)wspTkY{ZP}b>$Zd6`^l+ApCE`-U~Y0 z8dQ_!`=HxQOf%|&`*eUUp8m%S1qlC9x|sX|LVV>m!3iJpL3q~u?Yr_&_bqw@GMgtb zN3h@AXg%lu6!!dYX|f)6XpFTNudSQQe-nF3_5TuMQ>Fowak8uAJT7I5#M21UX135g zGs~4Rv<`522?`g~<~erUc;O#Fw;!L^bk+?M%vhK)dA(f}R;1HN;I3iF(sri&RGg#@ zmLH6Hvl@qcHG3@}a7PDlc*>8}W{`e__2>^mdZUqS>0?4cjI;Dtk!{ zw(y-Wq;TG}(Orqzk!Z%c%|qPg+y}T~ejB&}4bg}GSaRBuhJ5&ZtU(q$-2TO%x?bKn zU1C)(Zk#(Ue^|~mKr$>J`z}2l$uKQrztdude9E`_5nY=j(7beJO!_Lu=p~Umx*Bbe zaaXv_>XI}z5OKTqMuad$__xSPg7-(2T1z6Buf*FzTSBfhvZQ;&s%lAiRiC1qU!;#{ z?a-99*ww>gj$}coPZCZ=kn2x>W_Sm-wW8Tnxif_54<1wj?Yww`ghQ!<%2;(ex~CZS zA?P=)tdq7Dkzqb|PG;C0ai!-2Q}RaDC$I}%efl;L=XIxts=E7olcp#We%A3nmv>An zB(K#6d`=!EO{bI5n@^pN{57JI|8!|wis(l^Y83K&k&{mbs*Sg0F_LnBTp6U0nhVFs zKNtCW5Kw~{od{S8=fq-k&tLtin0=hH{bySx^qNerUuEu@8K=ce1hl}X`QND>DbTX&E$#Fqr>x8dD+%_ia%sA& z-@-E*k_;lOcEc%6!hgZXyKo9HW@$loJcll?W#7v3av>4)xk)$5uW9Xl12{vPP#z`m zs2LrYwcDJ&HuK}b>kIRTnf*>e6iy|jj4e6UTDs}z{H{%;>o`28AchP`#1vkm9%H*S zoU>DWN;;Bf(C({v%Oa!+`GzIYlq}nbB@yDgTO{;r`S7a>(eUJc9dp#8x&m$~?E>Xu zQZmBuyhnH{K?-A&Xb*XP+gLf1SLt4Z^c%7G#xO1hI(zGmafx@1gQYru<*%)iZ_dBb z|Bb1aek=H z10)q1$4)>Do*ODQWg)QV#uOR!W%mWq@$ijmO%<)Dw`_}VtiAD7H5t~=RB~bQs5ra` z{QU>pG`sAB!wj<-$;hilBy>4_~OJ z%0_>c24yng-j6e{8;$K_c_|KG(_0Vgl=ucn~i1=x; zm1?xq_{fi_!ESgT8TSC6zV8=KU~}{8(Uba&{@Aa*HUiPNuMfwx8iMynCX$p_SHS1q z?H$wO+UHHDDFVH{JO$}0dbDQ~KlwK(d(_iUCGf`Lc9V*IhQhxeD>9vpy|`)~+um=D zg<8_$!w*H}5~0!TlT&@NLjHT=7oM!nTRWd6X`@!!wmnL&U!>jUUx&4}yFY={wB8Nh zA0w#m_%Uc5ra3z_s6d+}gYQb!bB$suWZS)^%eRI~!J$G4-{nibYcoyw$8F-)9GhwL zf^`wukA9opp_kHg$rT81yy?ZwxKcCuY&Q-Tgt#e|=%fp}c+1aw|3(R~opy=CE+z?b z(>ZkYs>9)myz%Pn7-DP|f|$$RG@K;3*Nl@9ueJ1h%e-Y|PoG^3Zj$gJ#i&h}JG=F9 zm>>;qK4MTXwg%V0Aa!hzB$@>;3Lj>+*kFFI<>e{edDH)+`)Mn$^g1(hKL{1kC+A_C zjW|_`i^xn9b9DCEvrOrD6cpeXE)tMl%g%g8133|+O&aU#Vo9Kcq Date: Mon, 9 Sep 2024 10:50:56 +0100 Subject: [PATCH 44/48] Update copy-patches.sh to match RHEL 10 --- copy-patches.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/copy-patches.sh b/copy-patches.sh index af8f647..a06bf23 100755 --- a/copy-patches.sh +++ b/copy-patches.sh @@ -8,7 +8,7 @@ set -e # ./copy-patches.sh project=virt-what -rhel_version=9.1 +rhel_version=10.0 # Check we're in the right directory. if [ ! -f $project.spec ]; then From 4fd3a6e1e8d2173cfbc93cd0a5463e9bfc05f077 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 19 Jan 2025 14:28:45 +0000 Subject: [PATCH 45/48] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- virt-what.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-what.spec b/virt-what.spec index b8165d3..df00c34 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -1,6 +1,6 @@ Name: virt-what Version: 1.27 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Detect if we are running in a virtual machine License: GPL-2.0-or-later @@ -121,6 +121,9 @@ fi %changelog +* Sun Jan 19 2025 Fedora Release Engineering - 1.27-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Sat Aug 31 2024 Richard W.M. Jones - 1.27-1 - New upstream version 1.27 From 2e9f03d1d18a2e5153cc792d559ed40f280d682e Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 6 May 2025 11:30:29 +0100 Subject: [PATCH 46/48] Add support for systemd-nspawn and WSL2 --- 0001-virt-what-detect-systemd-nspawn.patch | 513 +++++++++ 0002-Add-support-for-WSL2.patch | 1172 ++++++++++++++++++++ virt-what.spec | 10 +- 3 files changed, 1694 insertions(+), 1 deletion(-) create mode 100644 0001-virt-what-detect-systemd-nspawn.patch create mode 100644 0002-Add-support-for-WSL2.patch diff --git a/0001-virt-what-detect-systemd-nspawn.patch b/0001-virt-what-detect-systemd-nspawn.patch new file mode 100644 index 0000000..218bea0 --- /dev/null +++ b/0001-virt-what-detect-systemd-nspawn.patch @@ -0,0 +1,513 @@ +From 5315e2b57b2df54b294893adc5185c474985bcc2 Mon Sep 17 00:00:00 2001 +From: Jochen Kellner +Date: Mon, 9 Sep 2024 19:18:42 +0200 +Subject: [PATCH 1/2] virt-what: detect systemd-nspawn + +The following patch adds detection of systemd-nspawn containers to +virt-what for me. It is inspired by systemd-detect-virt which also +looks at /proc/1/environ. +--- + configure.ac | 2 + + tests/nspawn/Makefile.am | 30 +++ + tests/nspawn/proc/1/environ | Bin 0 -> 262 bytes + tests/nspawn/proc/cpuinfo | 224 +++++++++++++++++++++++ + tests/nspawn/proc/self/status | 61 ++++++ + tests/nspawn/run/host/container-manager | 5 + + tests/nspawn/sbin/dmidecode | 7 + + tests/nspawn/sbin/uname | 2 + + tests/nspawn/sbin/virt-what-cpuid-helper | 2 + + tests/nspawn/test.sh | 32 ++++ + virt-what.in | 6 + + virt-what.pod | 6 + + 12 files changed, 377 insertions(+) + create mode 100644 tests/nspawn/Makefile.am + create mode 100644 tests/nspawn/proc/1/environ + create mode 100644 tests/nspawn/proc/cpuinfo + create mode 100644 tests/nspawn/proc/self/status + create mode 100755 tests/nspawn/run/host/container-manager + create mode 100755 tests/nspawn/sbin/dmidecode + create mode 100755 tests/nspawn/sbin/uname + create mode 100755 tests/nspawn/sbin/virt-what-cpuid-helper + create mode 100755 tests/nspawn/test.sh + +diff --git a/configure.ac b/configure.ac +index e93d237..2882db4 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -59,6 +59,7 @@ tests="\ + lkvm-arm \ + lx86 \ + lxc \ ++ nspawn \ + nutanix-ahv \ + oci \ + parallels-desktop \ +@@ -112,6 +113,7 @@ AC_CONFIG_FILES([Makefile + tests/lkvm-arm/Makefile + tests/lx86/Makefile + tests/lxc/Makefile ++ tests/nspawn/Makefile + tests/nutanix-ahv/Makefile + tests/oci/Makefile + tests/parallels-desktop/Makefile +diff --git a/tests/nspawn/Makefile.am b/tests/nspawn/Makefile.am +new file mode 100644 +index 0000000..e566063 +--- /dev/null ++++ b/tests/nspawn/Makefile.am +@@ -0,0 +1,30 @@ ++# Makefile for virt-what ++# Copyright (C) 2008-2024 Red Hat Inc. ++# ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ ++CLEANFILES = *~ ++ ++TESTS = test.sh ++ ++EXTRA_DIST = \ ++ test.sh \ ++ proc/1/environ \ ++ proc/cpuinfo \ ++ proc/self/status \ ++ run/host/container-manager \ ++ sbin/dmidecode \ ++ sbin/uname \ ++ sbin/virt-what-cpuid-helper +diff --git a/tests/nspawn/proc/1/environ b/tests/nspawn/proc/1/environ +new file mode 100644 +index 0000000000000000000000000000000000000000..918a77694ad4a0821246c14db4c5976f001a6982 +GIT binary patch +literal 262 +zcmZ9ET?>LR7=`zT#>!MG*hPeWP->)IbS0ac^g_LhZ5ICf$e^UV^PGos4vTWbS?esj +znp#|$lYsL9fAJ^!>Vp!H)CRo()Rw!>d3{q9-CaD9Z1ObW%o^j#sYs5zPy2kGEz;xz +z-)Yshpm;1I5h$&xid93y$)u*!D5_}~H(JV3D4JkKvb@}`&Q*~wcS*^aZINA!^9+rL +arW;(o+v=gM1A`SPJ`VmRD6X^wf#d~ua$48` + +literal 0 +HcmV?d00001 + +diff --git a/tests/nspawn/proc/cpuinfo b/tests/nspawn/proc/cpuinfo +new file mode 100644 +index 0000000..243aa53 +--- /dev/null ++++ b/tests/nspawn/proc/cpuinfo +@@ -0,0 +1,224 @@ ++processor : 0 ++vendor_id : GenuineIntel ++cpu family : 6 ++model : 94 ++model name : Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz ++stepping : 3 ++microcode : 0xf0 ++cpu MHz : 800.000 ++cache size : 8192 KB ++physical id : 0 ++siblings : 8 ++core id : 0 ++cpu cores : 4 ++apicid : 0 ++initial apicid : 0 ++fpu : yes ++fpu_exception : yes ++cpuid level : 22 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb pti ssbd ibrs ibpb stibp tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp vnmi md_clear flush_l1d arch_capabilities ++vmx flags : vnmi preemption_timer invvpid ept_x_only ept_ad ept_1gb flexpriority tsc_offset vtpr mtf vapic ept vpid unrestricted_guest ple shadow_vmcs pml ++bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs taa itlb_multihit srbds mmio_stale_data retbleed gds ++bogomips : 6799.81 ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 39 bits physical, 48 bits virtual ++power management: ++ ++processor : 1 ++vendor_id : GenuineIntel ++cpu family : 6 ++model : 94 ++model name : Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz ++stepping : 3 ++microcode : 0xf0 ++cpu MHz : 3999.967 ++cache size : 8192 KB ++physical id : 0 ++siblings : 8 ++core id : 1 ++cpu cores : 4 ++apicid : 2 ++initial apicid : 2 ++fpu : yes ++fpu_exception : yes ++cpuid level : 22 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb pti ssbd ibrs ibpb stibp tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp vnmi md_clear flush_l1d arch_capabilities ++vmx flags : vnmi preemption_timer invvpid ept_x_only ept_ad ept_1gb flexpriority tsc_offset vtpr mtf vapic ept vpid unrestricted_guest ple shadow_vmcs pml ++bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs taa itlb_multihit srbds mmio_stale_data retbleed gds ++bogomips : 6799.81 ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 39 bits physical, 48 bits virtual ++power management: ++ ++processor : 2 ++vendor_id : GenuineIntel ++cpu family : 6 ++model : 94 ++model name : Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz ++stepping : 3 ++microcode : 0xf0 ++cpu MHz : 800.000 ++cache size : 8192 KB ++physical id : 0 ++siblings : 8 ++core id : 2 ++cpu cores : 4 ++apicid : 4 ++initial apicid : 4 ++fpu : yes ++fpu_exception : yes ++cpuid level : 22 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb pti ssbd ibrs ibpb stibp tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp vnmi md_clear flush_l1d arch_capabilities ++vmx flags : vnmi preemption_timer invvpid ept_x_only ept_ad ept_1gb flexpriority tsc_offset vtpr mtf vapic ept vpid unrestricted_guest ple shadow_vmcs pml ++bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs taa itlb_multihit srbds mmio_stale_data retbleed gds ++bogomips : 6799.81 ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 39 bits physical, 48 bits virtual ++power management: ++ ++processor : 3 ++vendor_id : GenuineIntel ++cpu family : 6 ++model : 94 ++model name : Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz ++stepping : 3 ++microcode : 0xf0 ++cpu MHz : 3975.686 ++cache size : 8192 KB ++physical id : 0 ++siblings : 8 ++core id : 3 ++cpu cores : 4 ++apicid : 6 ++initial apicid : 6 ++fpu : yes ++fpu_exception : yes ++cpuid level : 22 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb pti ssbd ibrs ibpb stibp tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp vnmi md_clear flush_l1d arch_capabilities ++vmx flags : vnmi preemption_timer invvpid ept_x_only ept_ad ept_1gb flexpriority tsc_offset vtpr mtf vapic ept vpid unrestricted_guest ple shadow_vmcs pml ++bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs taa itlb_multihit srbds mmio_stale_data retbleed gds ++bogomips : 6799.81 ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 39 bits physical, 48 bits virtual ++power management: ++ ++processor : 4 ++vendor_id : GenuineIntel ++cpu family : 6 ++model : 94 ++model name : Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz ++stepping : 3 ++microcode : 0xf0 ++cpu MHz : 800.000 ++cache size : 8192 KB ++physical id : 0 ++siblings : 8 ++core id : 0 ++cpu cores : 4 ++apicid : 1 ++initial apicid : 1 ++fpu : yes ++fpu_exception : yes ++cpuid level : 22 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb pti ssbd ibrs ibpb stibp tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp vnmi md_clear flush_l1d arch_capabilities ++vmx flags : vnmi preemption_timer invvpid ept_x_only ept_ad ept_1gb flexpriority tsc_offset vtpr mtf vapic ept vpid unrestricted_guest ple shadow_vmcs pml ++bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs taa itlb_multihit srbds mmio_stale_data retbleed gds ++bogomips : 6799.81 ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 39 bits physical, 48 bits virtual ++power management: ++ ++processor : 5 ++vendor_id : GenuineIntel ++cpu family : 6 ++model : 94 ++model name : Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz ++stepping : 3 ++microcode : 0xf0 ++cpu MHz : 3955.023 ++cache size : 8192 KB ++physical id : 0 ++siblings : 8 ++core id : 1 ++cpu cores : 4 ++apicid : 3 ++initial apicid : 3 ++fpu : yes ++fpu_exception : yes ++cpuid level : 22 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb pti ssbd ibrs ibpb stibp tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp vnmi md_clear flush_l1d arch_capabilities ++vmx flags : vnmi preemption_timer invvpid ept_x_only ept_ad ept_1gb flexpriority tsc_offset vtpr mtf vapic ept vpid unrestricted_guest ple shadow_vmcs pml ++bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs taa itlb_multihit srbds mmio_stale_data retbleed gds ++bogomips : 6799.81 ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 39 bits physical, 48 bits virtual ++power management: ++ ++processor : 6 ++vendor_id : GenuineIntel ++cpu family : 6 ++model : 94 ++model name : Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz ++stepping : 3 ++microcode : 0xf0 ++cpu MHz : 3846.764 ++cache size : 8192 KB ++physical id : 0 ++siblings : 8 ++core id : 2 ++cpu cores : 4 ++apicid : 5 ++initial apicid : 5 ++fpu : yes ++fpu_exception : yes ++cpuid level : 22 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb pti ssbd ibrs ibpb stibp tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp vnmi md_clear flush_l1d arch_capabilities ++vmx flags : vnmi preemption_timer invvpid ept_x_only ept_ad ept_1gb flexpriority tsc_offset vtpr mtf vapic ept vpid unrestricted_guest ple shadow_vmcs pml ++bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs taa itlb_multihit srbds mmio_stale_data retbleed gds ++bogomips : 6799.81 ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 39 bits physical, 48 bits virtual ++power management: ++ ++processor : 7 ++vendor_id : GenuineIntel ++cpu family : 6 ++model : 94 ++model name : Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz ++stepping : 3 ++microcode : 0xf0 ++cpu MHz : 3892.180 ++cache size : 8192 KB ++physical id : 0 ++siblings : 8 ++core id : 3 ++cpu cores : 4 ++apicid : 7 ++initial apicid : 7 ++fpu : yes ++fpu_exception : yes ++cpuid level : 22 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb pti ssbd ibrs ibpb stibp tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp vnmi md_clear flush_l1d arch_capabilities ++vmx flags : vnmi preemption_timer invvpid ept_x_only ept_ad ept_1gb flexpriority tsc_offset vtpr mtf vapic ept vpid unrestricted_guest ple shadow_vmcs pml ++bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs taa itlb_multihit srbds mmio_stale_data retbleed gds ++bogomips : 6799.81 ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 39 bits physical, 48 bits virtual ++power management: ++ +diff --git a/tests/nspawn/proc/self/status b/tests/nspawn/proc/self/status +new file mode 100644 +index 0000000..e1c867a +--- /dev/null ++++ b/tests/nspawn/proc/self/status +@@ -0,0 +1,61 @@ ++Name: cat ++Umask: 0022 ++State: R (running) ++Tgid: 2359 ++Ngid: 0 ++Pid: 2359 ++PPid: 2049 ++TracerPid: 0 ++Uid: 0 0 0 0 ++Gid: 0 0 0 0 ++FDSize: 256 ++Groups: ++NStgid: 2359 ++NSpid: 2359 ++NSpgid: 2359 ++NSsid: 2049 ++Kthread: 0 ++VmPeak: 3044 kB ++VmSize: 3044 kB ++VmLck: 0 kB ++VmPin: 0 kB ++VmHWM: 1408 kB ++VmRSS: 1408 kB ++RssAnon: 0 kB ++RssFile: 1408 kB ++RssShmem: 0 kB ++VmData: 360 kB ++VmStk: 132 kB ++VmExe: 20 kB ++VmLib: 1520 kB ++VmPTE: 44 kB ++VmSwap: 0 kB ++HugetlbPages: 0 kB ++CoreDumping: 0 ++THP_enabled: 1 ++untag_mask: 0xffffffffffffffff ++Threads: 1 ++SigQ: 0/127646 ++SigPnd: 0000000000000000 ++ShdPnd: 0000000000000000 ++SigBlk: 0000000000000000 ++SigIgn: 0000000000000000 ++SigCgt: 0000000000000000 ++CapInh: 0000000000000000 ++CapPrm: 00000000fdecbfff ++CapEff: 00000000fdecbfff ++CapBnd: 00000000fdecbfff ++CapAmb: 0000000000000000 ++NoNewPrivs: 0 ++Seccomp: 2 ++Seccomp_filters: 5 ++Speculation_Store_Bypass: thread vulnerable ++SpeculationIndirectBranch: conditional enabled ++Cpus_allowed: ff ++Cpus_allowed_list: 0-7 ++Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 ++Mems_allowed_list: 0 ++voluntary_ctxt_switches: 0 ++nonvoluntary_ctxt_switches: 0 ++x86_Thread_features: ++x86_Thread_features_locked: +diff --git a/tests/nspawn/run/host/container-manager b/tests/nspawn/run/host/container-manager +new file mode 100755 +index 0000000..e8bd250 +--- /dev/null ++++ b/tests/nspawn/run/host/container-manager +@@ -0,0 +1,5 @@ ++#!/bin/sh - ++cat <<'EOF' ++systemd-nspawn ++EOF ++exit 0 +diff --git a/tests/nspawn/sbin/dmidecode b/tests/nspawn/sbin/dmidecode +new file mode 100755 +index 0000000..78e5cea +--- /dev/null ++++ b/tests/nspawn/sbin/dmidecode +@@ -0,0 +1,7 @@ ++#!/bin/sh - ++cat <<'EOF' ++# dmidecode 3.4 ++Scanning /dev/mem for entry point. ++/dev/mem: No such file or directory ++EOF ++exit 1 +diff --git a/tests/nspawn/sbin/uname b/tests/nspawn/sbin/uname +new file mode 100755 +index 0000000..ab0ec89 +--- /dev/null ++++ b/tests/nspawn/sbin/uname +@@ -0,0 +1,2 @@ ++#!/bin/sh - ++echo x86_64 +diff --git a/tests/nspawn/sbin/virt-what-cpuid-helper b/tests/nspawn/sbin/virt-what-cpuid-helper +new file mode 100755 +index 0000000..481e1e6 +--- /dev/null ++++ b/tests/nspawn/sbin/virt-what-cpuid-helper +@@ -0,0 +1,2 @@ ++#!/bin/sh - ++# no output +diff --git a/tests/nspawn/test.sh b/tests/nspawn/test.sh +new file mode 100755 +index 0000000..09e5b9a +--- /dev/null ++++ b/tests/nspawn/test.sh +@@ -0,0 +1,32 @@ ++# Test for systemd-nspawn ++# Copyright (C) 2008-2024 Red Hat Inc. ++# ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ ++output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)" ++expected="systemd_nspawn" ++ ++if [ "$output" != "$expected" ]; then ++ echo "$0: test failed because output did not match expected" ++ echo "Expected output was:" ++ echo "----------------------------------------" ++ echo "$expected" ++ echo "----------------------------------------" ++ echo "But the actual output of the program was:" ++ echo "----------------------------------------" ++ echo "$output" ++ echo "----------------------------------------" ++ exit 1 ++fi +diff --git a/virt-what.in b/virt-what.in +index ba35cc5..39f0497 100644 +--- a/virt-what.in ++++ b/virt-what.in +@@ -238,6 +238,12 @@ elif grep -qF /libpod- "${root}/proc/self/cgroup" 2>/dev/null; then + echo podman + fi + ++# Check for container=systemd-nspawn ++if [ -e "${root}/proc/1/environ" ] && ++ cat "${root}/proc/1/environ" | tr '\000' '\n' | grep -Eiq '^container=systemd-nspawn'; then ++ echo systemd_nspawn ++fi ++ + # Check for Linux-VServer + if test -e "${root}/proc/self/status" \ + && cat "${root}/proc/self/status" | grep -q "VxID: [0-9]*"; then +diff --git a/virt-what.pod b/virt-what.pod +index d5eeb76..0eb0b93 100644 +--- a/virt-what.pod ++++ b/virt-what.pod +@@ -270,6 +270,12 @@ The guest is running on the Red Hat hypervisor. + + Status: confirmed by RWMJ + ++=item B ++ ++This process is running in a systemd nspawn container. ++ ++Status: contributed by Jochen Kellner ++ + =item B + + This is a User-Mode Linux (UML) guest. +-- +2.49.0 + diff --git a/0002-Add-support-for-WSL2.patch b/0002-Add-support-for-WSL2.patch new file mode 100644 index 0000000..8301d69 --- /dev/null +++ b/0002-Add-support-for-WSL2.patch @@ -0,0 +1,1172 @@ +From 7b5e2366f0af34c3e5a651aea3a6a6e8bdef3ca8 Mon Sep 17 00:00:00 2001 +From: Scott Herold +Date: Fri, 2 May 2025 21:01:35 +0100 +Subject: [PATCH 2/2] Add support for WSL2 + +--- + configure.ac | 2 + + tests/wsl2/Makefile.am | 28 + + tests/wsl2/proc/cpuinfo | 896 +++++++++++++++++++++++++ + tests/wsl2/proc/self/status | 57 ++ + tests/wsl2/sbin/dmidecode | 7 + + tests/wsl2/sbin/uname | 11 + + tests/wsl2/sbin/virt-what-cpuid-helper | 3 + + tests/wsl2/test.sh | 32 + + virt-what.in | 11 +- + virt-what.pod | 6 + + 10 files changed, 1050 insertions(+), 3 deletions(-) + create mode 100644 tests/wsl2/Makefile.am + create mode 100644 tests/wsl2/proc/cpuinfo + create mode 100644 tests/wsl2/proc/self/status + create mode 100755 tests/wsl2/sbin/dmidecode + create mode 100755 tests/wsl2/sbin/uname + create mode 100755 tests/wsl2/sbin/virt-what-cpuid-helper + create mode 100755 tests/wsl2/test.sh + +diff --git a/configure.ac b/configure.ac +index 2882db4..199bb9f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -79,6 +79,7 @@ tests="\ + rhev \ + upcloud \ + vmm \ ++ wsl2 \ + xen-arm \ + zvm \ + " +@@ -133,6 +134,7 @@ AC_CONFIG_FILES([Makefile + tests/rhev/Makefile + tests/upcloud/Makefile + tests/vmm/Makefile ++ tests/wsl2/Makefile + tests/xen-arm/Makefile + tests/zvm/Makefile + ]) +diff --git a/tests/wsl2/Makefile.am b/tests/wsl2/Makefile.am +new file mode 100644 +index 0000000..aa7f4ba +--- /dev/null ++++ b/tests/wsl2/Makefile.am +@@ -0,0 +1,28 @@ ++# Makefile for virt-what ++# Copyright (C) 2008-2025 Red Hat Inc. ++# ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ ++CLEANFILES = *~ ++ ++TESTS = test.sh ++ ++EXTRA_DIST = \ ++ test.sh \ ++ proc/cpuinfo \ ++ proc/self/status \ ++ sbin/dmidecode \ ++ sbin/uname \ ++ sbin/virt-what-cpuid-helper +diff --git a/tests/wsl2/proc/cpuinfo b/tests/wsl2/proc/cpuinfo +new file mode 100644 +index 0000000..eb39d36 +--- /dev/null ++++ b/tests/wsl2/proc/cpuinfo +@@ -0,0 +1,896 @@ ++processor : 0 ++vendor_id : AuthenticAMD ++cpu family : 25 ++model : 97 ++model name : AMD Ryzen 9 7950X3D 16-Core Processor ++stepping : 2 ++microcode : 0xffffffff ++cpu MHz : 4199.785 ++cache size : 1024 KB ++physical id : 0 ++siblings : 32 ++core id : 0 ++cpu cores : 16 ++apicid : 0 ++initial apicid : 0 ++fpu : yes ++fpu_exception : yes ++cpuid level : 13 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm ++bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass srso ++bogomips : 8399.57 ++TLB size : 3584 4K pages ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 48 bits physical, 48 bits virtual ++power management: ++ ++processor : 1 ++vendor_id : AuthenticAMD ++cpu family : 25 ++model : 97 ++model name : AMD Ryzen 9 7950X3D 16-Core Processor ++stepping : 2 ++microcode : 0xffffffff ++cpu MHz : 4199.785 ++cache size : 1024 KB ++physical id : 0 ++siblings : 32 ++core id : 0 ++cpu cores : 16 ++apicid : 1 ++initial apicid : 1 ++fpu : yes ++fpu_exception : yes ++cpuid level : 13 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm ++bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass srso ++bogomips : 8399.57 ++TLB size : 3584 4K pages ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 48 bits physical, 48 bits virtual ++power management: ++ ++processor : 2 ++vendor_id : AuthenticAMD ++cpu family : 25 ++model : 97 ++model name : AMD Ryzen 9 7950X3D 16-Core Processor ++stepping : 2 ++microcode : 0xffffffff ++cpu MHz : 4199.785 ++cache size : 1024 KB ++physical id : 0 ++siblings : 32 ++core id : 1 ++cpu cores : 16 ++apicid : 2 ++initial apicid : 2 ++fpu : yes ++fpu_exception : yes ++cpuid level : 13 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm ++bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass srso ++bogomips : 8399.57 ++TLB size : 3584 4K pages ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 48 bits physical, 48 bits virtual ++power management: ++ ++processor : 3 ++vendor_id : AuthenticAMD ++cpu family : 25 ++model : 97 ++model name : AMD Ryzen 9 7950X3D 16-Core Processor ++stepping : 2 ++microcode : 0xffffffff ++cpu MHz : 4199.785 ++cache size : 1024 KB ++physical id : 0 ++siblings : 32 ++core id : 1 ++cpu cores : 16 ++apicid : 3 ++initial apicid : 3 ++fpu : yes ++fpu_exception : yes ++cpuid level : 13 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm ++bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass srso ++bogomips : 8399.57 ++TLB size : 3584 4K pages ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 48 bits physical, 48 bits virtual ++power management: ++ ++processor : 4 ++vendor_id : AuthenticAMD ++cpu family : 25 ++model : 97 ++model name : AMD Ryzen 9 7950X3D 16-Core Processor ++stepping : 2 ++microcode : 0xffffffff ++cpu MHz : 4199.785 ++cache size : 1024 KB ++physical id : 0 ++siblings : 32 ++core id : 2 ++cpu cores : 16 ++apicid : 4 ++initial apicid : 4 ++fpu : yes ++fpu_exception : yes ++cpuid level : 13 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm ++bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass srso ++bogomips : 8399.57 ++TLB size : 3584 4K pages ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 48 bits physical, 48 bits virtual ++power management: ++ ++processor : 5 ++vendor_id : AuthenticAMD ++cpu family : 25 ++model : 97 ++model name : AMD Ryzen 9 7950X3D 16-Core Processor ++stepping : 2 ++microcode : 0xffffffff ++cpu MHz : 4199.785 ++cache size : 1024 KB ++physical id : 0 ++siblings : 32 ++core id : 2 ++cpu cores : 16 ++apicid : 5 ++initial apicid : 5 ++fpu : yes ++fpu_exception : yes ++cpuid level : 13 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm ++bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass srso ++bogomips : 8399.57 ++TLB size : 3584 4K pages ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 48 bits physical, 48 bits virtual ++power management: ++ ++processor : 6 ++vendor_id : AuthenticAMD ++cpu family : 25 ++model : 97 ++model name : AMD Ryzen 9 7950X3D 16-Core Processor ++stepping : 2 ++microcode : 0xffffffff ++cpu MHz : 4199.785 ++cache size : 1024 KB ++physical id : 0 ++siblings : 32 ++core id : 3 ++cpu cores : 16 ++apicid : 6 ++initial apicid : 6 ++fpu : yes ++fpu_exception : yes ++cpuid level : 13 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm ++bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass srso ++bogomips : 8399.57 ++TLB size : 3584 4K pages ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 48 bits physical, 48 bits virtual ++power management: ++ ++processor : 7 ++vendor_id : AuthenticAMD ++cpu family : 25 ++model : 97 ++model name : AMD Ryzen 9 7950X3D 16-Core Processor ++stepping : 2 ++microcode : 0xffffffff ++cpu MHz : 4199.785 ++cache size : 1024 KB ++physical id : 0 ++siblings : 32 ++core id : 3 ++cpu cores : 16 ++apicid : 7 ++initial apicid : 7 ++fpu : yes ++fpu_exception : yes ++cpuid level : 13 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm ++bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass srso ++bogomips : 8399.57 ++TLB size : 3584 4K pages ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 48 bits physical, 48 bits virtual ++power management: ++ ++processor : 8 ++vendor_id : AuthenticAMD ++cpu family : 25 ++model : 97 ++model name : AMD Ryzen 9 7950X3D 16-Core Processor ++stepping : 2 ++microcode : 0xffffffff ++cpu MHz : 4199.785 ++cache size : 1024 KB ++physical id : 0 ++siblings : 32 ++core id : 4 ++cpu cores : 16 ++apicid : 8 ++initial apicid : 8 ++fpu : yes ++fpu_exception : yes ++cpuid level : 13 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm ++bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass srso ++bogomips : 8399.57 ++TLB size : 3584 4K pages ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 48 bits physical, 48 bits virtual ++power management: ++ ++processor : 9 ++vendor_id : AuthenticAMD ++cpu family : 25 ++model : 97 ++model name : AMD Ryzen 9 7950X3D 16-Core Processor ++stepping : 2 ++microcode : 0xffffffff ++cpu MHz : 4199.785 ++cache size : 1024 KB ++physical id : 0 ++siblings : 32 ++core id : 4 ++cpu cores : 16 ++apicid : 9 ++initial apicid : 9 ++fpu : yes ++fpu_exception : yes ++cpuid level : 13 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm ++bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass srso ++bogomips : 8399.57 ++TLB size : 3584 4K pages ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 48 bits physical, 48 bits virtual ++power management: ++ ++processor : 10 ++vendor_id : AuthenticAMD ++cpu family : 25 ++model : 97 ++model name : AMD Ryzen 9 7950X3D 16-Core Processor ++stepping : 2 ++microcode : 0xffffffff ++cpu MHz : 4199.785 ++cache size : 1024 KB ++physical id : 0 ++siblings : 32 ++core id : 5 ++cpu cores : 16 ++apicid : 10 ++initial apicid : 10 ++fpu : yes ++fpu_exception : yes ++cpuid level : 13 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm ++bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass srso ++bogomips : 8399.57 ++TLB size : 3584 4K pages ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 48 bits physical, 48 bits virtual ++power management: ++ ++processor : 11 ++vendor_id : AuthenticAMD ++cpu family : 25 ++model : 97 ++model name : AMD Ryzen 9 7950X3D 16-Core Processor ++stepping : 2 ++microcode : 0xffffffff ++cpu MHz : 4199.785 ++cache size : 1024 KB ++physical id : 0 ++siblings : 32 ++core id : 5 ++cpu cores : 16 ++apicid : 11 ++initial apicid : 11 ++fpu : yes ++fpu_exception : yes ++cpuid level : 13 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm ++bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass srso ++bogomips : 8399.57 ++TLB size : 3584 4K pages ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 48 bits physical, 48 bits virtual ++power management: ++ ++processor : 12 ++vendor_id : AuthenticAMD ++cpu family : 25 ++model : 97 ++model name : AMD Ryzen 9 7950X3D 16-Core Processor ++stepping : 2 ++microcode : 0xffffffff ++cpu MHz : 4199.785 ++cache size : 1024 KB ++physical id : 0 ++siblings : 32 ++core id : 6 ++cpu cores : 16 ++apicid : 12 ++initial apicid : 12 ++fpu : yes ++fpu_exception : yes ++cpuid level : 13 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm ++bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass srso ++bogomips : 8399.57 ++TLB size : 3584 4K pages ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 48 bits physical, 48 bits virtual ++power management: ++ ++processor : 13 ++vendor_id : AuthenticAMD ++cpu family : 25 ++model : 97 ++model name : AMD Ryzen 9 7950X3D 16-Core Processor ++stepping : 2 ++microcode : 0xffffffff ++cpu MHz : 4199.785 ++cache size : 1024 KB ++physical id : 0 ++siblings : 32 ++core id : 6 ++cpu cores : 16 ++apicid : 13 ++initial apicid : 13 ++fpu : yes ++fpu_exception : yes ++cpuid level : 13 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm ++bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass srso ++bogomips : 8399.57 ++TLB size : 3584 4K pages ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 48 bits physical, 48 bits virtual ++power management: ++ ++processor : 14 ++vendor_id : AuthenticAMD ++cpu family : 25 ++model : 97 ++model name : AMD Ryzen 9 7950X3D 16-Core Processor ++stepping : 2 ++microcode : 0xffffffff ++cpu MHz : 4199.785 ++cache size : 1024 KB ++physical id : 0 ++siblings : 32 ++core id : 7 ++cpu cores : 16 ++apicid : 14 ++initial apicid : 14 ++fpu : yes ++fpu_exception : yes ++cpuid level : 13 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm ++bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass srso ++bogomips : 8399.57 ++TLB size : 3584 4K pages ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 48 bits physical, 48 bits virtual ++power management: ++ ++processor : 15 ++vendor_id : AuthenticAMD ++cpu family : 25 ++model : 97 ++model name : AMD Ryzen 9 7950X3D 16-Core Processor ++stepping : 2 ++microcode : 0xffffffff ++cpu MHz : 4199.785 ++cache size : 1024 KB ++physical id : 0 ++siblings : 32 ++core id : 7 ++cpu cores : 16 ++apicid : 15 ++initial apicid : 15 ++fpu : yes ++fpu_exception : yes ++cpuid level : 13 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm ++bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass srso ++bogomips : 8399.57 ++TLB size : 3584 4K pages ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 48 bits physical, 48 bits virtual ++power management: ++ ++processor : 16 ++vendor_id : AuthenticAMD ++cpu family : 25 ++model : 97 ++model name : AMD Ryzen 9 7950X3D 16-Core Processor ++stepping : 2 ++microcode : 0xffffffff ++cpu MHz : 4199.785 ++cache size : 1024 KB ++physical id : 0 ++siblings : 32 ++core id : 8 ++cpu cores : 16 ++apicid : 16 ++initial apicid : 16 ++fpu : yes ++fpu_exception : yes ++cpuid level : 13 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm ++bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass srso ++bogomips : 8399.57 ++TLB size : 3584 4K pages ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 48 bits physical, 48 bits virtual ++power management: ++ ++processor : 17 ++vendor_id : AuthenticAMD ++cpu family : 25 ++model : 97 ++model name : AMD Ryzen 9 7950X3D 16-Core Processor ++stepping : 2 ++microcode : 0xffffffff ++cpu MHz : 4199.785 ++cache size : 1024 KB ++physical id : 0 ++siblings : 32 ++core id : 8 ++cpu cores : 16 ++apicid : 17 ++initial apicid : 17 ++fpu : yes ++fpu_exception : yes ++cpuid level : 13 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm ++bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass srso ++bogomips : 8399.57 ++TLB size : 3584 4K pages ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 48 bits physical, 48 bits virtual ++power management: ++ ++processor : 18 ++vendor_id : AuthenticAMD ++cpu family : 25 ++model : 97 ++model name : AMD Ryzen 9 7950X3D 16-Core Processor ++stepping : 2 ++microcode : 0xffffffff ++cpu MHz : 4199.785 ++cache size : 1024 KB ++physical id : 0 ++siblings : 32 ++core id : 9 ++cpu cores : 16 ++apicid : 18 ++initial apicid : 18 ++fpu : yes ++fpu_exception : yes ++cpuid level : 13 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm ++bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass srso ++bogomips : 8399.57 ++TLB size : 3584 4K pages ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 48 bits physical, 48 bits virtual ++power management: ++ ++processor : 19 ++vendor_id : AuthenticAMD ++cpu family : 25 ++model : 97 ++model name : AMD Ryzen 9 7950X3D 16-Core Processor ++stepping : 2 ++microcode : 0xffffffff ++cpu MHz : 4199.785 ++cache size : 1024 KB ++physical id : 0 ++siblings : 32 ++core id : 9 ++cpu cores : 16 ++apicid : 19 ++initial apicid : 19 ++fpu : yes ++fpu_exception : yes ++cpuid level : 13 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm ++bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass srso ++bogomips : 8399.57 ++TLB size : 3584 4K pages ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 48 bits physical, 48 bits virtual ++power management: ++ ++processor : 20 ++vendor_id : AuthenticAMD ++cpu family : 25 ++model : 97 ++model name : AMD Ryzen 9 7950X3D 16-Core Processor ++stepping : 2 ++microcode : 0xffffffff ++cpu MHz : 4199.785 ++cache size : 1024 KB ++physical id : 0 ++siblings : 32 ++core id : 10 ++cpu cores : 16 ++apicid : 20 ++initial apicid : 20 ++fpu : yes ++fpu_exception : yes ++cpuid level : 13 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm ++bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass srso ++bogomips : 8399.57 ++TLB size : 3584 4K pages ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 48 bits physical, 48 bits virtual ++power management: ++ ++processor : 21 ++vendor_id : AuthenticAMD ++cpu family : 25 ++model : 97 ++model name : AMD Ryzen 9 7950X3D 16-Core Processor ++stepping : 2 ++microcode : 0xffffffff ++cpu MHz : 4199.785 ++cache size : 1024 KB ++physical id : 0 ++siblings : 32 ++core id : 10 ++cpu cores : 16 ++apicid : 21 ++initial apicid : 21 ++fpu : yes ++fpu_exception : yes ++cpuid level : 13 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm ++bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass srso ++bogomips : 8399.57 ++TLB size : 3584 4K pages ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 48 bits physical, 48 bits virtual ++power management: ++ ++processor : 22 ++vendor_id : AuthenticAMD ++cpu family : 25 ++model : 97 ++model name : AMD Ryzen 9 7950X3D 16-Core Processor ++stepping : 2 ++microcode : 0xffffffff ++cpu MHz : 4199.785 ++cache size : 1024 KB ++physical id : 0 ++siblings : 32 ++core id : 11 ++cpu cores : 16 ++apicid : 22 ++initial apicid : 22 ++fpu : yes ++fpu_exception : yes ++cpuid level : 13 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm ++bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass srso ++bogomips : 8399.57 ++TLB size : 3584 4K pages ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 48 bits physical, 48 bits virtual ++power management: ++ ++processor : 23 ++vendor_id : AuthenticAMD ++cpu family : 25 ++model : 97 ++model name : AMD Ryzen 9 7950X3D 16-Core Processor ++stepping : 2 ++microcode : 0xffffffff ++cpu MHz : 4199.785 ++cache size : 1024 KB ++physical id : 0 ++siblings : 32 ++core id : 11 ++cpu cores : 16 ++apicid : 23 ++initial apicid : 23 ++fpu : yes ++fpu_exception : yes ++cpuid level : 13 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm ++bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass srso ++bogomips : 8399.57 ++TLB size : 3584 4K pages ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 48 bits physical, 48 bits virtual ++power management: ++ ++processor : 24 ++vendor_id : AuthenticAMD ++cpu family : 25 ++model : 97 ++model name : AMD Ryzen 9 7950X3D 16-Core Processor ++stepping : 2 ++microcode : 0xffffffff ++cpu MHz : 4199.785 ++cache size : 1024 KB ++physical id : 0 ++siblings : 32 ++core id : 12 ++cpu cores : 16 ++apicid : 24 ++initial apicid : 24 ++fpu : yes ++fpu_exception : yes ++cpuid level : 13 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm ++bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass srso ++bogomips : 8399.57 ++TLB size : 3584 4K pages ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 48 bits physical, 48 bits virtual ++power management: ++ ++processor : 25 ++vendor_id : AuthenticAMD ++cpu family : 25 ++model : 97 ++model name : AMD Ryzen 9 7950X3D 16-Core Processor ++stepping : 2 ++microcode : 0xffffffff ++cpu MHz : 4199.785 ++cache size : 1024 KB ++physical id : 0 ++siblings : 32 ++core id : 12 ++cpu cores : 16 ++apicid : 25 ++initial apicid : 25 ++fpu : yes ++fpu_exception : yes ++cpuid level : 13 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm ++bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass srso ++bogomips : 8399.57 ++TLB size : 3584 4K pages ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 48 bits physical, 48 bits virtual ++power management: ++ ++processor : 26 ++vendor_id : AuthenticAMD ++cpu family : 25 ++model : 97 ++model name : AMD Ryzen 9 7950X3D 16-Core Processor ++stepping : 2 ++microcode : 0xffffffff ++cpu MHz : 4199.785 ++cache size : 1024 KB ++physical id : 0 ++siblings : 32 ++core id : 13 ++cpu cores : 16 ++apicid : 26 ++initial apicid : 26 ++fpu : yes ++fpu_exception : yes ++cpuid level : 13 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm ++bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass srso ++bogomips : 8399.57 ++TLB size : 3584 4K pages ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 48 bits physical, 48 bits virtual ++power management: ++ ++processor : 27 ++vendor_id : AuthenticAMD ++cpu family : 25 ++model : 97 ++model name : AMD Ryzen 9 7950X3D 16-Core Processor ++stepping : 2 ++microcode : 0xffffffff ++cpu MHz : 4199.785 ++cache size : 1024 KB ++physical id : 0 ++siblings : 32 ++core id : 13 ++cpu cores : 16 ++apicid : 27 ++initial apicid : 27 ++fpu : yes ++fpu_exception : yes ++cpuid level : 13 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm ++bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass srso ++bogomips : 8399.57 ++TLB size : 3584 4K pages ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 48 bits physical, 48 bits virtual ++power management: ++ ++processor : 28 ++vendor_id : AuthenticAMD ++cpu family : 25 ++model : 97 ++model name : AMD Ryzen 9 7950X3D 16-Core Processor ++stepping : 2 ++microcode : 0xffffffff ++cpu MHz : 4199.785 ++cache size : 1024 KB ++physical id : 0 ++siblings : 32 ++core id : 14 ++cpu cores : 16 ++apicid : 28 ++initial apicid : 28 ++fpu : yes ++fpu_exception : yes ++cpuid level : 13 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm ++bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass srso ++bogomips : 8399.57 ++TLB size : 3584 4K pages ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 48 bits physical, 48 bits virtual ++power management: ++ ++processor : 29 ++vendor_id : AuthenticAMD ++cpu family : 25 ++model : 97 ++model name : AMD Ryzen 9 7950X3D 16-Core Processor ++stepping : 2 ++microcode : 0xffffffff ++cpu MHz : 4199.785 ++cache size : 1024 KB ++physical id : 0 ++siblings : 32 ++core id : 14 ++cpu cores : 16 ++apicid : 29 ++initial apicid : 29 ++fpu : yes ++fpu_exception : yes ++cpuid level : 13 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm ++bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass srso ++bogomips : 8399.57 ++TLB size : 3584 4K pages ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 48 bits physical, 48 bits virtual ++power management: ++ ++processor : 30 ++vendor_id : AuthenticAMD ++cpu family : 25 ++model : 97 ++model name : AMD Ryzen 9 7950X3D 16-Core Processor ++stepping : 2 ++microcode : 0xffffffff ++cpu MHz : 4199.785 ++cache size : 1024 KB ++physical id : 0 ++siblings : 32 ++core id : 15 ++cpu cores : 16 ++apicid : 30 ++initial apicid : 30 ++fpu : yes ++fpu_exception : yes ++cpuid level : 13 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm ++bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass srso ++bogomips : 8399.57 ++TLB size : 3584 4K pages ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 48 bits physical, 48 bits virtual ++power management: ++ ++processor : 31 ++vendor_id : AuthenticAMD ++cpu family : 25 ++model : 97 ++model name : AMD Ryzen 9 7950X3D 16-Core Processor ++stepping : 2 ++microcode : 0xffffffff ++cpu MHz : 4199.785 ++cache size : 1024 KB ++physical id : 0 ++siblings : 32 ++core id : 15 ++cpu cores : 16 ++apicid : 31 ++initial apicid : 31 ++fpu : yes ++fpu_exception : yes ++cpuid level : 13 ++wp : yes ++flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm ++bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass srso ++bogomips : 8399.57 ++TLB size : 3584 4K pages ++clflush size : 64 ++cache_alignment : 64 ++address sizes : 48 bits physical, 48 bits virtual ++power management: ++ +diff --git a/tests/wsl2/proc/self/status b/tests/wsl2/proc/self/status +new file mode 100644 +index 0000000..37a0a47 +--- /dev/null ++++ b/tests/wsl2/proc/self/status +@@ -0,0 +1,57 @@ ++Name: cat ++Umask: 0022 ++State: R (running) ++Tgid: 16906 ++Ngid: 0 ++Pid: 16906 ++PPid: 4346 ++TracerPid: 0 ++Uid: 1000 1000 1000 1000 ++Gid: 1000 1000 1000 1000 ++FDSize: 256 ++Groups: 10 1000 ++NStgid: 16906 ++NSpid: 16906 ++NSpgid: 16906 ++NSsid: 4346 ++VmPeak: 7976 kB ++VmSize: 7976 kB ++VmLck: 0 kB ++VmPin: 0 kB ++VmHWM: 1272 kB ++VmRSS: 1272 kB ++RssAnon: 168 kB ++RssFile: 1104 kB ++RssShmem: 0 kB ++VmData: 484 kB ++VmStk: 132 kB ++VmExe: 896 kB ++VmLib: 2244 kB ++VmPTE: 52 kB ++VmSwap: 0 kB ++HugetlbPages: 0 kB ++CoreDumping: 0 ++THP_enabled: 1 ++Threads: 1 ++SigQ: 1/127571 ++SigPnd: 0000000000000000 ++ShdPnd: 0000000000000000 ++SigBlk: 0000000000000000 ++SigIgn: 0000000000000000 ++SigCgt: 0000000000000000 ++CapInh: 0000000000000000 ++CapPrm: 0000000000000000 ++CapEff: 0000000000000000 ++CapBnd: 000001ffffffffff ++CapAmb: 0000000000000000 ++NoNewPrivs: 0 ++Seccomp: 0 ++Seccomp_filters: 0 ++Speculation_Store_Bypass: thread vulnerable ++SpeculationIndirectBranch: conditional enabled ++Cpus_allowed: ffffffff ++Cpus_allowed_list: 0-31 ++Mems_allowed: 1 ++Mems_allowed_list: 0 ++voluntary_ctxt_switches: 6 ++nonvoluntary_ctxt_switches: 0 +\ No newline at end of file +diff --git a/tests/wsl2/sbin/dmidecode b/tests/wsl2/sbin/dmidecode +new file mode 100755 +index 0000000..5d09059 +--- /dev/null ++++ b/tests/wsl2/sbin/dmidecode +@@ -0,0 +1,7 @@ ++#!/bin/sh - ++cat <<'EOF' ++# dmidecode 3.6 ++Scanning /dev/mem for entry point. ++# No SMBIOS nor DMI entry point found, sorry. ++EOF ++exit 1 +diff --git a/tests/wsl2/sbin/uname b/tests/wsl2/sbin/uname +new file mode 100755 +index 0000000..47af99f +--- /dev/null ++++ b/tests/wsl2/sbin/uname +@@ -0,0 +1,11 @@ ++#!/bin/sh - ++# Enable expected output for arch check as well as kernel release name ++# required to determine WSL2 with uname -r ++while getopts ":r" option; do ++ case $option in ++ r) # display kernel release name ++ echo microsoft-standard-WSL2 ++ exit;; ++ esac ++done ++echo x86_64 +diff --git a/tests/wsl2/sbin/virt-what-cpuid-helper b/tests/wsl2/sbin/virt-what-cpuid-helper +new file mode 100755 +index 0000000..1604462 +--- /dev/null ++++ b/tests/wsl2/sbin/virt-what-cpuid-helper +@@ -0,0 +1,3 @@ ++#!/bin/sh - ++echo "Microsoft Hv" ++ +diff --git a/tests/wsl2/test.sh b/tests/wsl2/test.sh +new file mode 100755 +index 0000000..936a992 +--- /dev/null ++++ b/tests/wsl2/test.sh +@@ -0,0 +1,32 @@ ++# Test for Microsoft WSL2. ++# Copyright (C) 2008-2025 Red Hat Inc. ++# ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ ++output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)" ++expected="wsl2" ++ ++if [ "$output" != "$expected" ]; then ++ echo "$0: test failed because output did not match expected" ++ echo "Expected output was:" ++ echo "----------------------------------------" ++ echo "$expected" ++ echo "----------------------------------------" ++ echo "But the actual output of the program was:" ++ echo "----------------------------------------" ++ echo "$output" ++ echo "----------------------------------------" ++ exit 1 ++fi +diff --git a/virt-what.in b/virt-what.in +index 39f0497..61481d3 100644 +--- a/virt-what.in ++++ b/virt-what.in +@@ -109,7 +109,8 @@ cpuid=$(virt-what-cpuid-helper) + dmi=$(LANG=C dmidecode 2>&1) + + # Architecture. +-# Note for the purpose of testing, we only call uname with -m option. ++# Note for the purpose of testing, we only call uname with -m option ++# (except WSL2 which is weird). + + arch=$(uname -m | sed -e 's/i.86/i386/' | sed -e 's/arm.*/arm/') + +@@ -150,9 +151,13 @@ elif echo "$dmi" | grep -q 'Manufacturer: VMware'; then + echo vmware + fi + +-# Check for Hyper-V. ++# Check for WSL2. ++kernel=$(uname -r) ++if echo "$kernel" | grep -q 'microsoft-standard-WSL2' ; then ++ echo wsl2 ++# If not WSL2 based on the running kernel, check for native Hyper-V. + # http://blogs.msdn.com/b/sqlosteam/archive/2010/10/30/is-this-real-the-metaphysics-of-hardware-virtualization.aspx +-if [ "$cpuid" = "Microsoft Hv" ]; then ++elif [ "$cpuid" = "Microsoft Hv" ]; then + echo hyperv + # Hyper-V on ARM doesn't have CPUID. Use the information in dmidecode + # instead. Note this is similar to VirtualPC below. +diff --git a/virt-what.pod b/virt-what.pod +index 0eb0b93..2b7d34c 100644 +--- a/virt-what.pod ++++ b/virt-what.pod +@@ -328,6 +328,12 @@ The guest appears to be running on VMware hypervisor. + + Status: confirmed by RWMJ + ++=item B ++ ++The guest appears to be running on Windows Subsystem for Linux 2 (WSL2). ++ ++Status: contributed by Scott Herold ++ + =item B + + The guest appears to be running on Xen hypervisor. +-- +2.49.0 + diff --git a/virt-what.spec b/virt-what.spec index df00c34..1fecafa 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -1,6 +1,6 @@ Name: virt-what Version: 1.27 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Detect if we are running in a virtual machine License: GPL-2.0-or-later @@ -14,6 +14,11 @@ Source2: libguestfs.keyring # Maintainer script which helps with handling patches. Source3: copy-patches.sh +# Add detection of systemd-nspawn (upstream) +Patch: 0001-virt-what-detect-systemd-nspawn.patch +# Add detection of WSL2 (upstream) +Patch: 0002-Add-support-for-WSL2.patch + BuildRequires: gcc BuildRequires: make BuildRequires: git @@ -121,6 +126,9 @@ fi %changelog +* Tue May 06 2025 Richard W.M. Jones - 1.27-3 +- Add support for systemd-nspawn and WSL2 + * Sun Jan 19 2025 Fedora Release Engineering - 1.27-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 1a886ad1f5780028d78114c13e7e3053c8f85675 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 6 May 2025 13:14:54 +0100 Subject: [PATCH 47/48] Dump config.log on error --- virt-what.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virt-what.spec b/virt-what.spec index 1fecafa..db722da 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -103,7 +103,7 @@ autoreconf -i %build -%configure +%configure || { cat config.log; exit 1; } make From 943a41f9926998701acc4957e11afcb3c2e41459 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 20:09:18 +0000 Subject: [PATCH 48/48] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- virt-what.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-what.spec b/virt-what.spec index db722da..c78c0bd 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -1,6 +1,6 @@ Name: virt-what Version: 1.27 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Detect if we are running in a virtual machine License: GPL-2.0-or-later @@ -126,6 +126,9 @@ fi %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 1.27-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Tue May 06 2025 Richard W.M. Jones - 1.27-3 - Add support for systemd-nspawn and WSL2