diff --git a/.gitignore b/.gitignore index d6adbd4..5c55c81 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/virt-what-1.13.tar.gz +SOURCES/virt-what-1.18.tar.gz diff --git a/.virt-what.metadata b/.virt-what.metadata index 2bd960a..6ee78eb 100644 --- a/.virt-what.metadata +++ b/.virt-what.metadata @@ -1 +1 @@ -aa723938fa2cb8ebd639694812b76909499b350b SOURCES/virt-what-1.13.tar.gz +cf60480c17be5350835a0b23dc82012ec711eea1 SOURCES/virt-what-1.18.tar.gz diff --git a/SOURCES/0001-Differentiate-between-vserver-host-and-guest.patch b/SOURCES/0001-Differentiate-between-vserver-host-and-guest.patch deleted file mode 100644 index f108fc4..0000000 --- a/SOURCES/0001-Differentiate-between-vserver-host-and-guest.patch +++ /dev/null @@ -1,72 +0,0 @@ -From d409914d13b88541402fe871d70e3dff9d738455 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= -Date: Mon, 2 Sep 2013 15:24:11 +0100 -Subject: [PATCH 01/27] Differentiate between vserver host and guest. - -RWMJ: Update documentation and tests. ---- - tests/test-linux-vserver.sh | 3 ++- - virt-what.in | 5 +++++ - virt-what.pod | 12 ++++++++++++ - 3 files changed, 19 insertions(+), 1 deletion(-) - -diff --git a/tests/test-linux-vserver.sh b/tests/test-linux-vserver.sh -index 40d75a5..7988f81 100755 ---- a/tests/test-linux-vserver.sh -+++ b/tests/test-linux-vserver.sh -@@ -19,7 +19,8 @@ - root=tests/linux-vserver - - output="$(./virt-what --test-root=$root 2>&1)" --expected="linux_vserver" -+expected="linux_vserver -+linux_vserver-guest" - - if [ "$output" != "$expected" ]; then - echo "$0: test failed because output did not match expected" -diff --git a/virt-what.in b/virt-what.in -index f12c95b..422f6d0 100644 ---- a/virt-what.in -+++ b/virt-what.in -@@ -147,6 +147,11 @@ fi - # Check for Linux-VServer - if cat "${root}/proc/self/status" | grep -q "VxID: [0-9]*"; then - echo linux_vserver -+ if grep -q "VxID: 0$" "${root}/proc/self/status"; then -+ echo linux_vserver-host -+ else -+ echo linux_vserver-guest -+ fi - fi - - # Check for UML. -diff --git a/virt-what.pod b/virt-what.pod -index 98cd4af..bff2998 100644 ---- a/virt-what.pod -+++ b/virt-what.pod -@@ -62,10 +62,22 @@ Status: confirmed by RWMJ using a Fedora guest running in z/VM - - =item B - -+This is printed for backwards compatibility with older virt-what which -+could not distinguish between a Linux VServer container guest and -+host. -+ -+=item B -+ - This process is running in a Linux VServer container. - - Status: contributed by Barış Metin - -+=item B -+ -+This process is running as the Linux VServer host (VxID 0). -+ -+Status: contributed by Barış Metin and Elan Ruusamäe -+ - =item B - - This process is running in a Linux LXC container. --- -2.10.2 - diff --git a/SOURCES/0001-Missing-have_cpuinfo-check.patch b/SOURCES/0001-Missing-have_cpuinfo-check.patch new file mode 100644 index 0000000..2c2216e --- /dev/null +++ b/SOURCES/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/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/SOURCES/0002-Detect-new-Xen-VMs-RHBZ-973663.patch b/SOURCES/0002-Detect-new-Xen-VMs-RHBZ-973663.patch deleted file mode 100644 index 863b257..0000000 --- a/SOURCES/0002-Detect-new-Xen-VMs-RHBZ-973663.patch +++ /dev/null @@ -1,25 +0,0 @@ -From acd6bec92a99550ad98011d44f6381fdf7fa5992 Mon Sep 17 00:00:00 2001 -From: nodata -Date: Mon, 2 Sep 2013 16:59:32 +0100 -Subject: [PATCH 02/27] Detect new Xen VMs (RHBZ#973663). - ---- - virt-what.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/virt-what.in b/virt-what.in -index 422f6d0..bf663aa 100644 ---- a/virt-what.in -+++ b/virt-what.in -@@ -197,7 +197,7 @@ fi - if [ "$cpuid" = "XenVMMXenVMM" ]; then - echo xen; echo xen-hvm - skip_qemu_kvm=true --elif [ -f "${root}/proc/xen/capabilities" ]; then -+elif [ -d "${root}/proc/xen" ]; then - echo xen - if grep -q "control_d" "${root}/proc/xen/capabilities"; then - echo xen-dom0 --- -2.10.2 - diff --git a/SOURCES/0002-Remove-bashisms.patch b/SOURCES/0002-Remove-bashisms.patch new file mode 100644 index 0000000..7b88642 --- /dev/null +++ b/SOURCES/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/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/SOURCES/0003-As-xen-pv-guest-can-access-cpuid-from-Intel-CPUs-sta.patch b/SOURCES/0003-As-xen-pv-guest-can-access-cpuid-from-Intel-CPUs-sta.patch new file mode 100644 index 0000000..bd42694 --- /dev/null +++ b/SOURCES/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/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/SOURCES/0003-xen-Don-t-emit-warning-message-if-proc-xen-capabilit.patch b/SOURCES/0003-xen-Don-t-emit-warning-message-if-proc-xen-capabilit.patch deleted file mode 100644 index 5435cb2..0000000 --- a/SOURCES/0003-xen-Don-t-emit-warning-message-if-proc-xen-capabilit.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 8709c0e87dc3124b1a64d85654d6d4904702d767 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Mon, 28 Oct 2013 11:09:24 +0000 -Subject: [PATCH 03/27] xen: Don't emit warning message if - /proc/xen/capabilities file does not exist. - -On Amazon EC2: - -xen -grep: /proc/xen/capabilities: No such file or directory -xen-domU - -The warning is harmless but should not be printed. - -Thanks: Can Zhang for testing. ---- - virt-what.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/virt-what.in b/virt-what.in -index bf663aa..4b6d3b8 100644 ---- a/virt-what.in -+++ b/virt-what.in -@@ -199,7 +199,7 @@ if [ "$cpuid" = "XenVMMXenVMM" ]; then - skip_qemu_kvm=true - elif [ -d "${root}/proc/xen" ]; then - echo xen -- if grep -q "control_d" "${root}/proc/xen/capabilities"; then -+ if grep -q "control_d" "${root}/proc/xen/capabilities" 2>/dev/null; then - echo xen-dom0 - else - echo xen-domU --- -2.10.2 - diff --git a/SOURCES/0004-Fix-various-typos-and-mistakes-in-comments.patch b/SOURCES/0004-Fix-various-typos-and-mistakes-in-comments.patch deleted file mode 100644 index 6d36b37..0000000 --- a/SOURCES/0004-Fix-various-typos-and-mistakes-in-comments.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 9709c8f01ec3e2f78bcaa07045343de249d7618d Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Thu, 12 Dec 2013 08:47:37 +0000 -Subject: [PATCH 04/27] Fix various typos and mistakes in comments. - -(Thanks Robert P. J. Day) ---- - virt-what.in | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/virt-what.in b/virt-what.in -index 4b6d3b8..fb399be 100644 ---- a/virt-what.in -+++ b/virt-what.in -@@ -18,13 +18,13 @@ - - # 'virt-what' tries to detect the type of virtualization being - # used (or none at all if we're running on bare-metal). It prints --# out one of more lines each being a 'fact' about the virtualization. -+# out one or more lines each being a 'fact' about the virtualization. - # - # Please see also the manual page virt-what(1). - # This script should be run as root. - # - # The following resources were useful in writing this script: --# . http://www.dmo.ca/blog/20080530151107 -+# . http://dmo.ca/blog/detecting-virtualization-on-linux/ - - # Do not allow unset variables, and set defaults. - set -u -@@ -67,7 +67,7 @@ while true; do - done - - # Add /sbin and /usr/sbin to the path so we can find system --# binaries like dmicode. -+# binaries like dmidecode. - # Add /usr/libexec to the path so we can find the helper binary. - prefix=@prefix@ - exec_prefix=@exec_prefix@ --- -2.10.2 - diff --git a/SOURCES/0004-Recognize-ppc64le-little-endian-virtualization-RHBZ-.patch b/SOURCES/0004-Recognize-ppc64le-little-endian-virtualization-RHBZ-.patch new file mode 100644 index 0000000..98f0492 --- /dev/null +++ b/SOURCES/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/SOURCES/0005-Fix-spelling-mistake-in-the-man-page-RHBZ-1099289.patch b/SOURCES/0005-Fix-spelling-mistake-in-the-man-page-RHBZ-1099289.patch deleted file mode 100644 index 46dc5e5..0000000 --- a/SOURCES/0005-Fix-spelling-mistake-in-the-man-page-RHBZ-1099289.patch +++ /dev/null @@ -1,25 +0,0 @@ -From cc494d23a60c699bdc843ecb9d3564e69aae006c Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Tue, 20 May 2014 10:50:39 +0100 -Subject: [PATCH 05/27] Fix spelling mistake in the man page (RHBZ#1099289). - ---- - virt-what.pod | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/virt-what.pod b/virt-what.pod -index bff2998..bcafd26 100644 ---- a/virt-what.pod -+++ b/virt-what.pod -@@ -113,7 +113,7 @@ Status: contributed by Justin Clift - - The guest is running inside IBM PowerVM Lx86 Linux/x86 emulator. - --Status: data originally supplied by Jeffrey Scheel, confimed by -+Status: data originally supplied by Jeffrey Scheel, confirmed by - Yufang Zhang and RWMJ - - =item B --- -2.10.2 - diff --git a/SOURCES/0006-Added-check-and-test-routines-for-Docker.patch b/SOURCES/0006-Added-check-and-test-routines-for-Docker.patch deleted file mode 100644 index 5253672..0000000 --- a/SOURCES/0006-Added-check-and-test-routines-for-Docker.patch +++ /dev/null @@ -1,142 +0,0 @@ -From 89765910064584ebaea7a9899838a2cb66740d26 Mon Sep 17 00:00:00 2001 -From: Charles Nguyen -Date: Sat, 21 Jun 2014 22:27:51 -0500 -Subject: [PATCH 06/27] Added check and test routines for Docker - ---- - Makefile.am | 7 +++++++ - tests/docker/.dockerinit | 0 - tests/docker/proc/cpuinfo | 0 - tests/docker/proc/self/status | 0 - tests/docker/sbin/dmidecode | 6 ++++++ - tests/docker/sbin/uname | 2 ++ - tests/docker/sbin/virt-what-cpuid-helper | 2 ++ - tests/test-docker.sh | 34 ++++++++++++++++++++++++++++++++ - virt-what.in | 5 +++++ - 9 files changed, 56 insertions(+) - create mode 100644 tests/docker/.dockerinit - create mode 100644 tests/docker/proc/cpuinfo - create mode 100644 tests/docker/proc/self/status - create mode 100755 tests/docker/sbin/dmidecode - create mode 100755 tests/docker/sbin/uname - create mode 100755 tests/docker/sbin/virt-what-cpuid-helper - create mode 100755 tests/test-docker.sh - -diff --git a/Makefile.am b/Makefile.am -index 784d6db..24d1730 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -40,6 +40,7 @@ endif - - TESTS = \ - tests/test-baremetal.sh \ -+ tests/test-docker.sh \ - tests/test-esx4.1.sh \ - tests/test-hyperv.sh \ - tests/test-kvm.sh \ -@@ -63,6 +64,12 @@ EXTRA_DIST = \ - tests/baremetal/sbin/dmidecode \ - tests/baremetal/sbin/uname \ - tests/baremetal/sbin/virt-what-cpuid-helper \ -+ tests/docker/.dockerinit \ -+ tests/docker/proc/cpuinfo \ -+ tests/docker/proc/self/status \ -+ tests/docker/sbin/dmidecode \ -+ tests/docker/sbin/uname \ -+ tests/docker/sbin/virt-what-cpuid-helper \ - tests/esx4.1/proc/cpuinfo \ - tests/esx4.1/proc/self/status \ - tests/esx4.1/sbin/dmidecode \ -diff --git a/tests/docker/.dockerinit b/tests/docker/.dockerinit -new file mode 100644 -index 0000000..e69de29 -diff --git a/tests/docker/proc/cpuinfo b/tests/docker/proc/cpuinfo -new file mode 100644 -index 0000000..e69de29 -diff --git a/tests/docker/proc/self/status b/tests/docker/proc/self/status -new file mode 100644 -index 0000000..e69de29 -diff --git a/tests/docker/sbin/dmidecode b/tests/docker/sbin/dmidecode -new file mode 100755 -index 0000000..d9992ad ---- /dev/null -+++ b/tests/docker/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/docker/sbin/uname b/tests/docker/sbin/uname -new file mode 100755 -index 0000000..ab0ec89 ---- /dev/null -+++ b/tests/docker/sbin/uname -@@ -0,0 +1,2 @@ -+#!/bin/sh - -+echo x86_64 -diff --git a/tests/docker/sbin/virt-what-cpuid-helper b/tests/docker/sbin/virt-what-cpuid-helper -new file mode 100755 -index 0000000..ad82504 ---- /dev/null -+++ b/tests/docker/sbin/virt-what-cpuid-helper -@@ -0,0 +1,2 @@ -+#!/bin/sh - -+echo @ -diff --git a/tests/test-docker.sh b/tests/test-docker.sh -new file mode 100755 -index 0000000..4187f61 ---- /dev/null -+++ b/tests/test-docker.sh -@@ -0,0 +1,34 @@ -+# Test for Docker -+# 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. -+ -+root=tests/docker -+ -+output="$(./virt-what --test-root=$root 2>&1)" -+expected="docker" -+ -+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 fb399be..c04203e 100644 ---- a/virt-what.in -+++ b/virt-what.in -@@ -248,3 +248,8 @@ if ! "$skip_qemu_kvm"; then - fi - fi - fi -+ -+# Check for Docker. -+if [ -f "${root}/.dockerinit" ]; then -+ echo docker -+fi --- -2.10.2 - diff --git a/SOURCES/0007-Added-documentation-for-Docker-tests.patch b/SOURCES/0007-Added-documentation-for-Docker-tests.patch deleted file mode 100644 index 625f8e0..0000000 --- a/SOURCES/0007-Added-documentation-for-Docker-tests.patch +++ /dev/null @@ -1,29 +0,0 @@ -From aab6a7d67b4e3bb1f9697ded4dba8bc0c16d32fa Mon Sep 17 00:00:00 2001 -From: Charles Nguyen -Date: Sat, 21 Jun 2014 23:43:05 -0500 -Subject: [PATCH 07/27] Added documentation for Docker tests - ---- - virt-what.pod | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/virt-what.pod b/virt-what.pod -index bcafd26..8fd9bc4 100644 ---- a/virt-what.pod -+++ b/virt-what.pod -@@ -25,6 +25,12 @@ don't know about or cannot detect. - - =over 4 - -+=item B -+ -+This is a Docker container. -+ -+Status: confirmed by Charles Nguyen -+ - =item B - - This is Microsoft Hyper-V hypervisor. --- -2.10.2 - diff --git a/SOURCES/0008-virt-what.in-remove-bash-ism.patch b/SOURCES/0008-virt-what.in-remove-bash-ism.patch deleted file mode 100644 index 2e7628e..0000000 --- a/SOURCES/0008-virt-what.in-remove-bash-ism.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 8769b28cce8fdbc7da0605b061242b9dba51fc20 Mon Sep 17 00:00:00 2001 -From: "A. Gordon" -Date: Mon, 15 Sep 2014 14:48:23 -0400 -Subject: [PATCH 08/27] virt-what.in: remove bash-ism - -Use '/bin/sh' instead of '/bin/bash', with POSIX-compatible function -definitions. ---- - virt-what.in | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/virt-what.in b/virt-what.in -index c04203e..1532b90 100644 ---- a/virt-what.in -+++ b/virt-what.in -@@ -1,4 +1,4 @@ --#!/bin/bash - -+#!/bin/sh - - # @configure_input@ - # Copyright (C) 2008-2011 Red Hat Inc. - # -@@ -33,12 +33,12 @@ skip_qemu_kvm=false - - VERSION="@VERSION@" - --function fail { -+fail() { - echo "virt-what: $1" >&2 - exit 1 - } - --function usage { -+usage() { - echo "virt-what [options]" - echo "Options:" - echo " --help Display this help" --- -2.10.2 - diff --git a/SOURCES/0009-virt-what.in-get-effective-uid-in-a-portable-way.patch b/SOURCES/0009-virt-what.in-get-effective-uid-in-a-portable-way.patch deleted file mode 100644 index 3db5baa..0000000 --- a/SOURCES/0009-virt-what.in-get-effective-uid-in-a-portable-way.patch +++ /dev/null @@ -1,28 +0,0 @@ -From e1e79b9a988ab66f7ab673034488b42057621320 Mon Sep 17 00:00:00 2001 -From: Assaf Gordon -Date: Mon, 15 Sep 2014 18:58:19 +0000 -Subject: [PATCH 09/27] virt-what.in: get effective uid in a portable way - -$EUID is bash-specific. Use the POSIX-compatible 'id -u' instead. ---- - virt-what.in | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/virt-what.in b/virt-what.in -index 1532b90..3feeb60 100644 ---- a/virt-what.in -+++ b/virt-what.in -@@ -74,8 +74,9 @@ exec_prefix=@exec_prefix@ - PATH="${root}@libexecdir@:${root}/sbin:${root}/usr/sbin:${PATH}" - - # Check we're running as root. -+EFFUID=$(id -u) || fail "failed to get current user id" - --if [ "x$root" = "x" ] && [ "$EUID" -ne 0 ]; then -+if [ "x$root" = "x" ] && [ "$EFFUID" -ne 0 ]; then - fail "this script must be run as root" - fi - --- -2.10.2 - diff --git a/SOURCES/0010-virt-what.in-warn-about-missing-cpuid-virt-helper-pr.patch b/SOURCES/0010-virt-what.in-warn-about-missing-cpuid-virt-helper-pr.patch deleted file mode 100644 index ccc1045..0000000 --- a/SOURCES/0010-virt-what.in-warn-about-missing-cpuid-virt-helper-pr.patch +++ /dev/null @@ -1,32 +0,0 @@ -From d3908f46427a9126742a70967cf787edfd37ab43 Mon Sep 17 00:00:00 2001 -From: Assaf Gordon -Date: Mon, 15 Sep 2014 19:08:20 +0000 -Subject: [PATCH 10/27] virt-what.in: warn about missing cpuid-virt helper - program - -Try to find the binary program on the $PATH, and give informative error -message if it wasn't found. ---- - virt-what.in | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/virt-what.in b/virt-what.in -index 3feeb60..5ae1ccb 100644 ---- a/virt-what.in -+++ b/virt-what.in -@@ -80,6 +80,12 @@ if [ "x$root" = "x" ] && [ "$EFFUID" -ne 0 ]; then - fail "this script must be run as root" - fi - -+# Try to locate the CPU-ID helper program -+CPUID_HELPER=$(which virt-what-cpuid-helper 2>/dev/null) -+if [ -z "$CPUID_HELPER" ] ; then -+ fail "virt-what-cpuid-helper program not found in \$PATH" -+fi -+ - # Many fullvirt hypervisors give an indication through CPUID. Use the - # helper program to get this information. - --- -2.10.2 - diff --git a/SOURCES/0011-virt-what.in-verify-files-exists-before-grepping-the.patch b/SOURCES/0011-virt-what.in-verify-files-exists-before-grepping-the.patch deleted file mode 100644 index 911b4a2..0000000 --- a/SOURCES/0011-virt-what.in-verify-files-exists-before-grepping-the.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 960e513f430170bb58d59dcb26951f879a9baa7b Mon Sep 17 00:00:00 2001 -From: Assaf Gordon -Date: Mon, 15 Sep 2014 19:15:19 +0000 -Subject: [PATCH 11/27] virt-what.in: verify files exists before grepping them - -Don't grep linux-specific files (e.g. /proc/cpuinfo) unless they exist. -This avoids extraneous errors on BSD/Hurd systems which don't have these -files. ---- - virt-what.in | 14 ++++++++++---- - 1 file changed, 10 insertions(+), 4 deletions(-) - -diff --git a/virt-what.in b/virt-what.in -index 5ae1ccb..6e9aef1 100644 ---- a/virt-what.in -+++ b/virt-what.in -@@ -33,6 +33,10 @@ skip_qemu_kvm=false - - VERSION="@VERSION@" - -+have_cpuinfo() { -+ test -e "${root}/proc/cpuinfo" -+} -+ - fail() { - echo "virt-what: $1" >&2 - exit 1 -@@ -152,7 +156,8 @@ if [ -e "${root}/proc/1/environ" ] && - fi - - # Check for Linux-VServer --if cat "${root}/proc/self/status" | grep -q "VxID: [0-9]*"; then -+if test -e "${root}/proc/self/status" \ -+ && cat "${root}/proc/self/status" | grep -q "VxID: [0-9]*"; then - echo linux_vserver - if grep -q "VxID: 0$" "${root}/proc/self/status"; then - echo linux_vserver-host -@@ -163,12 +168,13 @@ fi - - # Check for UML. - # Added by Laurent Léonard. --if grep -q 'UML' "${root}/proc/cpuinfo"; then -+if have_cpuinfo && grep -q 'UML' "${root}/proc/cpuinfo"; then - echo uml - fi - - # Check for IBM PowerVM Lx86 Linux/x86 emulator. --if grep -q '^vendor_id.*PowerVM Lx86' "${root}/proc/cpuinfo"; then -+if have_cpuinfo && grep -q '^vendor_id.*PowerVM Lx86' "${root}/proc/cpuinfo" -+then - echo powervm_lx86 - fi - -@@ -179,7 +185,7 @@ if echo "$dmi" | grep -q 'Manufacturer.*HITACHI' && - fi - - # Check for IBM SystemZ. --if grep -q '^vendor_id.*IBM/S390' "${root}/proc/cpuinfo"; then -+if have_cpuinfo && grep -q '^vendor_id.*IBM/S390' "${root}/proc/cpuinfo"; then - echo ibm_systemz - if [ -f "${root}/proc/sysinfo" ]; then - if grep -q 'VM.*Control Program.*z/VM' "${root}/proc/sysinfo"; then --- -2.10.2 - diff --git a/SOURCES/0012-virt-what.in-make-option-processing-portable.patch b/SOURCES/0012-virt-what.in-make-option-processing-portable.patch deleted file mode 100644 index cc31caf..0000000 --- a/SOURCES/0012-virt-what.in-make-option-processing-portable.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 5d4106eafd7f2f6e71a1d0d90ebf4f4e766b772d Mon Sep 17 00:00:00 2001 -From: Assaf Gordon -Date: Mon, 15 Sep 2014 19:34:06 +0000 -Subject: [PATCH 12/27] virt-what.in: make option processing portable - -Replace linux-specific 'getopt' usage with manual option parsing. -Because the used option are version simple (help/version) and the only -additional option is undocumented (--test-root), it's easy remove the -'getopt' usage, and make this script portable to BSD systems. ---- - virt-what.in | 17 +++++++---------- - 1 file changed, 7 insertions(+), 10 deletions(-) - -diff --git a/virt-what.in b/virt-what.in -index 6e9aef1..f2c0b90 100644 ---- a/virt-what.in -+++ b/virt-what.in -@@ -51,24 +51,21 @@ usage() { - } - - # Handle the command line arguments, if any. -- --TEMP=$(getopt -o v --long help --long version --long test-root: -n 'virt-what' -- "$@") --if [ $? != 0 ]; then exit 1; fi --eval set -- "$TEMP" -- --while true; do -+while test $# -gt 0; do - case "$1" in - --help) usage ;; -- --test-root) -+ --test-root=*) - # Deliberately undocumented: used for 'make check'. -- root="$2" -- shift 2 -+ root=$(echo "$1" | sed 's/.*=//') -+ shift 1 -+ test -z "$root" && fail "--test-root option requires a value" - ;; - -v|--version) echo "$VERSION"; exit 0 ;; - --) shift; break ;; -- *) fail "internal error ($1)" ;; -+ *) fail "unrecognized option '$1'";; - esac - done -+test $# -gt 0 && fail "extra operand '$1'" - - # Add /sbin and /usr/sbin to the path so we can find system - # binaries like dmidecode. --- -2.10.2 - diff --git a/SOURCES/0013-build-use-portable-Makefile-variables.patch b/SOURCES/0013-build-use-portable-Makefile-variables.patch deleted file mode 100644 index c228f00..0000000 --- a/SOURCES/0013-build-use-portable-Makefile-variables.patch +++ /dev/null @@ -1,31 +0,0 @@ -From b53bdd3ebadab879f161e0e4b881c79cb977e0e0 Mon Sep 17 00:00:00 2001 -From: "A. Gordon" -Date: Mon, 15 Sep 2014 15:51:50 -0400 -Subject: [PATCH 13/27] build: use portable Makefile variables - -* Makefile.am: use '$?' instead of '$<' - $< in a non-inference rule is a GNU-make extension, which fails with - BSD make. ---- - Makefile.am | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 24d1730..1c14948 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -32,9 +32,9 @@ man_MANS = virt-what.1 - - virt-what.1: virt-what.pod - pod2man -c "Virtualization Support" --release "$(PACKAGE)-$(VERSION)" \ -- $< > $@ -+ $? > $@ - virt-what.txt: virt-what.pod -- pod2text $< > $@ -+ pod2text $? > $@ - - endif - --- -2.10.2 - diff --git a/SOURCES/0014-Add-space-before-parens-in-function-defns-for-readab.patch b/SOURCES/0014-Add-space-before-parens-in-function-defns-for-readab.patch deleted file mode 100644 index fc5ddff..0000000 --- a/SOURCES/0014-Add-space-before-parens-in-function-defns-for-readab.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 35852eafd298e27b9388b80ec018ffb1249f8538 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Tue, 16 Sep 2014 19:02:18 +0100 -Subject: [PATCH 14/27] Add space before parens in function defns for - readability. - ---- - virt-what.in | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/virt-what.in b/virt-what.in -index f2c0b90..0770070 100644 ---- a/virt-what.in -+++ b/virt-what.in -@@ -33,16 +33,16 @@ skip_qemu_kvm=false - - VERSION="@VERSION@" - --have_cpuinfo() { -+have_cpuinfo () { - test -e "${root}/proc/cpuinfo" - } - --fail() { -+fail () { - echo "virt-what: $1" >&2 - exit 1 - } - --usage() { -+usage () { - echo "virt-what [options]" - echo "Options:" - echo " --help Display this help" --- -2.10.2 - diff --git a/SOURCES/0015-Add-lkvm-detection.patch b/SOURCES/0015-Add-lkvm-detection.patch deleted file mode 100644 index 7fc927e..0000000 --- a/SOURCES/0015-Add-lkvm-detection.patch +++ /dev/null @@ -1,237 +0,0 @@ -From 33277fafa3892b27d3d265863d33e89ac2eea55e Mon Sep 17 00:00:00 2001 -From: Andrew Jones -Date: Fri, 27 Mar 2015 21:18:59 +0100 -Subject: [PATCH 15/27] Add lkvm detection - -Signed-off-by: Andrew Jones ---- - Makefile.am | 6 ++++++ - tests/lkvm/proc/cpuinfo | 19 +++++++++++++++++ - tests/lkvm/proc/self/status | 39 ++++++++++++++++++++++++++++++++++ - tests/lkvm/sbin/dmidecode | 2 ++ - tests/lkvm/sbin/uname | 2 ++ - tests/lkvm/sbin/virt-what-cpuid-helper | 2 ++ - tests/test-lkvm.sh | 34 +++++++++++++++++++++++++++++ - virt-what.in | 8 +++++++ - virt-what.pod | 8 +++++++ - 9 files changed, 120 insertions(+) - create mode 100644 tests/lkvm/proc/cpuinfo - create mode 100644 tests/lkvm/proc/self/status - create mode 100755 tests/lkvm/sbin/dmidecode - create mode 100755 tests/lkvm/sbin/uname - create mode 100755 tests/lkvm/sbin/virt-what-cpuid-helper - create mode 100755 tests/test-lkvm.sh - -diff --git a/Makefile.am b/Makefile.am -index 1c14948..46ff548 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -46,6 +46,7 @@ TESTS = \ - tests/test-kvm.sh \ - tests/test-kvm-explicit-cpu.sh \ - tests/test-linux-vserver.sh \ -+ tests/test-lkvm.sh \ - tests/test-lxc.sh \ - tests/test-lx86.sh \ - tests/test-parallels-desktop.sh \ -@@ -95,6 +96,11 @@ EXTRA_DIST = \ - tests/linux-vserver/sbin/dmidecode \ - tests/linux-vserver/sbin/uname \ - tests/linux-vserver/sbin/virt-what-cpuid-helper \ -+ tests/lkvm/proc/cpuinfo \ -+ tests/lkvm/proc/self/status \ -+ tests/lkvm/sbin/dmidecode \ -+ tests/lkvm/sbin/uname \ -+ tests/lkvm/sbin/virt-what-cpuid-helper \ - tests/lxc/proc/1/environ \ - tests/lxc/proc/cpuinfo \ - tests/lxc/proc/self/status \ -diff --git a/tests/lkvm/proc/cpuinfo b/tests/lkvm/proc/cpuinfo -new file mode 100644 -index 0000000..a53a4b9 ---- /dev/null -+++ b/tests/lkvm/proc/cpuinfo -@@ -0,0 +1,19 @@ -+processor : 0 -+vendor_id : GenuineIntel -+cpu family : 6 -+model : 15 -+model name : Intel(R) Core(TM)2 Duo CPU T7700 @ 2.40GHz -+stepping : 11 -+cpu MHz : 2659.998 -+cache size : 4096 KB -+fpu : yes -+fpu_exception : yes -+cpuid level : 10 -+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 lm constant_tsc up rep_good pni ssse3 cx16 hypervisor lahf_lm -+bogomips : 5319.99 -+clflush size : 64 -+cache_alignment : 64 -+address sizes : 40 bits physical, 48 bits virtual -+power management: -+ -diff --git a/tests/lkvm/proc/self/status b/tests/lkvm/proc/self/status -new file mode 100644 -index 0000000..264981d ---- /dev/null -+++ b/tests/lkvm/proc/self/status -@@ -0,0 +1,39 @@ -+Name: cat -+State: R (running) -+Tgid: 1618 -+Pid: 1618 -+PPid: 1609 -+TracerPid: 0 -+Uid: 0 0 0 0 -+Gid: 0 0 0 0 -+Utrace: 0 -+FDSize: 256 -+Groups: 0 1 2 3 4 6 10 -+VmPeak: 101012 kB -+VmSize: 101012 kB -+VmLck: 0 kB -+VmHWM: 472 kB -+VmRSS: 472 kB -+VmData: 184 kB -+VmStk: 136 kB -+VmExe: 44 kB -+VmLib: 1728 kB -+VmPTE: 44 kB -+VmSwap: 0 kB -+Threads: 1 -+SigQ: 0/7858 -+SigPnd: 0000000000000000 -+ShdPnd: 0000000000000000 -+SigBlk: 0000000000000000 -+SigIgn: 0000000000000000 -+SigCgt: 0000000000000000 -+CapInh: 0000000000000000 -+CapPrm: ffffffffffffffff -+CapEff: ffffffffffffffff -+CapBnd: ffffffffffffffff -+Cpus_allowed: 1 -+Cpus_allowed_list: 0 -+Mems_allowed: 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: 1 -diff --git a/tests/lkvm/sbin/dmidecode b/tests/lkvm/sbin/dmidecode -new file mode 100755 -index 0000000..e53c12f ---- /dev/null -+++ b/tests/lkvm/sbin/dmidecode -@@ -0,0 +1,2 @@ -+#!/bin/sh - -+exit 1 -diff --git a/tests/lkvm/sbin/uname b/tests/lkvm/sbin/uname -new file mode 100755 -index 0000000..ab0ec89 ---- /dev/null -+++ b/tests/lkvm/sbin/uname -@@ -0,0 +1,2 @@ -+#!/bin/sh - -+echo x86_64 -diff --git a/tests/lkvm/sbin/virt-what-cpuid-helper b/tests/lkvm/sbin/virt-what-cpuid-helper -new file mode 100755 -index 0000000..2b068cd ---- /dev/null -+++ b/tests/lkvm/sbin/virt-what-cpuid-helper -@@ -0,0 +1,2 @@ -+#!/bin/sh - -+echo LKVMLKVMLKVM -diff --git a/tests/test-lkvm.sh b/tests/test-lkvm.sh -new file mode 100755 -index 0000000..6eb326c ---- /dev/null -+++ b/tests/test-lkvm.sh -@@ -0,0 +1,34 @@ -+# Test for LKVM -+# Copyright (C) 2015 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. -+ -+root=tests/lkvm -+ -+output="$(./virt-what --test-root=$root 2>&1)" -+expected="lkvm" -+ -+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 0770070..ed08dae 100644 ---- a/virt-what.in -+++ b/virt-what.in -@@ -30,6 +30,7 @@ - set -u - root='' - skip_qemu_kvm=false -+skip_lkvm=false - - VERSION="@VERSION@" - -@@ -215,6 +216,7 @@ elif [ -d "${root}/proc/xen" ]; then - echo xen-domU - fi - skip_qemu_kvm=true -+ skip_lkvm=true - elif [ -f "${root}/sys/hypervisor/type" ] && - grep -q "xen" "${root}/sys/hypervisor/type"; then - # Ordinary kernel with pv_ops. There does not seem to be -@@ -259,6 +261,12 @@ if ! "$skip_qemu_kvm"; then - fi - fi - -+if ! "$skip_lkvm"; then -+ if [ "$cpuid" = "LKVMLKVMLKVM" ]; then -+ echo lkvm -+ fi -+fi -+ - # Check for Docker. - if [ -f "${root}/.dockerinit" ]; then - echo docker -diff --git a/virt-what.pod b/virt-what.pod -index 8fd9bc4..0e2e8a5 100644 ---- a/virt-what.pod -+++ b/virt-what.pod -@@ -101,6 +101,14 @@ instead. - - Status: confirmed by RWMJ. - -+=item B -+ -+This guest is running on the KVM hypervisor using hardware -+acceleration, and the userspace component of the hypervisor -+is lkvm (a.k.a kvmtool). -+ -+Status: contributed by Andrew Jones -+ - =item B - - The guest appears to be running inside an OpenVZ or Virtuozzo --- -2.10.2 - diff --git a/SOURCES/0016-Add-ARM-support.patch b/SOURCES/0016-Add-ARM-support.patch deleted file mode 100644 index 22ebbe7..0000000 --- a/SOURCES/0016-Add-ARM-support.patch +++ /dev/null @@ -1,736 +0,0 @@ -From b87a2d79ce8c5eee3a2f945b8eb00d893104fd10 Mon Sep 17 00:00:00 2001 -From: Andrew Jones -Date: Fri, 27 Mar 2015 21:19:00 +0100 -Subject: [PATCH 16/27] Add ARM support - -Currently only detects LKVM, QEMU/KVM, and Xen. Also only works if -the guest is booted with DT (which is the only way that currently -exists). - -Signed-off-by: Andrew Jones ---- - Makefile.am | 21 ++++++++ - tests/lkvm-arm/proc/cpuinfo | 63 ++++++++++++++++++++++ - tests/lkvm-arm/proc/device-tree/compatible | 1 + - tests/lkvm-arm/proc/self/status | 41 ++++++++++++++ - tests/lkvm-arm/sbin/dmidecode | 2 + - tests/lkvm-arm/sbin/uname | 2 + - tests/lkvm-arm/sbin/virt-what-cpuid-helper | 2 + - tests/qemu-arm/proc/cpuinfo | 63 ++++++++++++++++++++++ - .../proc/device-tree/fw-cfg@9020000/compatible | 1 + - tests/qemu-arm/proc/self/status | 41 ++++++++++++++ - tests/qemu-arm/sbin/dmidecode | 2 + - tests/qemu-arm/sbin/uname | 2 + - tests/qemu-arm/sbin/virt-what-cpuid-helper | 2 + - tests/test-lkvm-arm.sh | 34 ++++++++++++ - tests/test-qemu-arm.sh | 34 ++++++++++++ - tests/test-xen-arm.sh | 34 ++++++++++++ - tests/xen-arm/proc/cpuinfo | 63 ++++++++++++++++++++++ - .../xen-arm/proc/device-tree/hypervisor/compatible | 1 + - tests/xen-arm/proc/self/status | 41 ++++++++++++++ - tests/xen-arm/sbin/dmidecode | 2 + - tests/xen-arm/sbin/uname | 2 + - tests/xen-arm/sbin/virt-what-cpuid-helper | 2 + - virt-what.in | 22 +++++++- - 23 files changed, 477 insertions(+), 1 deletion(-) - create mode 100644 tests/lkvm-arm/proc/cpuinfo - create mode 100644 tests/lkvm-arm/proc/device-tree/compatible - create mode 100644 tests/lkvm-arm/proc/self/status - create mode 100755 tests/lkvm-arm/sbin/dmidecode - create mode 100755 tests/lkvm-arm/sbin/uname - create mode 100755 tests/lkvm-arm/sbin/virt-what-cpuid-helper - create mode 100644 tests/qemu-arm/proc/cpuinfo - create mode 100644 tests/qemu-arm/proc/device-tree/fw-cfg@9020000/compatible - create mode 100644 tests/qemu-arm/proc/self/status - create mode 100755 tests/qemu-arm/sbin/dmidecode - create mode 100755 tests/qemu-arm/sbin/uname - create mode 100755 tests/qemu-arm/sbin/virt-what-cpuid-helper - create mode 100755 tests/test-lkvm-arm.sh - create mode 100755 tests/test-qemu-arm.sh - create mode 100755 tests/test-xen-arm.sh - create mode 100644 tests/xen-arm/proc/cpuinfo - create mode 100644 tests/xen-arm/proc/device-tree/hypervisor/compatible - create mode 100644 tests/xen-arm/proc/self/status - create mode 100755 tests/xen-arm/sbin/dmidecode - create mode 100755 tests/xen-arm/sbin/uname - create mode 100755 tests/xen-arm/sbin/virt-what-cpuid-helper - -diff --git a/Makefile.am b/Makefile.am -index 46ff548..514d229 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -47,14 +47,17 @@ TESTS = \ - tests/test-kvm-explicit-cpu.sh \ - tests/test-linux-vserver.sh \ - tests/test-lkvm.sh \ -+ tests/test-lkvm-arm.sh \ - tests/test-lxc.sh \ - tests/test-lx86.sh \ - tests/test-parallels-desktop.sh \ - tests/test-qemu.sh \ -+ tests/test-qemu-arm.sh \ - tests/test-rhel5-xen-dom0.sh \ - tests/test-rhel5-xen-domU-hvm.sh \ - tests/test-rhel5-xen-domU-hvm-ia64.sh \ - tests/test-rhel5-xen-domU-pv.sh \ -+ tests/test-xen-arm.sh \ - tests/test-zvm.sh - - EXTRA_DIST = \ -@@ -101,6 +104,12 @@ EXTRA_DIST = \ - tests/lkvm/sbin/dmidecode \ - tests/lkvm/sbin/uname \ - tests/lkvm/sbin/virt-what-cpuid-helper \ -+ tests/lkvm-arm/proc/cpuinfo \ -+ tests/lkvm-arm/proc/device-tree/compatible \ -+ tests/lkvm-arm/proc/self/status \ -+ tests/lkvm-arm/sbin/dmidecode \ -+ tests/lkvm-arm/sbin/uname \ -+ tests/lkvm-arm/sbin/virt-what-cpuid-helper \ - tests/lxc/proc/1/environ \ - tests/lxc/proc/cpuinfo \ - tests/lxc/proc/self/status \ -@@ -122,6 +131,12 @@ EXTRA_DIST = \ - tests/qemu/sbin/dmidecode \ - tests/qemu/sbin/uname \ - tests/qemu/sbin/virt-what-cpuid-helper \ -+ tests/qemu-arm/proc/cpuinfo \ -+ tests/qemu-arm/proc/device-tree/fw-cfg@9020000/compatible \ -+ tests/qemu-arm/proc/self/status \ -+ tests/qemu-arm/sbin/dmidecode \ -+ tests/qemu-arm/sbin/uname \ -+ tests/qemu-arm/sbin/virt-what-cpuid-helper \ - tests/rhel5-xen-dom0/proc/cpuinfo \ - tests/rhel5-xen-dom0/proc/self/status \ - tests/rhel5-xen-dom0/proc/xen/balloon \ -@@ -185,6 +200,12 @@ EXTRA_DIST = \ - tests/rhel5-xen-domU-pv/sys/hypervisor/compilation/compiled_by \ - tests/rhel5-xen-domU-pv/sys/hypervisor/compilation/compile_date \ - tests/rhel5-xen-domU-pv/sys/hypervisor/uuid \ -+ tests/xen-arm/proc/cpuinfo \ -+ tests/xen-arm/proc/device-tree/compatible \ -+ tests/xen-arm/proc/self/status \ -+ tests/xen-arm/sbin/dmidecode \ -+ tests/xen-arm/sbin/uname \ -+ tests/xen-arm/sbin/virt-what-cpuid-helper \ - tests/zvm/proc/cpuinfo \ - tests/zvm/proc/self/status \ - tests/zvm/proc/sysinfo \ -diff --git a/tests/lkvm-arm/proc/cpuinfo b/tests/lkvm-arm/proc/cpuinfo -new file mode 100644 -index 0000000..b83a182 ---- /dev/null -+++ b/tests/lkvm-arm/proc/cpuinfo -@@ -0,0 +1,63 @@ -+processor : 0 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -+ -+processor : 1 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -+ -+processor : 2 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -+ -+processor : 3 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -+ -+processor : 4 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -+ -+processor : 5 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -+ -+processor : 6 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -+ -+processor : 7 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -diff --git a/tests/lkvm-arm/proc/device-tree/compatible b/tests/lkvm-arm/proc/device-tree/compatible -new file mode 100644 -index 0000000..99642ed ---- /dev/null -+++ b/tests/lkvm-arm/proc/device-tree/compatible -@@ -0,0 +1 @@ -+linux,dummy-virt -diff --git a/tests/lkvm-arm/proc/self/status b/tests/lkvm-arm/proc/self/status -new file mode 100644 -index 0000000..751f5e7 ---- /dev/null -+++ b/tests/lkvm-arm/proc/self/status -@@ -0,0 +1,41 @@ -+Name: cat -+State: R (running) -+Tgid: 8307 -+Ngid: 0 -+Pid: 8307 -+PPid: 1415 -+TracerPid: 0 -+Uid: 0 0 0 0 -+Gid: 0 0 0 0 -+FDSize: 256 -+Groups: -+VmPeak: 109696 kB -+VmSize: 109696 kB -+VmLck: 0 kB -+VmPin: 0 kB -+VmHWM: 832 kB -+VmRSS: 832 kB -+VmData: 320 kB -+VmStk: 256 kB -+VmExe: 64 kB -+VmLib: 1536 kB -+VmPTE: 192 kB -+VmSwap: 0 kB -+Threads: 1 -+SigQ: 0/5821 -+SigPnd: 0000000000000000 -+ShdPnd: 0000000000000000 -+SigBlk: 0000000000000000 -+SigIgn: 0000000000000000 -+SigCgt: 0000000000000000 -+CapInh: 0000000000000000 -+CapPrm: 0000003fffffffff -+CapEff: 0000003fffffffff -+CapBnd: 0000003fffffffff -+Seccomp: 0 -+Cpus_allowed: ff -+Cpus_allowed_list: 0-7 -+Mems_allowed: 1 -+Mems_allowed_list: 0 -+voluntary_ctxt_switches: 1 -+nonvoluntary_ctxt_switches: 1 -diff --git a/tests/lkvm-arm/sbin/dmidecode b/tests/lkvm-arm/sbin/dmidecode -new file mode 100755 -index 0000000..e53c12f ---- /dev/null -+++ b/tests/lkvm-arm/sbin/dmidecode -@@ -0,0 +1,2 @@ -+#!/bin/sh - -+exit 1 -diff --git a/tests/lkvm-arm/sbin/uname b/tests/lkvm-arm/sbin/uname -new file mode 100755 -index 0000000..bd33a2d ---- /dev/null -+++ b/tests/lkvm-arm/sbin/uname -@@ -0,0 +1,2 @@ -+#!/bin/sh - -+echo aarch64 -diff --git a/tests/lkvm-arm/sbin/virt-what-cpuid-helper b/tests/lkvm-arm/sbin/virt-what-cpuid-helper -new file mode 100755 -index 0000000..77a6692 ---- /dev/null -+++ b/tests/lkvm-arm/sbin/virt-what-cpuid-helper -@@ -0,0 +1,2 @@ -+#!/bin/sh - -+# nothing -diff --git a/tests/qemu-arm/proc/cpuinfo b/tests/qemu-arm/proc/cpuinfo -new file mode 100644 -index 0000000..b83a182 ---- /dev/null -+++ b/tests/qemu-arm/proc/cpuinfo -@@ -0,0 +1,63 @@ -+processor : 0 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -+ -+processor : 1 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -+ -+processor : 2 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -+ -+processor : 3 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -+ -+processor : 4 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -+ -+processor : 5 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -+ -+processor : 6 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -+ -+processor : 7 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -diff --git a/tests/qemu-arm/proc/device-tree/fw-cfg@9020000/compatible b/tests/qemu-arm/proc/device-tree/fw-cfg@9020000/compatible -new file mode 100644 -index 0000000..3932ade ---- /dev/null -+++ b/tests/qemu-arm/proc/device-tree/fw-cfg@9020000/compatible -@@ -0,0 +1 @@ -+qemu,fw-cfg-mmio -diff --git a/tests/qemu-arm/proc/self/status b/tests/qemu-arm/proc/self/status -new file mode 100644 -index 0000000..751f5e7 ---- /dev/null -+++ b/tests/qemu-arm/proc/self/status -@@ -0,0 +1,41 @@ -+Name: cat -+State: R (running) -+Tgid: 8307 -+Ngid: 0 -+Pid: 8307 -+PPid: 1415 -+TracerPid: 0 -+Uid: 0 0 0 0 -+Gid: 0 0 0 0 -+FDSize: 256 -+Groups: -+VmPeak: 109696 kB -+VmSize: 109696 kB -+VmLck: 0 kB -+VmPin: 0 kB -+VmHWM: 832 kB -+VmRSS: 832 kB -+VmData: 320 kB -+VmStk: 256 kB -+VmExe: 64 kB -+VmLib: 1536 kB -+VmPTE: 192 kB -+VmSwap: 0 kB -+Threads: 1 -+SigQ: 0/5821 -+SigPnd: 0000000000000000 -+ShdPnd: 0000000000000000 -+SigBlk: 0000000000000000 -+SigIgn: 0000000000000000 -+SigCgt: 0000000000000000 -+CapInh: 0000000000000000 -+CapPrm: 0000003fffffffff -+CapEff: 0000003fffffffff -+CapBnd: 0000003fffffffff -+Seccomp: 0 -+Cpus_allowed: ff -+Cpus_allowed_list: 0-7 -+Mems_allowed: 1 -+Mems_allowed_list: 0 -+voluntary_ctxt_switches: 1 -+nonvoluntary_ctxt_switches: 1 -diff --git a/tests/qemu-arm/sbin/dmidecode b/tests/qemu-arm/sbin/dmidecode -new file mode 100755 -index 0000000..e53c12f ---- /dev/null -+++ b/tests/qemu-arm/sbin/dmidecode -@@ -0,0 +1,2 @@ -+#!/bin/sh - -+exit 1 -diff --git a/tests/qemu-arm/sbin/uname b/tests/qemu-arm/sbin/uname -new file mode 100755 -index 0000000..bd33a2d ---- /dev/null -+++ b/tests/qemu-arm/sbin/uname -@@ -0,0 +1,2 @@ -+#!/bin/sh - -+echo aarch64 -diff --git a/tests/qemu-arm/sbin/virt-what-cpuid-helper b/tests/qemu-arm/sbin/virt-what-cpuid-helper -new file mode 100755 -index 0000000..77a6692 ---- /dev/null -+++ b/tests/qemu-arm/sbin/virt-what-cpuid-helper -@@ -0,0 +1,2 @@ -+#!/bin/sh - -+# nothing -diff --git a/tests/test-lkvm-arm.sh b/tests/test-lkvm-arm.sh -new file mode 100755 -index 0000000..bed50ad ---- /dev/null -+++ b/tests/test-lkvm-arm.sh -@@ -0,0 +1,34 @@ -+# Test for LKVM on ARM -+# Copyright (C) 2015 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. -+ -+root=tests/lkvm-arm -+ -+output="$(./virt-what --test-root=$root 2>&1)" -+expected="lkvm" -+ -+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/tests/test-qemu-arm.sh b/tests/test-qemu-arm.sh -new file mode 100755 -index 0000000..58455c8 ---- /dev/null -+++ b/tests/test-qemu-arm.sh -@@ -0,0 +1,34 @@ -+# Test for qemu on ARM -+# Copyright (C) 2015 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. -+ -+root=tests/qemu-arm -+ -+output="$(./virt-what --test-root=$root 2>&1)" -+expected="qemu" -+ -+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/tests/test-xen-arm.sh b/tests/test-xen-arm.sh -new file mode 100755 -index 0000000..209712e ---- /dev/null -+++ b/tests/test-xen-arm.sh -@@ -0,0 +1,34 @@ -+# Test for Xen on ARM -+# Copyright (C) 2015 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. -+ -+root=tests/xen-arm -+ -+output="$(./virt-what --test-root=$root 2>&1)" -+expected="xen" -+ -+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/tests/xen-arm/proc/cpuinfo b/tests/xen-arm/proc/cpuinfo -new file mode 100644 -index 0000000..b83a182 ---- /dev/null -+++ b/tests/xen-arm/proc/cpuinfo -@@ -0,0 +1,63 @@ -+processor : 0 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -+ -+processor : 1 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -+ -+processor : 2 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -+ -+processor : 3 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -+ -+processor : 4 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -+ -+processor : 5 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -+ -+processor : 6 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -+ -+processor : 7 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -diff --git a/tests/xen-arm/proc/device-tree/hypervisor/compatible b/tests/xen-arm/proc/device-tree/hypervisor/compatible -new file mode 100644 -index 0000000..070f5e2 ---- /dev/null -+++ b/tests/xen-arm/proc/device-tree/hypervisor/compatible -@@ -0,0 +1 @@ -+xen,xen -diff --git a/tests/xen-arm/proc/self/status b/tests/xen-arm/proc/self/status -new file mode 100644 -index 0000000..751f5e7 ---- /dev/null -+++ b/tests/xen-arm/proc/self/status -@@ -0,0 +1,41 @@ -+Name: cat -+State: R (running) -+Tgid: 8307 -+Ngid: 0 -+Pid: 8307 -+PPid: 1415 -+TracerPid: 0 -+Uid: 0 0 0 0 -+Gid: 0 0 0 0 -+FDSize: 256 -+Groups: -+VmPeak: 109696 kB -+VmSize: 109696 kB -+VmLck: 0 kB -+VmPin: 0 kB -+VmHWM: 832 kB -+VmRSS: 832 kB -+VmData: 320 kB -+VmStk: 256 kB -+VmExe: 64 kB -+VmLib: 1536 kB -+VmPTE: 192 kB -+VmSwap: 0 kB -+Threads: 1 -+SigQ: 0/5821 -+SigPnd: 0000000000000000 -+ShdPnd: 0000000000000000 -+SigBlk: 0000000000000000 -+SigIgn: 0000000000000000 -+SigCgt: 0000000000000000 -+CapInh: 0000000000000000 -+CapPrm: 0000003fffffffff -+CapEff: 0000003fffffffff -+CapBnd: 0000003fffffffff -+Seccomp: 0 -+Cpus_allowed: ff -+Cpus_allowed_list: 0-7 -+Mems_allowed: 1 -+Mems_allowed_list: 0 -+voluntary_ctxt_switches: 1 -+nonvoluntary_ctxt_switches: 1 -diff --git a/tests/xen-arm/sbin/dmidecode b/tests/xen-arm/sbin/dmidecode -new file mode 100755 -index 0000000..e53c12f ---- /dev/null -+++ b/tests/xen-arm/sbin/dmidecode -@@ -0,0 +1,2 @@ -+#!/bin/sh - -+exit 1 -diff --git a/tests/xen-arm/sbin/uname b/tests/xen-arm/sbin/uname -new file mode 100755 -index 0000000..bd33a2d ---- /dev/null -+++ b/tests/xen-arm/sbin/uname -@@ -0,0 +1,2 @@ -+#!/bin/sh - -+echo aarch64 -diff --git a/tests/xen-arm/sbin/virt-what-cpuid-helper b/tests/xen-arm/sbin/virt-what-cpuid-helper -new file mode 100755 -index 0000000..77a6692 ---- /dev/null -+++ b/tests/xen-arm/sbin/virt-what-cpuid-helper -@@ -0,0 +1,2 @@ -+#!/bin/sh - -+# nothing -diff --git a/virt-what.in b/virt-what.in -index ed08dae..a5ed33e 100644 ---- a/virt-what.in -+++ b/virt-what.in -@@ -103,7 +103,7 @@ dmi=$(LANG=C dmidecode 2>&1) - # Architecture. - # Note for the purpose of testing, we only call uname with -p option. - --arch=$(uname -p) -+arch=$(uname -p | sed -e 's/i.86/i386/' | sed -e 's/arm.*/arm/') - - # Check for VMware. - # cpuid check added by Chetan Loke. -@@ -223,6 +223,13 @@ elif [ -f "${root}/sys/hypervisor/type" ] && - # enough information at present to tell whether this is dom0 - # or domU. XXX - echo xen -+elif [ "$arch" = "arm" ] || [ "$arch" = "aarch64" ]; then -+ if [ -d "${root}/proc/device-tree/hypervisor" ] && -+ grep -q "xen" "${root}/proc/device-tree/hypervisor/compatible"; then -+ echo xen -+ skip_qemu_kvm=true -+ skip_lkvm=true -+ fi - elif [ "$arch" = "ia64" ]; then - if [ -d "${root}/sys/bus/xen" -a ! -d "${root}/sys/bus/xen-backend" ]; then - # PV-on-HVM drivers installed in a Xen guest. -@@ -250,6 +257,14 @@ fi - if ! "$skip_qemu_kvm"; then - if [ "$cpuid" = "KVMKVMKVM" ]; then - echo kvm -+ elif [ "$arch" = "arm" ] || [ "$arch" = "aarch64" ]; then -+ if [ -d "${root}/proc/device-tree" ] && -+ ls "${root}/proc/device-tree" | grep -q "fw-cfg"; then -+ # We don't have enough information to determine if we're -+ # using KVM acceleration or not. -+ echo qemu -+ skip_lkvm=true -+ fi - else - # XXX This is known to fail for qemu with the explicit -cpu - # option, since /proc/cpuinfo will not contain the QEMU -@@ -264,6 +279,11 @@ fi - if ! "$skip_lkvm"; then - if [ "$cpuid" = "LKVMLKVMLKVM" ]; then - echo lkvm -+ elif [ "$arch" = "arm" ] || [ "$arch" = "aarch64" ]; then -+ if [ -d "${root}/proc/device-tree" ] && -+ grep -q "dummy-virt" "${root}/proc/device-tree/compatible"; then -+ echo lkvm -+ fi - fi - fi - --- -2.10.2 - diff --git a/SOURCES/0017-xen-arm-Fix-path-in-EXTRA_DIST.patch b/SOURCES/0017-xen-arm-Fix-path-in-EXTRA_DIST.patch deleted file mode 100644 index 5a9890b..0000000 --- a/SOURCES/0017-xen-arm-Fix-path-in-EXTRA_DIST.patch +++ /dev/null @@ -1,25 +0,0 @@ -From ac098dd1513370145f10d6dd7c147b45168ef6a0 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Tue, 21 Apr 2015 12:12:45 +0100 -Subject: [PATCH 17/27] xen-arm: Fix path in EXTRA_DIST. - ---- - Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile.am b/Makefile.am -index 514d229..8a47e96 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -201,7 +201,7 @@ EXTRA_DIST = \ - tests/rhel5-xen-domU-pv/sys/hypervisor/compilation/compile_date \ - tests/rhel5-xen-domU-pv/sys/hypervisor/uuid \ - tests/xen-arm/proc/cpuinfo \ -- tests/xen-arm/proc/device-tree/compatible \ -+ tests/xen-arm/proc/device-tree/hypervisor/compatible \ - tests/xen-arm/proc/self/status \ - tests/xen-arm/sbin/dmidecode \ - tests/xen-arm/sbin/uname \ --- -2.10.2 - diff --git a/SOURCES/0018-Update-copyright-years.patch b/SOURCES/0018-Update-copyright-years.patch deleted file mode 100644 index 6aa3344..0000000 --- a/SOURCES/0018-Update-copyright-years.patch +++ /dev/null @@ -1,38 +0,0 @@ -From e70023e026f0abd820e9702f7a3c745e03c2846d Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Mon, 3 Aug 2015 12:23:05 +0100 -Subject: [PATCH 18/27] Update copyright years. - ---- - virt-what.in | 2 +- - virt-what.pod | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/virt-what.in b/virt-what.in -index a5ed33e..6daba34 100644 ---- a/virt-what.in -+++ b/virt-what.in -@@ -1,6 +1,6 @@ - #!/bin/sh - - # @configure_input@ --# Copyright (C) 2008-2011 Red Hat Inc. -+# Copyright (C) 2008-2015 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 -diff --git a/virt-what.pod b/virt-what.pod -index 0e2e8a5..d936e4a 100644 ---- a/virt-what.pod -+++ b/virt-what.pod -@@ -286,7 +286,7 @@ Richard W.M. Jones - - =head1 COPYRIGHT - --(C) Copyright 2008-2011 Red Hat Inc., -+(C) Copyright 2008-2015 Red Hat Inc., - L - - This program is free software; you can redistribute it and/or modify --- -2.10.2 - diff --git a/SOURCES/0019-Add-QEMU-KVM-detection-for-ACPI-boot-ARM.patch b/SOURCES/0019-Add-QEMU-KVM-detection-for-ACPI-boot-ARM.patch deleted file mode 100644 index 84d03a5..0000000 --- a/SOURCES/0019-Add-QEMU-KVM-detection-for-ACPI-boot-ARM.patch +++ /dev/null @@ -1,389 +0,0 @@ -From c722083f37e514f4d8b9f9470536dcbae428631a Mon Sep 17 00:00:00 2001 -From: Andrew Jones -Date: Tue, 22 Sep 2015 15:54:55 +0200 -Subject: [PATCH 19/27] Add QEMU/KVM detection for ACPI-boot ARM - -Detect QEMU/KVM on ARM guests that have been boot with ACPI, i.e. -without device tree. When boot with ACPI SMBIOS is populated, so we -can use dmidecode. - -Signed-off-by: Andrew Jones ---- - Makefile.am | 6 + - tests/qemu-arm-acpi/proc/cpuinfo | 63 +++++++++++ - tests/qemu-arm-acpi/proc/self/status | 41 +++++++ - tests/qemu-arm-acpi/sbin/dmidecode | 141 ++++++++++++++++++++++++ - tests/qemu-arm-acpi/sbin/uname | 2 + - tests/qemu-arm-acpi/sbin/virt-what-cpuid-helper | 2 + - tests/test-qemu-arm-acpi.sh | 34 ++++++ - virt-what.in | 5 + - 8 files changed, 294 insertions(+) - create mode 100644 tests/qemu-arm-acpi/proc/cpuinfo - create mode 100644 tests/qemu-arm-acpi/proc/self/status - create mode 100755 tests/qemu-arm-acpi/sbin/dmidecode - create mode 100755 tests/qemu-arm-acpi/sbin/uname - create mode 100755 tests/qemu-arm-acpi/sbin/virt-what-cpuid-helper - create mode 100755 tests/test-qemu-arm-acpi.sh - -diff --git a/Makefile.am b/Makefile.am -index 8a47e96..2c958ca 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -53,6 +53,7 @@ TESTS = \ - tests/test-parallels-desktop.sh \ - tests/test-qemu.sh \ - tests/test-qemu-arm.sh \ -+ tests/test-qemu-arm-acpi.sh \ - tests/test-rhel5-xen-dom0.sh \ - tests/test-rhel5-xen-domU-hvm.sh \ - tests/test-rhel5-xen-domU-hvm-ia64.sh \ -@@ -137,6 +138,11 @@ EXTRA_DIST = \ - tests/qemu-arm/sbin/dmidecode \ - tests/qemu-arm/sbin/uname \ - tests/qemu-arm/sbin/virt-what-cpuid-helper \ -+ tests/qemu-arm-acpi/proc/cpuinfo \ -+ tests/qemu-arm-acpi/proc/self/status \ -+ tests/qemu-arm-acpi/sbin/dmidecode \ -+ tests/qemu-arm-acpi/sbin/uname \ -+ tests/qemu-arm-acpi/sbin/virt-what-cpuid-helper \ - tests/rhel5-xen-dom0/proc/cpuinfo \ - tests/rhel5-xen-dom0/proc/self/status \ - tests/rhel5-xen-dom0/proc/xen/balloon \ -diff --git a/tests/qemu-arm-acpi/proc/cpuinfo b/tests/qemu-arm-acpi/proc/cpuinfo -new file mode 100644 -index 0000000..b83a182 ---- /dev/null -+++ b/tests/qemu-arm-acpi/proc/cpuinfo -@@ -0,0 +1,63 @@ -+processor : 0 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -+ -+processor : 1 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -+ -+processor : 2 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -+ -+processor : 3 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -+ -+processor : 4 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -+ -+processor : 5 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -+ -+processor : 6 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -+ -+processor : 7 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -diff --git a/tests/qemu-arm-acpi/proc/self/status b/tests/qemu-arm-acpi/proc/self/status -new file mode 100644 -index 0000000..751f5e7 ---- /dev/null -+++ b/tests/qemu-arm-acpi/proc/self/status -@@ -0,0 +1,41 @@ -+Name: cat -+State: R (running) -+Tgid: 8307 -+Ngid: 0 -+Pid: 8307 -+PPid: 1415 -+TracerPid: 0 -+Uid: 0 0 0 0 -+Gid: 0 0 0 0 -+FDSize: 256 -+Groups: -+VmPeak: 109696 kB -+VmSize: 109696 kB -+VmLck: 0 kB -+VmPin: 0 kB -+VmHWM: 832 kB -+VmRSS: 832 kB -+VmData: 320 kB -+VmStk: 256 kB -+VmExe: 64 kB -+VmLib: 1536 kB -+VmPTE: 192 kB -+VmSwap: 0 kB -+Threads: 1 -+SigQ: 0/5821 -+SigPnd: 0000000000000000 -+ShdPnd: 0000000000000000 -+SigBlk: 0000000000000000 -+SigIgn: 0000000000000000 -+SigCgt: 0000000000000000 -+CapInh: 0000000000000000 -+CapPrm: 0000003fffffffff -+CapEff: 0000003fffffffff -+CapBnd: 0000003fffffffff -+Seccomp: 0 -+Cpus_allowed: ff -+Cpus_allowed_list: 0-7 -+Mems_allowed: 1 -+Mems_allowed_list: 0 -+voluntary_ctxt_switches: 1 -+nonvoluntary_ctxt_switches: 1 -diff --git a/tests/qemu-arm-acpi/sbin/dmidecode b/tests/qemu-arm-acpi/sbin/dmidecode -new file mode 100755 -index 0000000..f7ffd4b ---- /dev/null -+++ b/tests/qemu-arm-acpi/sbin/dmidecode -@@ -0,0 +1,141 @@ -+#!/bin/sh - -+cat <<'EOF' -+# dmidecode 3.0 -+Getting SMBIOS data from sysfs. -+SMBIOS 3.0.0 present. -+Table at 0x136650000. -+ -+Handle 0x0100, DMI type 1, 27 bytes -+System Information -+ Manufacturer: QEMU -+ Product Name: QEMU Virtual Machine -+ Version: 1.0 -+ Serial Number: Not Specified -+ UUID: 6EB70381-DF9C-4407-B6AB-9FA4452117EA -+ Wake-up Type: Power Switch -+ SKU Number: Not Specified -+ Family: Red Hat Enterprise Linux -+ -+Handle 0x0300, DMI type 3, 21 bytes -+Chassis Information -+ Manufacturer: QEMU -+ Type: Other -+ Lock: Not Present -+ Version: 1.0 -+ 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: QEMU -+ ID: 00 00 00 00 00 00 00 00 -+ Version: 1.0 -+ 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 0x0401, DMI type 4, 42 bytes -+Processor Information -+ Socket Designation: CPU 1 -+ Type: Central Processor -+ Family: Other -+ Manufacturer: QEMU -+ ID: 00 00 00 00 00 00 00 00 -+ Version: 1.0 -+ 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: 4 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: 4096 MB -+ Form Factor: DIMM -+ Set: None -+ Locator: DIMM 0 -+ Bank Locator: Not Specified -+ Type: RAM -+ Type Detail: Other -+ Speed: Unknown -+ Manufacturer: QEMU -+ Serial Number: Not Specified -+ Asset Tag: Not Specified -+ Part Number: Not Specified -+ Rank: Unknown -+ Configured Clock Speed: Unknown -+ Minimum Voltage: Unknown -+ Maximum Voltage: Unknown -+ Configured Voltage: Unknown -+ -+Handle 0x2000, DMI type 32, 11 bytes -+System Boot Information -+ Status: No errors detected -+ -+Handle 0x0000, DMI type 0, 24 bytes -+BIOS Information -+ Vendor: EFI Development Kit II / OVMF -+ Version: 0.0.0 -+ Release Date: 02/06/2015 -+ Address: 0xE8000 -+ Runtime Size: 96 kB -+ ROM Size: 64 kB -+ Characteristics: -+ BIOS characteristics not supported -+ Targeted content distribution is supported -+ UEFI is supported -+ System is a virtual machine -+ BIOS Revision: 0.0 -+ -+Handle 0xFEFF, DMI type 127, 4 bytes -+End Of Table -+ -+EOF -diff --git a/tests/qemu-arm-acpi/sbin/uname b/tests/qemu-arm-acpi/sbin/uname -new file mode 100755 -index 0000000..bd33a2d ---- /dev/null -+++ b/tests/qemu-arm-acpi/sbin/uname -@@ -0,0 +1,2 @@ -+#!/bin/sh - -+echo aarch64 -diff --git a/tests/qemu-arm-acpi/sbin/virt-what-cpuid-helper b/tests/qemu-arm-acpi/sbin/virt-what-cpuid-helper -new file mode 100755 -index 0000000..77a6692 ---- /dev/null -+++ b/tests/qemu-arm-acpi/sbin/virt-what-cpuid-helper -@@ -0,0 +1,2 @@ -+#!/bin/sh - -+# nothing -diff --git a/tests/test-qemu-arm-acpi.sh b/tests/test-qemu-arm-acpi.sh -new file mode 100755 -index 0000000..64db9eb ---- /dev/null -+++ b/tests/test-qemu-arm-acpi.sh -@@ -0,0 +1,34 @@ -+# Test for qemu on ARM -+# Copyright (C) 2015 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. -+ -+root=tests/qemu-arm-acpi -+ -+output="$(./virt-what --test-root=$root 2>&1)" -+expected="qemu" -+ -+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 6daba34..697595c 100644 ---- a/virt-what.in -+++ b/virt-what.in -@@ -264,6 +264,11 @@ if ! "$skip_qemu_kvm"; then - # using KVM acceleration or not. - echo qemu - skip_lkvm=true -+ elif echo "$dmi" | grep -q 'Manufacturer: QEMU'; then -+ # We don't have enough information to determine if we're -+ # using KVM acceleration or not. -+ echo qemu -+ skip_lkvm=true - fi - else - # XXX This is known to fail for qemu with the explicit -cpu --- -2.10.2 - diff --git a/SOURCES/0020-trivial-comment-fixup.patch b/SOURCES/0020-trivial-comment-fixup.patch deleted file mode 100644 index a3364fb..0000000 --- a/SOURCES/0020-trivial-comment-fixup.patch +++ /dev/null @@ -1,30 +0,0 @@ -From fd9a0ea54fa254f880039a64f0ae68da1a5af1ff Mon Sep 17 00:00:00 2001 -From: Andrew Jones -Date: Tue, 22 Sep 2015 18:29:08 +0200 -Subject: [PATCH 20/27] trivial: comment fixup - -dmidecode does now exist on non-PC architectures. ---- - virt-what.in | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/virt-what.in b/virt-what.in -index 697595c..2de040a 100644 ---- a/virt-what.in -+++ b/virt-what.in -@@ -94,9 +94,9 @@ fi - cpuid=$(virt-what-cpuid-helper) - - # Check for various products in the BIOS information. --# Note that dmidecode doesn't exist on non-PC architectures. On these, --# this will return an error which is ignored (error message redirected --# into $dmi variable). -+# Note that dmidecode doesn't exist on all architectures. On the ones -+# it does not, then this will return an error, which is ignored (error -+# message redirected into the $dmi variable). - - dmi=$(LANG=C dmidecode 2>&1) - --- -2.10.2 - diff --git a/SOURCES/0021-Add-oVirt-RHBZ-1249438.patch b/SOURCES/0021-Add-oVirt-RHBZ-1249438.patch deleted file mode 100644 index 07ec57d..0000000 --- a/SOURCES/0021-Add-oVirt-RHBZ-1249438.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 74d099109217f7a4c0ec9790c6e83df392f4a5ae Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Mon, 3 Aug 2015 12:23:13 +0100 -Subject: [PATCH 21/27] Add oVirt (RHBZ#1249438). - ---- - virt-what.in | 5 +++++ - virt-what.pod | 6 ++++++ - 2 files changed, 11 insertions(+) - -diff --git a/virt-what.in b/virt-what.in -index 2de040a..d37da85 100644 ---- a/virt-what.in -+++ b/virt-what.in -@@ -203,6 +203,11 @@ if echo "$dmi" | grep -q 'Vendor: Parallels'; then - skip_qemu_kvm=true - fi - -+# Check for oVirt. -+if echo "$dmi" | grep -q 'Manufacturer: oVirt'; then -+ echo ovirt -+fi -+ - # Check for Xen. - - if [ "$cpuid" = "XenVMMXenVMM" ]; then -diff --git a/virt-what.pod b/virt-what.pod -index d936e4a..4e38414 100644 ---- a/virt-what.pod -+++ b/virt-what.pod -@@ -116,6 +116,12 @@ container. - - Status: contributed by Evgeniy Sokolov - -+=item B -+ -+The guest is running on an oVirt or RHEV node. -+ -+Status: contributed by RWMJ, not confirmed -+ - =item B - - The guest is running inside Parallels Virtual Platform --- -2.10.2 - diff --git a/SOURCES/0022-trivial-virt-what.in-doesn-t-use-tabs.patch b/SOURCES/0022-trivial-virt-what.in-doesn-t-use-tabs.patch deleted file mode 100644 index 8cf7080..0000000 --- a/SOURCES/0022-trivial-virt-what.in-doesn-t-use-tabs.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 4b9101e34d9e5f9c05131161a9702cf1f37e4792 Mon Sep 17 00:00:00 2001 -From: Andrew Jones -Date: Tue, 27 Oct 2015 18:16:02 +0100 -Subject: [PATCH 22/27] trivial: virt-what.in doesn't use tabs - ---- - virt-what.in | 18 +++++++++--------- - 1 file changed, 9 insertions(+), 9 deletions(-) - -diff --git a/virt-what.in b/virt-what.in -index d37da85..2c2e6ac 100644 ---- a/virt-what.in -+++ b/virt-what.in -@@ -54,16 +54,16 @@ usage () { - # Handle the command line arguments, if any. - while test $# -gt 0; do - case "$1" in -- --help) usage ;; -+ --help) usage ;; - --test-root=*) - # Deliberately undocumented: used for 'make check'. - root=$(echo "$1" | sed 's/.*=//') - shift 1 - test -z "$root" && fail "--test-root option requires a value" - ;; -- -v|--version) echo "$VERSION"; exit 0 ;; -- --) shift; break ;; -- *) fail "unrecognized option '$1'";; -+ -v|--version) echo "$VERSION"; exit 0 ;; -+ --) shift; break ;; -+ *) fail "unrecognized option '$1'";; - esac - done - test $# -gt 0 && fail "extra operand '$1'" -@@ -261,7 +261,7 @@ fi - - if ! "$skip_qemu_kvm"; then - if [ "$cpuid" = "KVMKVMKVM" ]; then -- echo kvm -+ echo kvm - elif [ "$arch" = "arm" ] || [ "$arch" = "aarch64" ]; then - if [ -d "${root}/proc/device-tree" ] && - ls "${root}/proc/device-tree" | grep -q "fw-cfg"; then -@@ -281,8 +281,8 @@ if ! "$skip_qemu_kvm"; then - # string. The long term fix for this would be to export - # another CPUID leaf for non-accelerated qemu. - if grep -q 'QEMU' "${root}/proc/cpuinfo"; then -- echo qemu -- fi -+ echo qemu -+ fi - fi - fi - -@@ -293,11 +293,11 @@ if ! "$skip_lkvm"; then - if [ -d "${root}/proc/device-tree" ] && - grep -q "dummy-virt" "${root}/proc/device-tree/compatible"; then - echo lkvm -- fi -+ fi - fi - fi - - # Check for Docker. - if [ -f "${root}/.dockerinit" ]; then -- echo docker -+ echo docker - fi --- -2.10.2 - diff --git a/SOURCES/0023-qemu-kvm-try-dmidecode-on-all-targets.patch b/SOURCES/0023-qemu-kvm-try-dmidecode-on-all-targets.patch deleted file mode 100644 index 7c52960..0000000 --- a/SOURCES/0023-qemu-kvm-try-dmidecode-on-all-targets.patch +++ /dev/null @@ -1,122 +0,0 @@ -From 8bc06c4843dc0b824e211b6f9f6f358336988b64 Mon Sep 17 00:00:00 2001 -From: Andrew Jones -Date: Tue, 27 Oct 2015 18:16:03 +0100 -Subject: [PATCH 23/27] qemu/kvm: try dmidecode on all targets - -Looking at "$dmi" on targets that don't support dmidecode is -harmless. Furthermore it works, not only for arm targets, but -also pc, so move it out of the 'if arm' block. ---- - Makefile.am | 12 ++++++------ - tests/{qemu-arm-acpi => qemu-smbios}/proc/cpuinfo | 0 - tests/{qemu-arm-acpi => qemu-smbios}/proc/self/status | 0 - tests/{qemu-arm-acpi => qemu-smbios}/sbin/dmidecode | 0 - tests/{qemu-arm-acpi => qemu-smbios}/sbin/uname | 0 - .../sbin/virt-what-cpuid-helper | 0 - tests/{test-qemu-arm-acpi.sh => test-qemu-smbios.sh} | 2 +- - virt-what.in | 10 +++++----- - 8 files changed, 12 insertions(+), 12 deletions(-) - rename tests/{qemu-arm-acpi => qemu-smbios}/proc/cpuinfo (100%) - rename tests/{qemu-arm-acpi => qemu-smbios}/proc/self/status (100%) - rename tests/{qemu-arm-acpi => qemu-smbios}/sbin/dmidecode (100%) - rename tests/{qemu-arm-acpi => qemu-smbios}/sbin/uname (100%) - rename tests/{qemu-arm-acpi => qemu-smbios}/sbin/virt-what-cpuid-helper (100%) - rename tests/{test-qemu-arm-acpi.sh => test-qemu-smbios.sh} (98%) - -diff --git a/Makefile.am b/Makefile.am -index 2c958ca..0045bcb 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -53,7 +53,7 @@ TESTS = \ - tests/test-parallels-desktop.sh \ - tests/test-qemu.sh \ - tests/test-qemu-arm.sh \ -- tests/test-qemu-arm-acpi.sh \ -+ tests/test-qemu-smbios.sh \ - tests/test-rhel5-xen-dom0.sh \ - tests/test-rhel5-xen-domU-hvm.sh \ - tests/test-rhel5-xen-domU-hvm-ia64.sh \ -@@ -138,11 +138,11 @@ EXTRA_DIST = \ - tests/qemu-arm/sbin/dmidecode \ - tests/qemu-arm/sbin/uname \ - tests/qemu-arm/sbin/virt-what-cpuid-helper \ -- tests/qemu-arm-acpi/proc/cpuinfo \ -- tests/qemu-arm-acpi/proc/self/status \ -- tests/qemu-arm-acpi/sbin/dmidecode \ -- tests/qemu-arm-acpi/sbin/uname \ -- tests/qemu-arm-acpi/sbin/virt-what-cpuid-helper \ -+ tests/qemu-smbios/proc/cpuinfo \ -+ tests/qemu-smbios/proc/self/status \ -+ tests/qemu-smbios/sbin/dmidecode \ -+ tests/qemu-smbios/sbin/uname \ -+ tests/qemu-smbios/sbin/virt-what-cpuid-helper \ - tests/rhel5-xen-dom0/proc/cpuinfo \ - tests/rhel5-xen-dom0/proc/self/status \ - tests/rhel5-xen-dom0/proc/xen/balloon \ -diff --git a/tests/qemu-arm-acpi/proc/cpuinfo b/tests/qemu-smbios/proc/cpuinfo -similarity index 100% -rename from tests/qemu-arm-acpi/proc/cpuinfo -rename to tests/qemu-smbios/proc/cpuinfo -diff --git a/tests/qemu-arm-acpi/proc/self/status b/tests/qemu-smbios/proc/self/status -similarity index 100% -rename from tests/qemu-arm-acpi/proc/self/status -rename to tests/qemu-smbios/proc/self/status -diff --git a/tests/qemu-arm-acpi/sbin/dmidecode b/tests/qemu-smbios/sbin/dmidecode -similarity index 100% -rename from tests/qemu-arm-acpi/sbin/dmidecode -rename to tests/qemu-smbios/sbin/dmidecode -diff --git a/tests/qemu-arm-acpi/sbin/uname b/tests/qemu-smbios/sbin/uname -similarity index 100% -rename from tests/qemu-arm-acpi/sbin/uname -rename to tests/qemu-smbios/sbin/uname -diff --git a/tests/qemu-arm-acpi/sbin/virt-what-cpuid-helper b/tests/qemu-smbios/sbin/virt-what-cpuid-helper -similarity index 100% -rename from tests/qemu-arm-acpi/sbin/virt-what-cpuid-helper -rename to tests/qemu-smbios/sbin/virt-what-cpuid-helper -diff --git a/tests/test-qemu-arm-acpi.sh b/tests/test-qemu-smbios.sh -similarity index 98% -rename from tests/test-qemu-arm-acpi.sh -rename to tests/test-qemu-smbios.sh -index 64db9eb..114470a 100755 ---- a/tests/test-qemu-arm-acpi.sh -+++ b/tests/test-qemu-smbios.sh -@@ -15,7 +15,7 @@ - # along with this program; if not, write to the Free Software - # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - --root=tests/qemu-arm-acpi -+root=tests/qemu-smbios - - output="$(./virt-what --test-root=$root 2>&1)" - expected="qemu" -diff --git a/virt-what.in b/virt-what.in -index 2c2e6ac..355e438 100644 ---- a/virt-what.in -+++ b/virt-what.in -@@ -262,6 +262,11 @@ fi - if ! "$skip_qemu_kvm"; then - if [ "$cpuid" = "KVMKVMKVM" ]; then - echo kvm -+ elif echo "$dmi" | grep -q 'Manufacturer: QEMU'; then -+ # We don't have enough information to determine if we're -+ # using KVM acceleration or not. -+ echo qemu -+ skip_lkvm=true - elif [ "$arch" = "arm" ] || [ "$arch" = "aarch64" ]; then - if [ -d "${root}/proc/device-tree" ] && - ls "${root}/proc/device-tree" | grep -q "fw-cfg"; then -@@ -269,11 +274,6 @@ if ! "$skip_qemu_kvm"; then - # using KVM acceleration or not. - echo qemu - skip_lkvm=true -- elif echo "$dmi" | grep -q 'Manufacturer: QEMU'; then -- # We don't have enough information to determine if we're -- # using KVM acceleration or not. -- echo qemu -- skip_lkvm=true - fi - else - # XXX This is known to fail for qemu with the explicit -cpu --- -2.10.2 - diff --git a/SOURCES/0024-qemu-kvm-dmidecode-look-for-KVM.patch b/SOURCES/0024-qemu-kvm-dmidecode-look-for-KVM.patch deleted file mode 100644 index 6056ec1..0000000 --- a/SOURCES/0024-qemu-kvm-dmidecode-look-for-KVM.patch +++ /dev/null @@ -1,391 +0,0 @@ -From 8528efafcad59f0fde7e15860f19061c3af810fa Mon Sep 17 00:00:00 2001 -From: Andrew Jones -Date: Tue, 27 Oct 2015 18:16:04 +0100 -Subject: [PATCH 24/27] qemu/kvm: dmidecode: look for 'KVM' - -We can check the product name for 'KVM' to determine if we're -accelerated. This only works for arm/aarch64 targets boot with -AAVMF and on RHEL x86 targets (which already have KVM in the cpuid -leaf), but it doesn't hurt to try on all. ---- - Makefile.am | 6 + - tests/qemu-smbios-kvm/proc/cpuinfo | 63 ++++++++++ - tests/qemu-smbios-kvm/proc/self/status | 41 +++++++ - tests/qemu-smbios-kvm/sbin/dmidecode | 141 ++++++++++++++++++++++ - tests/qemu-smbios-kvm/sbin/uname | 2 + - tests/qemu-smbios-kvm/sbin/virt-what-cpuid-helper | 2 + - tests/test-qemu-smbios-kvm.sh | 34 ++++++ - virt-what.in | 7 +- - 8 files changed, 294 insertions(+), 2 deletions(-) - create mode 100644 tests/qemu-smbios-kvm/proc/cpuinfo - create mode 100644 tests/qemu-smbios-kvm/proc/self/status - create mode 100755 tests/qemu-smbios-kvm/sbin/dmidecode - create mode 100755 tests/qemu-smbios-kvm/sbin/uname - create mode 100755 tests/qemu-smbios-kvm/sbin/virt-what-cpuid-helper - create mode 100755 tests/test-qemu-smbios-kvm.sh - -diff --git a/Makefile.am b/Makefile.am -index 0045bcb..7d87ec1 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -54,6 +54,7 @@ TESTS = \ - tests/test-qemu.sh \ - tests/test-qemu-arm.sh \ - tests/test-qemu-smbios.sh \ -+ tests/test-qemu-smbios-kvm.sh \ - tests/test-rhel5-xen-dom0.sh \ - tests/test-rhel5-xen-domU-hvm.sh \ - tests/test-rhel5-xen-domU-hvm-ia64.sh \ -@@ -143,6 +144,11 @@ EXTRA_DIST = \ - tests/qemu-smbios/sbin/dmidecode \ - tests/qemu-smbios/sbin/uname \ - tests/qemu-smbios/sbin/virt-what-cpuid-helper \ -+ tests/qemu-smbios-kvm/proc/cpuinfo \ -+ tests/qemu-smbios-kvm/proc/self/status \ -+ tests/qemu-smbios-kvm/sbin/dmidecode \ -+ tests/qemu-smbios-kvm/sbin/uname \ -+ tests/qemu-smbios-kvm/sbin/virt-what-cpuid-helper \ - tests/rhel5-xen-dom0/proc/cpuinfo \ - tests/rhel5-xen-dom0/proc/self/status \ - tests/rhel5-xen-dom0/proc/xen/balloon \ -diff --git a/tests/qemu-smbios-kvm/proc/cpuinfo b/tests/qemu-smbios-kvm/proc/cpuinfo -new file mode 100644 -index 0000000..b83a182 ---- /dev/null -+++ b/tests/qemu-smbios-kvm/proc/cpuinfo -@@ -0,0 +1,63 @@ -+processor : 0 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -+ -+processor : 1 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -+ -+processor : 2 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -+ -+processor : 3 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -+ -+processor : 4 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -+ -+processor : 5 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -+ -+processor : 6 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -+ -+processor : 7 -+Features : fp asimd evtstrm -+CPU implementer : 0x50 -+CPU architecture: 8 -+CPU variant : 0x0 -+CPU part : 0x000 -+CPU revision : 0 -diff --git a/tests/qemu-smbios-kvm/proc/self/status b/tests/qemu-smbios-kvm/proc/self/status -new file mode 100644 -index 0000000..751f5e7 ---- /dev/null -+++ b/tests/qemu-smbios-kvm/proc/self/status -@@ -0,0 +1,41 @@ -+Name: cat -+State: R (running) -+Tgid: 8307 -+Ngid: 0 -+Pid: 8307 -+PPid: 1415 -+TracerPid: 0 -+Uid: 0 0 0 0 -+Gid: 0 0 0 0 -+FDSize: 256 -+Groups: -+VmPeak: 109696 kB -+VmSize: 109696 kB -+VmLck: 0 kB -+VmPin: 0 kB -+VmHWM: 832 kB -+VmRSS: 832 kB -+VmData: 320 kB -+VmStk: 256 kB -+VmExe: 64 kB -+VmLib: 1536 kB -+VmPTE: 192 kB -+VmSwap: 0 kB -+Threads: 1 -+SigQ: 0/5821 -+SigPnd: 0000000000000000 -+ShdPnd: 0000000000000000 -+SigBlk: 0000000000000000 -+SigIgn: 0000000000000000 -+SigCgt: 0000000000000000 -+CapInh: 0000000000000000 -+CapPrm: 0000003fffffffff -+CapEff: 0000003fffffffff -+CapBnd: 0000003fffffffff -+Seccomp: 0 -+Cpus_allowed: ff -+Cpus_allowed_list: 0-7 -+Mems_allowed: 1 -+Mems_allowed_list: 0 -+voluntary_ctxt_switches: 1 -+nonvoluntary_ctxt_switches: 1 -diff --git a/tests/qemu-smbios-kvm/sbin/dmidecode b/tests/qemu-smbios-kvm/sbin/dmidecode -new file mode 100755 -index 0000000..a2caabb ---- /dev/null -+++ b/tests/qemu-smbios-kvm/sbin/dmidecode -@@ -0,0 +1,141 @@ -+#!/bin/sh - -+cat <<'EOF' -+# dmidecode 3.0 -+Getting SMBIOS data from sysfs. -+SMBIOS 3.0.0 present. -+Table at 0x136650000. -+ -+Handle 0x0100, DMI type 1, 27 bytes -+System Information -+ Manufacturer: QEMU -+ Product Name: KVM Virtual Machine -+ Version: 1.0 -+ Serial Number: Not Specified -+ UUID: 6EB70381-DF9C-4407-B6AB-9FA4452117EA -+ Wake-up Type: Power Switch -+ SKU Number: Not Specified -+ Family: Red Hat Enterprise Linux -+ -+Handle 0x0300, DMI type 3, 21 bytes -+Chassis Information -+ Manufacturer: QEMU -+ Type: Other -+ Lock: Not Present -+ Version: 1.0 -+ 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: QEMU -+ ID: 00 00 00 00 00 00 00 00 -+ Version: 1.0 -+ 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 0x0401, DMI type 4, 42 bytes -+Processor Information -+ Socket Designation: CPU 1 -+ Type: Central Processor -+ Family: Other -+ Manufacturer: QEMU -+ ID: 00 00 00 00 00 00 00 00 -+ Version: 1.0 -+ 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: 4 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: 4096 MB -+ Form Factor: DIMM -+ Set: None -+ Locator: DIMM 0 -+ Bank Locator: Not Specified -+ Type: RAM -+ Type Detail: Other -+ Speed: Unknown -+ Manufacturer: QEMU -+ Serial Number: Not Specified -+ Asset Tag: Not Specified -+ Part Number: Not Specified -+ Rank: Unknown -+ Configured Clock Speed: Unknown -+ Minimum Voltage: Unknown -+ Maximum Voltage: Unknown -+ Configured Voltage: Unknown -+ -+Handle 0x2000, DMI type 32, 11 bytes -+System Boot Information -+ Status: No errors detected -+ -+Handle 0x0000, DMI type 0, 24 bytes -+BIOS Information -+ Vendor: EFI Development Kit II / OVMF -+ Version: 0.0.0 -+ Release Date: 02/06/2015 -+ Address: 0xE8000 -+ Runtime Size: 96 kB -+ ROM Size: 64 kB -+ Characteristics: -+ BIOS characteristics not supported -+ Targeted content distribution is supported -+ UEFI is supported -+ System is a virtual machine -+ BIOS Revision: 0.0 -+ -+Handle 0xFEFF, DMI type 127, 4 bytes -+End Of Table -+ -+EOF -diff --git a/tests/qemu-smbios-kvm/sbin/uname b/tests/qemu-smbios-kvm/sbin/uname -new file mode 100755 -index 0000000..bd33a2d ---- /dev/null -+++ b/tests/qemu-smbios-kvm/sbin/uname -@@ -0,0 +1,2 @@ -+#!/bin/sh - -+echo aarch64 -diff --git a/tests/qemu-smbios-kvm/sbin/virt-what-cpuid-helper b/tests/qemu-smbios-kvm/sbin/virt-what-cpuid-helper -new file mode 100755 -index 0000000..77a6692 ---- /dev/null -+++ b/tests/qemu-smbios-kvm/sbin/virt-what-cpuid-helper -@@ -0,0 +1,2 @@ -+#!/bin/sh - -+# nothing -diff --git a/tests/test-qemu-smbios-kvm.sh b/tests/test-qemu-smbios-kvm.sh -new file mode 100755 -index 0000000..f4d8e38 ---- /dev/null -+++ b/tests/test-qemu-smbios-kvm.sh -@@ -0,0 +1,34 @@ -+# Test for qemu on ARM -+# Copyright (C) 2015 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. -+ -+root=tests/qemu-smbios-kvm -+ -+output="$(./virt-what --test-root=$root 2>&1)" -+expected="kvm" -+ -+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 355e438..776bfde 100644 ---- a/virt-what.in -+++ b/virt-what.in -@@ -262,9 +262,12 @@ fi - if ! "$skip_qemu_kvm"; then - if [ "$cpuid" = "KVMKVMKVM" ]; then - echo kvm -+ elif echo "$dmi" | grep -q 'Product Name: KVM'; then -+ echo kvm -+ skip_lkvm=true - elif echo "$dmi" | grep -q 'Manufacturer: QEMU'; then -- # We don't have enough information to determine if we're -- # using KVM acceleration or not. -+ # The test for KVM above failed, so now we know we're -+ # not using KVM acceleration. - echo qemu - skip_lkvm=true - elif [ "$arch" = "arm" ] || [ "$arch" = "aarch64" ]; then --- -2.10.2 - diff --git a/SOURCES/0025-Add-support-for-detecting-ppc64-LPAR-as-virt-guests.patch b/SOURCES/0025-Add-support-for-detecting-ppc64-LPAR-as-virt-guests.patch deleted file mode 100644 index d10dfed..0000000 --- a/SOURCES/0025-Add-support-for-detecting-ppc64-LPAR-as-virt-guests.patch +++ /dev/null @@ -1,1603 +0,0 @@ -From 0b7c28b283649783d011c059ef0321d349a0ce46 Mon Sep 17 00:00:00 2001 -From: Adrian Likins -Date: Mon, 20 Jun 2016 12:57:27 +0100 -Subject: [PATCH 25/27] Add support for detecting ppc64 LPAR as virt guests. - -https://bugzilla.redhat.com/show_bug.cgi?id=1072524#c13 ---- - Makefile.am | 25 + - tests/ppc64-baremetal/proc/cpuinfo | 805 +++++++++++++++++++++ - tests/ppc64-baremetal/sbin/dmidecode | 3 + - tests/ppc64-baremetal/sbin/uname | 2 + - tests/ppc64-baremetal/sbin/virt-what-cpuid-helper | 2 + - tests/ppc64-kvm/proc/cpuinfo | 84 +++ - tests/ppc64-kvm/proc/self/status | 41 ++ - tests/ppc64-kvm/sbin/dmidecode | 3 + - tests/ppc64-kvm/sbin/uname | 2 + - tests/ppc64-kvm/sbin/virt-what-cpuid-helper | 2 + - tests/ppc64-lpar-dedicated/proc/cpuinfo | 44 ++ - tests/ppc64-lpar-dedicated/proc/ppc64/lparcfg | 46 ++ - tests/ppc64-lpar-dedicated/sbin/dmidecode | 3 + - tests/ppc64-lpar-dedicated/sbin/uname | 2 + - .../sbin/virt-what-cpuid-helper | 2 + - tests/ppc64-lpar-shared/proc/cpuinfo | 45 ++ - tests/ppc64-lpar-shared/proc/ppc64/lparcfg | 51 ++ - tests/ppc64-lpar-shared/proc/self/status | 42 ++ - tests/ppc64-lpar-shared/sbin/dmidecode | 3 + - tests/ppc64-lpar-shared/sbin/uname | 2 + - .../ppc64-lpar-shared/sbin/virt-what-cpuid-helper | 2 + - tests/test-ppc64-baremetal.sh | 34 + - tests/test-ppc64-kvm.sh | 34 + - tests/test-ppc64-lpar-dedicated.sh | 34 + - tests/test-ppc64-lpar-shared.sh | 34 + - virt-what.in | 24 + - 26 files changed, 1371 insertions(+) - create mode 100644 tests/ppc64-baremetal/proc/cpuinfo - create mode 100644 tests/ppc64-baremetal/sbin/dmidecode - create mode 100644 tests/ppc64-baremetal/sbin/uname - create mode 100755 tests/ppc64-baremetal/sbin/virt-what-cpuid-helper - create mode 100644 tests/ppc64-kvm/proc/cpuinfo - create mode 100644 tests/ppc64-kvm/proc/self/status - create mode 100755 tests/ppc64-kvm/sbin/dmidecode - create mode 100755 tests/ppc64-kvm/sbin/uname - create mode 100755 tests/ppc64-kvm/sbin/virt-what-cpuid-helper - create mode 100644 tests/ppc64-lpar-dedicated/proc/cpuinfo - create mode 100644 tests/ppc64-lpar-dedicated/proc/ppc64/lparcfg - create mode 100755 tests/ppc64-lpar-dedicated/sbin/dmidecode - create mode 100755 tests/ppc64-lpar-dedicated/sbin/uname - create mode 100755 tests/ppc64-lpar-dedicated/sbin/virt-what-cpuid-helper - create mode 100644 tests/ppc64-lpar-shared/proc/cpuinfo - create mode 100644 tests/ppc64-lpar-shared/proc/ppc64/lparcfg - create mode 100644 tests/ppc64-lpar-shared/proc/self/status - create mode 100755 tests/ppc64-lpar-shared/sbin/dmidecode - create mode 100755 tests/ppc64-lpar-shared/sbin/uname - create mode 100755 tests/ppc64-lpar-shared/sbin/virt-what-cpuid-helper - create mode 100755 tests/test-ppc64-baremetal.sh - create mode 100755 tests/test-ppc64-kvm.sh - create mode 100755 tests/test-ppc64-lpar-dedicated.sh - create mode 100755 tests/test-ppc64-lpar-shared.sh - -diff --git a/Makefile.am b/Makefile.am -index 7d87ec1..73dfc7b 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -51,6 +51,10 @@ TESTS = \ - tests/test-lxc.sh \ - tests/test-lx86.sh \ - tests/test-parallels-desktop.sh \ -+ tests/test-ppc64-baremetal.sh \ -+ tests/test-ppc64-kvm.sh \ -+ tests/test-ppc64-lpar-dedicated.sh \ -+ tests/test-ppc64-lpar-shared.sh \ - tests/test-qemu.sh \ - tests/test-qemu-arm.sh \ - tests/test-qemu-smbios.sh \ -@@ -128,6 +132,27 @@ EXTRA_DIST = \ - tests/parallels-desktop/sbin/dmidecode \ - tests/parallels-desktop/sbin/uname \ - tests/parallels-desktop/sbin/virt-what-cpuid-helper \ -+ tests/ppc64-baremetal/proc/cpuinfo \ -+ tests/ppc64-baremetal/proc/self/status \ -+ tests/ppc64-baremetal/sbin/dmidecode \ -+ tests/ppc64-baremetal/sbin/uname \ -+ tests/ppc64-baremetal/sbin/virt-what-cpuid-helper \ -+ tests/ppc64-kvm/proc/cpuinfo \ -+ tests/ppc64-kvm/proc/self/status \ -+ tests/ppc64-kvm/sbin/dmidecode \ -+ tests/ppc64-kvm/sbin/uname \ -+ tests/ppc64-kvm/sbin/virt-what-cpuid-helper \ -+ tests/ppc64-lpar-dedicated/proc/cpuinfo \ -+ tests/ppc64-lpar-dedicated/proc/ppc64/lparcfg \ -+ tests/ppc64-lpar-shared/sbin/dmidecode \ -+ tests/ppc64-lpar-shared/sbin/uname \ -+ tests/ppc64-lpar-shared/sbin/virt-what-cpuid-helper \ -+ tests/ppc64-lpar-shared/proc/cpuinfo \ -+ tests/ppc64-lpar-shared/proc/self/status \ -+ tests/ppc64-lpar-shared/proc/ppc64/lparcfg \ -+ tests/ppc64-lpar-shared/sbin/dmidecode \ -+ tests/ppc64-lpar-shared/sbin/uname \ -+ tests/ppc64-lpar-shared/sbin/virt-what-cpuid-helper \ - tests/qemu/proc/cpuinfo \ - tests/qemu/proc/self/status \ - tests/qemu/sbin/dmidecode \ -diff --git a/tests/ppc64-baremetal/proc/cpuinfo b/tests/ppc64-baremetal/proc/cpuinfo -new file mode 100644 -index 0000000..6a4360e ---- /dev/null -+++ b/tests/ppc64-baremetal/proc/cpuinfo -@@ -0,0 +1,805 @@ -+processor : 0 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 1 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 2 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 3 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 4 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 5 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 6 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 7 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 8 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 9 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 10 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 11 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 12 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 13 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 14 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 15 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 16 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 17 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 18 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 19 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 20 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 21 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 22 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 23 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 24 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 25 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 26 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 27 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 28 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 29 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 30 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 31 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 32 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 33 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 34 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 35 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 36 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 37 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 38 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 39 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 40 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 41 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 42 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 43 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 44 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 45 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 46 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 47 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 48 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 49 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 50 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 51 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 52 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 53 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 54 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 55 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 56 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 57 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 58 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 59 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 60 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 61 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 62 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 63 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 64 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 65 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 66 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 67 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 68 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 69 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 70 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 71 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 72 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 73 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 74 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 75 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 76 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 77 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 78 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 79 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 80 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 81 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 82 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 83 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 84 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 85 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 86 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 87 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 88 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 89 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 90 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 91 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 92 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 93 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 94 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 95 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 96 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 97 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 98 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 99 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 100 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 101 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 102 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 103 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 104 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 105 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 106 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 107 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 108 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 109 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 110 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 111 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 112 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 113 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 114 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 115 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 116 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 117 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 118 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 119 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 120 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 121 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 122 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 123 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 124 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 125 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 126 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 127 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 128 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 129 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 130 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 131 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 132 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 133 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 134 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 135 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 136 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 137 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 138 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 139 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 140 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 141 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 142 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 143 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 144 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 145 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 146 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 147 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 148 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 149 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 150 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 151 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 152 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 153 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 154 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 155 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 156 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 157 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 158 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 159 -+cpu : POWER8E (raw), altivec supported -+clock : 3690.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+timebase : 512000000 -+platform : PowerNV -+model : 8247-22L -+machine : PowerNV 8247-22L -+firmware : OPAL v3 -diff --git a/tests/ppc64-baremetal/sbin/dmidecode b/tests/ppc64-baremetal/sbin/dmidecode -new file mode 100644 -index 0000000..f005a9b ---- /dev/null -+++ b/tests/ppc64-baremetal/sbin/dmidecode -@@ -0,0 +1,3 @@ -+#!/bin/sh - -+# dmidecode is not available on Fedora on s/390 -+exit 1 -diff --git a/tests/ppc64-baremetal/sbin/uname b/tests/ppc64-baremetal/sbin/uname -new file mode 100644 -index 0000000..bab06d9 ---- /dev/null -+++ b/tests/ppc64-baremetal/sbin/uname -@@ -0,0 +1,2 @@ -+#!/bin/sh - -+echo ppc64 -diff --git a/tests/ppc64-baremetal/sbin/virt-what-cpuid-helper b/tests/ppc64-baremetal/sbin/virt-what-cpuid-helper -new file mode 100755 -index 0000000..b446009 ---- /dev/null -+++ b/tests/ppc64-baremetal/sbin/virt-what-cpuid-helper -@@ -0,0 +1,2 @@ -+#!/bin/sh - -+echo -diff --git a/tests/ppc64-kvm/proc/cpuinfo b/tests/ppc64-kvm/proc/cpuinfo -new file mode 100644 -index 0000000..3871ae6 ---- /dev/null -+++ b/tests/ppc64-kvm/proc/cpuinfo -@@ -0,0 +1,84 @@ -+processor : 0 -+cpu : POWER8E (raw), altivec supported -+clock : 3425.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 1 -+cpu : POWER8E (raw), altivec supported -+clock : 3425.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 2 -+cpu : POWER8E (raw), altivec supported -+clock : 3425.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 3 -+cpu : POWER8E (raw), altivec supported -+clock : 3425.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 4 -+cpu : POWER8E (raw), altivec supported -+clock : 3425.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 5 -+cpu : POWER8E (raw), altivec supported -+clock : 3425.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 6 -+cpu : POWER8E (raw), altivec supported -+clock : 3425.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 7 -+cpu : POWER8E (raw), altivec supported -+clock : 3425.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 8 -+cpu : POWER8E (raw), altivec supported -+clock : 3425.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 9 -+cpu : POWER8E (raw), altivec supported -+clock : 3425.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 10 -+cpu : POWER8E (raw), altivec supported -+clock : 3425.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 11 -+cpu : POWER8E (raw), altivec supported -+clock : 3425.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 12 -+cpu : POWER8E (raw), altivec supported -+clock : 3425.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 13 -+cpu : POWER8E (raw), altivec supported -+clock : 3425.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 14 -+cpu : POWER8E (raw), altivec supported -+clock : 3425.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 15 -+cpu : POWER8E (raw), altivec supported -+clock : 3425.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+timebase : 512000000 -+platform : pSeries -+model : IBM pSeries (emulated by qemu) -+machine : CHRP IBM pSeries (emulated by qemu) -diff --git a/tests/ppc64-kvm/proc/self/status b/tests/ppc64-kvm/proc/self/status -new file mode 100644 -index 0000000..5408218 ---- /dev/null -+++ b/tests/ppc64-kvm/proc/self/status -@@ -0,0 +1,41 @@ -+Name: cat -+State: R (running) -+Tgid: 24386 -+Ngid: 0 -+Pid: 24386 -+PPid: 21541 -+TracerPid: 0 -+Uid: 0 0 0 0 -+Gid: 0 0 0 0 -+FDSize: 256 -+Groups: 0 -+VmPeak: 110272 kB -+VmSize: 110272 kB -+VmLck: 0 kB -+VmPin: 0 kB -+VmHWM: 1408 kB -+VmRSS: 1408 kB -+VmData: 320 kB -+VmStk: 256 kB -+VmExe: 64 kB -+VmLib: 2112 kB -+VmPTE: 12 kB -+VmSwap: 0 kB -+Threads: 1 -+SigQ: 0/60932 -+SigPnd: 0000000000000000 -+ShdPnd: 0000000000000000 -+SigBlk: 0000000000000000 -+SigIgn: 0000000000000000 -+SigCgt: 0000000000000000 -+CapInh: 0000000000000000 -+CapPrm: 0000001fffffffff -+CapEff: 0000001fffffffff -+CapBnd: 0000001fffffffff -+Seccomp: 0 -+Cpus_allowed: ffff -+Cpus_allowed_list: 0-15 -+Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 -+Mems_allowed_list: 0 -+voluntary_ctxt_switches: 1 -+nonvoluntary_ctxt_switches: 1 -diff --git a/tests/ppc64-kvm/sbin/dmidecode b/tests/ppc64-kvm/sbin/dmidecode -new file mode 100755 -index 0000000..f005a9b ---- /dev/null -+++ b/tests/ppc64-kvm/sbin/dmidecode -@@ -0,0 +1,3 @@ -+#!/bin/sh - -+# dmidecode is not available on Fedora on s/390 -+exit 1 -diff --git a/tests/ppc64-kvm/sbin/uname b/tests/ppc64-kvm/sbin/uname -new file mode 100755 -index 0000000..bab06d9 ---- /dev/null -+++ b/tests/ppc64-kvm/sbin/uname -@@ -0,0 +1,2 @@ -+#!/bin/sh - -+echo ppc64 -diff --git a/tests/ppc64-kvm/sbin/virt-what-cpuid-helper b/tests/ppc64-kvm/sbin/virt-what-cpuid-helper -new file mode 100755 -index 0000000..b446009 ---- /dev/null -+++ b/tests/ppc64-kvm/sbin/virt-what-cpuid-helper -@@ -0,0 +1,2 @@ -+#!/bin/sh - -+echo -diff --git a/tests/ppc64-lpar-dedicated/proc/cpuinfo b/tests/ppc64-lpar-dedicated/proc/cpuinfo -new file mode 100644 -index 0000000..2c701cc ---- /dev/null -+++ b/tests/ppc64-lpar-dedicated/proc/cpuinfo -@@ -0,0 +1,44 @@ -+processor : 0 -+cpu : POWER8 (architected), altivec supported -+clock : 4116.000000MHz -+revision : 2.0 (pvr 004b 0200) -+ -+processor : 1 -+cpu : POWER8 (architected), altivec supported -+clock : 4116.000000MHz -+revision : 2.0 (pvr 004b 0200) -+ -+processor : 2 -+cpu : POWER8 (architected), altivec supported -+clock : 4116.000000MHz -+revision : 2.0 (pvr 004b 0200) -+ -+processor : 3 -+cpu : POWER8 (architected), altivec supported -+clock : 4116.000000MHz -+revision : 2.0 (pvr 004b 0200) -+ -+processor : 4 -+cpu : POWER8 (architected), altivec supported -+clock : 4116.000000MHz -+revision : 2.0 (pvr 004b 0200) -+ -+processor : 5 -+cpu : POWER8 (architected), altivec supported -+clock : 4116.000000MHz -+revision : 2.0 (pvr 004b 0200) -+ -+processor : 6 -+cpu : POWER8 (architected), altivec supported -+clock : 4116.000000MHz -+revision : 2.0 (pvr 004b 0200) -+ -+processor : 7 -+cpu : POWER8 (architected), altivec supported -+clock : 4116.000000MHz -+revision : 2.0 (pvr 004b 0200) -+ -+timebase : 512000000 -+platform : pSeries -+model : IBM,8286-42A -+machine : CHRP IBM,8286-42A -diff --git a/tests/ppc64-lpar-dedicated/proc/ppc64/lparcfg b/tests/ppc64-lpar-dedicated/proc/ppc64/lparcfg -new file mode 100644 -index 0000000..bb6915e ---- /dev/null -+++ b/tests/ppc64-lpar-dedicated/proc/ppc64/lparcfg -@@ -0,0 +1,46 @@ -+lparcfg 1.9 -+serial_number=IBM,0210D6B7T -+system_type=IBM,8286-42A -+partition_id=2 -+BoundThrds=1 -+CapInc=100 -+DisWheRotPer=5120000 -+MinEntCap=100 -+MinEntCapPerVP=100 -+MinMem=256 -+MinProcs=1 -+partition_max_entitled_capacity=1600 -+system_potential_processors=16 -+DesEntCap=100 -+DesMem=16384 -+DesProcs=1 -+DesVarCapWt=0 -+DedDonMode=0 -+ -+partition_entitled_capacity=100 -+group=32770 -+system_active_processors=16 -+unallocated_capacity_weight=0 -+capacity_weight=0 -+capped=1 -+unallocated_capacity=0 -+physical_procs_allocated_to_virtualization=0 -+max_proc_capacity_available=0 -+entitled_proc_capacity_available=0 -+entitled_memory=17179869184 -+entitled_memory_group_number=32770 -+entitled_memory_pool_number=65535 -+entitled_memory_weight=0 -+unallocated_entitled_memory_weight=0 -+unallocated_io_mapping_entitlement=0 -+entitled_memory_loan_request=0 -+backing_memory=17179869184 bytes -+cmo_enabled=0 -+dispatches=446065 -+dispatch_dispersions=0 -+purr=2938569265208 -+partition_active_processors=1 -+partition_potential_processors=16 -+shared_processor_mode=0 -+slb_size=32 -+power_mode_data=0002000000020002 -diff --git a/tests/ppc64-lpar-dedicated/sbin/dmidecode b/tests/ppc64-lpar-dedicated/sbin/dmidecode -new file mode 100755 -index 0000000..f005a9b ---- /dev/null -+++ b/tests/ppc64-lpar-dedicated/sbin/dmidecode -@@ -0,0 +1,3 @@ -+#!/bin/sh - -+# dmidecode is not available on Fedora on s/390 -+exit 1 -diff --git a/tests/ppc64-lpar-dedicated/sbin/uname b/tests/ppc64-lpar-dedicated/sbin/uname -new file mode 100755 -index 0000000..bab06d9 ---- /dev/null -+++ b/tests/ppc64-lpar-dedicated/sbin/uname -@@ -0,0 +1,2 @@ -+#!/bin/sh - -+echo ppc64 -diff --git a/tests/ppc64-lpar-dedicated/sbin/virt-what-cpuid-helper b/tests/ppc64-lpar-dedicated/sbin/virt-what-cpuid-helper -new file mode 100755 -index 0000000..b446009 ---- /dev/null -+++ b/tests/ppc64-lpar-dedicated/sbin/virt-what-cpuid-helper -@@ -0,0 +1,2 @@ -+#!/bin/sh - -+echo -diff --git a/tests/ppc64-lpar-shared/proc/cpuinfo b/tests/ppc64-lpar-shared/proc/cpuinfo -new file mode 100644 -index 0000000..f1e3f3b ---- /dev/null -+++ b/tests/ppc64-lpar-shared/proc/cpuinfo -@@ -0,0 +1,45 @@ -+processor : 0 -+cpu : POWER8 (architected), altivec supported -+clock : 3425.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 1 -+cpu : POWER8 (architected), altivec supported -+clock : 3425.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 2 -+cpu : POWER8 (architected), altivec supported -+clock : 3425.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 3 -+cpu : POWER8 (architected), altivec supported -+clock : 3425.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 4 -+cpu : POWER8 (architected), altivec supported -+clock : 3425.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 5 -+cpu : POWER8 (architected), altivec supported -+clock : 3425.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 6 -+cpu : POWER8 (architected), altivec supported -+clock : 3425.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+processor : 7 -+cpu : POWER8 (architected), altivec supported -+clock : 3425.000000MHz -+revision : 2.1 (pvr 004b 0201) -+ -+timebase : 512000000 -+platform : pSeries -+model : IBM,8247-21L -+machine : CHRP IBM,8247-21L -+ -diff --git a/tests/ppc64-lpar-shared/proc/ppc64/lparcfg b/tests/ppc64-lpar-shared/proc/ppc64/lparcfg -new file mode 100644 -index 0000000..fa143a8 ---- /dev/null -+++ b/tests/ppc64-lpar-shared/proc/ppc64/lparcfg -@@ -0,0 +1,51 @@ -+lparcfg 1.9 -+serial_number=IBM,03212D8FA -+system_type=IBM,8247-21L -+partition_id=5 -+BoundThrds=1 -+CapInc=1 -+DisWheRotPer=5120000 -+MinEntCap=10 -+MinEntCapPerVP=5 -+MinMem=256 -+MinProcs=1 -+partition_max_entitled_capacity=1000 -+system_potential_processors=10 -+DesEntCap=10 -+DesMem=8192 -+DesProcs=1 -+DesVarCapWt=128 -+DedDonMode=0 -+ -+partition_entitled_capacity=10 -+group=32773 -+system_active_processors=10 -+pool=0 -+pool_capacity=1000 -+pool_idle_time=99869576477984311 -+pool_num_procs=10 -+unallocated_capacity_weight=0 -+capacity_weight=128 -+capped=0 -+unallocated_capacity=0 -+physical_procs_allocated_to_virtualization=10 -+max_proc_capacity_available=1000 -+entitled_proc_capacity_available=200 -+entitled_memory=8589934592 -+entitled_memory_group_number=32773 -+entitled_memory_pool_number=65535 -+entitled_memory_weight=0 -+unallocated_entitled_memory_weight=0 -+unallocated_io_mapping_entitlement=0 -+entitled_memory_loan_request=0 -+backing_memory=8589934592 bytes -+cmo_enabled=0 -+dispatches=469391613 -+dispatch_dispersions=290411690 -+purr=4110325981916 -+partition_active_processors=1 -+partition_potential_processors=10 -+shared_processor_mode=1 -+slb_size=32 -+power_mode_data=0002000000020002 -+ -diff --git a/tests/ppc64-lpar-shared/proc/self/status b/tests/ppc64-lpar-shared/proc/self/status -new file mode 100644 -index 0000000..528fc82 ---- /dev/null -+++ b/tests/ppc64-lpar-shared/proc/self/status -@@ -0,0 +1,42 @@ -+Name: cat -+State: R (running) -+Tgid: 57629 -+Ngid: 0 -+Pid: 57629 -+PPid: 57206 -+TracerPid: 0 -+Uid: 0 0 0 0 -+Gid: 0 0 0 0 -+FDSize: 256 -+Groups: 0 -+VmPeak: 110272 kB -+VmSize: 110272 kB -+VmLck: 0 kB -+VmPin: 0 kB -+VmHWM: 1152 kB -+VmRSS: 1152 kB -+VmData: 384 kB -+VmStk: 256 kB -+VmExe: 64 kB -+VmLib: 2048 kB -+VmPTE: 14 kB -+VmSwap: 0 kB -+Threads: 1 -+SigQ: 0/30248 -+SigPnd: 0000000000000000 -+ShdPnd: 0000000000000000 -+SigBlk: 0000000000000000 -+SigIgn: 0000000000000000 -+SigCgt: 0000000000000000 -+CapInh: 0000000000000000 -+CapPrm: 0000001fffffffff -+CapEff: 0000001fffffffff -+CapBnd: 0000001fffffffff -+Seccomp: 0 -+Cpus_allowed: ffff,ffffffff,ffffffff -+Cpus_allowed_list: 0-79 -+Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 -+Mems_allowed_list: 0 -+voluntary_ctxt_switches: 1 -+nonvoluntary_ctxt_switches: 1 -+ -diff --git a/tests/ppc64-lpar-shared/sbin/dmidecode b/tests/ppc64-lpar-shared/sbin/dmidecode -new file mode 100755 -index 0000000..f005a9b ---- /dev/null -+++ b/tests/ppc64-lpar-shared/sbin/dmidecode -@@ -0,0 +1,3 @@ -+#!/bin/sh - -+# dmidecode is not available on Fedora on s/390 -+exit 1 -diff --git a/tests/ppc64-lpar-shared/sbin/uname b/tests/ppc64-lpar-shared/sbin/uname -new file mode 100755 -index 0000000..bab06d9 ---- /dev/null -+++ b/tests/ppc64-lpar-shared/sbin/uname -@@ -0,0 +1,2 @@ -+#!/bin/sh - -+echo ppc64 -diff --git a/tests/ppc64-lpar-shared/sbin/virt-what-cpuid-helper b/tests/ppc64-lpar-shared/sbin/virt-what-cpuid-helper -new file mode 100755 -index 0000000..b446009 ---- /dev/null -+++ b/tests/ppc64-lpar-shared/sbin/virt-what-cpuid-helper -@@ -0,0 +1,2 @@ -+#!/bin/sh - -+echo -diff --git a/tests/test-ppc64-baremetal.sh b/tests/test-ppc64-baremetal.sh -new file mode 100755 -index 0000000..9ca3cee ---- /dev/null -+++ b/tests/test-ppc64-baremetal.sh -@@ -0,0 +1,34 @@ -+# Test for ppc64 lpar baremetal (PowerNV) -+# Copyright (C) 2015 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. -+ -+root=tests/ppc64-baremetal -+ -+output="$(./virt-what --test-root=$root 2>&1)" -+expected="" -+ -+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/tests/test-ppc64-kvm.sh b/tests/test-ppc64-kvm.sh -new file mode 100755 -index 0000000..ea844e1 ---- /dev/null -+++ b/tests/test-ppc64-kvm.sh -@@ -0,0 +1,34 @@ -+# Test for kvm on ppc64 -+# Copyright (C) 2015 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. -+ -+root=tests/ppc64-kvm -+ -+output="$(./virt-what --test-root=$root 2>&1)" -+expected="ibm_ppc64_kvm" -+ -+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/tests/test-ppc64-lpar-dedicated.sh b/tests/test-ppc64-lpar-dedicated.sh -new file mode 100755 -index 0000000..ef99b27 ---- /dev/null -+++ b/tests/test-ppc64-lpar-dedicated.sh -@@ -0,0 +1,34 @@ -+# Test for ppc64 lpar guests in dedicated mode -+# Copyright (C) 2015 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. -+ -+root=tests/ppc64-lpar-dedicated -+ -+output="$(./virt-what --test-root=$root 2>&1)" -+expected="ibm_ppc64_lpar_dedicated" -+ -+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/tests/test-ppc64-lpar-shared.sh b/tests/test-ppc64-lpar-shared.sh -new file mode 100755 -index 0000000..eaac0e4 ---- /dev/null -+++ b/tests/test-ppc64-lpar-shared.sh -@@ -0,0 +1,34 @@ -+# Test for ppc64 lpar guests in shared mode -+# Copyright (C) 2015 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. -+ -+root=tests/ppc64-lpar-shared -+ -+output="$(./virt-what --test-root=$root 2>&1)" -+expected="ibm_ppc64_lpar_shared" -+ -+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 776bfde..a91845e 100644 ---- a/virt-what.in -+++ b/virt-what.in -@@ -304,3 +304,27 @@ fi - if [ -f "${root}/.dockerinit" ]; then - echo docker - fi -+ -+# Check ppc64 lpar, kvm or powerkvm -+ -+# example /proc/cpuinfo line indicating 'not baremetal' -+# platform : pSeries -+# -+# example /proc/ppc64/lparcfg systemtype line -+# system_type=IBM pSeries (emulated by qemu) -+ -+if [ "$arch" = "ppc64" ]; 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_ppc64_kvm -+ else -+ # Assume LPAR, now detect shared or dedicated -+ if grep -q 'shared_processor_mode=1' "${root}/proc/ppc64/lparcfg"; then -+ echo ibm_ppc64_lpar_shared -+ else -+ echo ibm_ppc64_lpar_dedicated -+ fi -+ # detect powerkvm? -+ fi -+ fi -+fi --- -2.10.2 - diff --git a/SOURCES/0026-Update-the-previous-commit-to-use-system-virt-standa.patch b/SOURCES/0026-Update-the-previous-commit-to-use-system-virt-standa.patch deleted file mode 100644 index 23171b8..0000000 --- a/SOURCES/0026-Update-the-previous-commit-to-use-system-virt-standa.patch +++ /dev/null @@ -1,104 +0,0 @@ -From b933eff4e7c86959a096f15e5372d4491e56a55b Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Mon, 20 Jun 2016 13:14:53 +0100 -Subject: [PATCH 26/27] Update the previous commit to use - - standard for facts. - -Also I renamed ppc64 to power, since that is the official IBM name. ---- - tests/test-ppc64-kvm.sh | 2 +- - tests/test-ppc64-lpar-dedicated.sh | 2 +- - tests/test-ppc64-lpar-shared.sh | 2 +- - virt-what.in | 6 +++--- - virt-what.pod | 15 +++++++++++++++ - 5 files changed, 21 insertions(+), 6 deletions(-) - -diff --git a/tests/test-ppc64-kvm.sh b/tests/test-ppc64-kvm.sh -index ea844e1..c691c96 100755 ---- a/tests/test-ppc64-kvm.sh -+++ b/tests/test-ppc64-kvm.sh -@@ -18,7 +18,7 @@ - root=tests/ppc64-kvm - - output="$(./virt-what --test-root=$root 2>&1)" --expected="ibm_ppc64_kvm" -+expected="ibm_power-kvm" - - if [ "$output" != "$expected" ]; then - echo "$0: test failed because output did not match expected" -diff --git a/tests/test-ppc64-lpar-dedicated.sh b/tests/test-ppc64-lpar-dedicated.sh -index ef99b27..0316ea2 100755 ---- a/tests/test-ppc64-lpar-dedicated.sh -+++ b/tests/test-ppc64-lpar-dedicated.sh -@@ -18,7 +18,7 @@ - root=tests/ppc64-lpar-dedicated - - output="$(./virt-what --test-root=$root 2>&1)" --expected="ibm_ppc64_lpar_dedicated" -+expected="ibm_power-lpar_dedicated" - - if [ "$output" != "$expected" ]; then - echo "$0: test failed because output did not match expected" -diff --git a/tests/test-ppc64-lpar-shared.sh b/tests/test-ppc64-lpar-shared.sh -index eaac0e4..bbc974a 100755 ---- a/tests/test-ppc64-lpar-shared.sh -+++ b/tests/test-ppc64-lpar-shared.sh -@@ -18,7 +18,7 @@ - root=tests/ppc64-lpar-shared - - output="$(./virt-what --test-root=$root 2>&1)" --expected="ibm_ppc64_lpar_shared" -+expected="ibm_power-lpar_shared" - - if [ "$output" != "$expected" ]; then - echo "$0: test failed because output did not match expected" -diff --git a/virt-what.in b/virt-what.in -index a91845e..0e048a2 100644 ---- a/virt-what.in -+++ b/virt-what.in -@@ -316,13 +316,13 @@ fi - if [ "$arch" = "ppc64" ]; 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_ppc64_kvm -+ echo ibm_power-kvm - else - # Assume LPAR, now detect shared or dedicated - if grep -q 'shared_processor_mode=1' "${root}/proc/ppc64/lparcfg"; then -- echo ibm_ppc64_lpar_shared -+ echo ibm_power-lpar_shared - else -- echo ibm_ppc64_lpar_dedicated -+ echo ibm_power-lpar_dedicated - fi - # detect powerkvm? - fi -diff --git a/virt-what.pod b/virt-what.pod -index 4e38414..fe9567f 100644 ---- a/virt-what.pod -+++ b/virt-what.pod -@@ -37,6 +37,21 @@ This is Microsoft Hyper-V hypervisor. - - Status: confirmed by RWMJ - -+=item B -+ -+This is an IBM POWER KVM guest. -+ -+Status: contributed by Adrian Likins. -+ -+=item B -+ -+=item B -+ -+This is an IBM POWER LPAR (hardware partition) in either shared -+or dedicated mode. -+ -+Status: contributed by Adrian Likins. -+ - =item B - - This is an IBM SystemZ (or other S/390) hardware partitioning system. --- -2.10.2 - diff --git a/SOURCES/0027-Add-detection-of-Red-Hat-Enterprise-Virtualization-h.patch b/SOURCES/0027-Add-detection-of-Red-Hat-Enterprise-Virtualization-h.patch deleted file mode 100644 index e17ac2f..0000000 --- a/SOURCES/0027-Add-detection-of-Red-Hat-Enterprise-Virtualization-h.patch +++ /dev/null @@ -1,363 +0,0 @@ -From 15b98e7d56cf8a0e40948db27f341c71640ab252 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Mon, 22 Aug 2016 12:30:25 +0100 -Subject: [PATCH 27/27] Add detection of Red Hat Enterprise Virtualization - hypervisor (RHBZ#1249438). - -Thanks: Xianghua Chen ---- - Makefile.am | 6 ++ - tests/rhev/proc/cpuinfo | 26 +++++++ - tests/rhev/proc/self/status | 41 +++++++++++ - tests/rhev/sbin/dmidecode | 123 +++++++++++++++++++++++++++++++++ - tests/rhev/sbin/uname | 2 + - tests/rhev/sbin/virt-what-cpuid-helper | 2 + - tests/test-rhev.sh | 35 ++++++++++ - virt-what.in | 5 +- - virt-what.pod | 9 ++- - 9 files changed, 247 insertions(+), 2 deletions(-) - create mode 100644 tests/rhev/proc/cpuinfo - create mode 100644 tests/rhev/proc/self/status - create mode 100755 tests/rhev/sbin/dmidecode - create mode 100755 tests/rhev/sbin/uname - create mode 100755 tests/rhev/sbin/virt-what-cpuid-helper - create mode 100755 tests/test-rhev.sh - -diff --git a/Makefile.am b/Makefile.am -index 73dfc7b..d5ee027 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -63,6 +63,7 @@ TESTS = \ - tests/test-rhel5-xen-domU-hvm.sh \ - tests/test-rhel5-xen-domU-hvm-ia64.sh \ - tests/test-rhel5-xen-domU-pv.sh \ -+ tests/test-rhev.sh \ - tests/test-xen-arm.sh \ - tests/test-zvm.sh - -@@ -237,6 +238,11 @@ EXTRA_DIST = \ - tests/rhel5-xen-domU-pv/sys/hypervisor/compilation/compiled_by \ - tests/rhel5-xen-domU-pv/sys/hypervisor/compilation/compile_date \ - tests/rhel5-xen-domU-pv/sys/hypervisor/uuid \ -+ tests/rhev/proc/cpuinfo \ -+ tests/rhev/proc/self/status \ -+ tests/rhev/sbin/dmidecode \ -+ tests/rhev/sbin/uname \ -+ tests/rhev/sbin/virt-what-cpuid-helper \ - tests/xen-arm/proc/cpuinfo \ - tests/xen-arm/proc/device-tree/hypervisor/compatible \ - tests/xen-arm/proc/self/status \ -diff --git a/tests/rhev/proc/cpuinfo b/tests/rhev/proc/cpuinfo -new file mode 100644 -index 0000000..6dba878 ---- /dev/null -+++ b/tests/rhev/proc/cpuinfo -@@ -0,0 +1,26 @@ -+processor : 0 -+vendor_id : GenuineIntel -+cpu family : 6 -+model : 15 -+model name : Intel Celeron_4x0 (Conroe/Merom Class Core 2) -+stepping : 3 -+microcode : 0x1 -+cpu MHz : 3392.302 -+cache size : 4096 KB -+physical id : 0 -+siblings : 1 -+core id : 0 -+cpu cores : 1 -+apicid : 0 -+initial apicid : 0 -+fpu : yes -+fpu_exception : yes -+cpuid level : 10 -+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 syscall nx lm constant_tsc rep_good nopl pni ssse3 x2apic hypervisor lahf_lm -+bogomips : 6784.60 -+clflush size : 64 -+cache_alignment : 64 -+address sizes : 36 bits physical, 48 bits virtual -+power management: -+ -diff --git a/tests/rhev/proc/self/status b/tests/rhev/proc/self/status -new file mode 100644 -index 0000000..5d1fe13 ---- /dev/null -+++ b/tests/rhev/proc/self/status -@@ -0,0 +1,41 @@ -+Name: cat -+State: R (running) -+Tgid: 32687 -+Ngid: 0 -+Pid: 32687 -+PPid: 32670 -+TracerPid: 0 -+Uid: 0 0 0 0 -+Gid: 0 0 0 0 -+FDSize: 256 -+Groups: 0 -+VmPeak: 107916 kB -+VmSize: 107916 kB -+VmLck: 0 kB -+VmPin: 0 kB -+VmHWM: 348 kB -+VmRSS: 348 kB -+VmData: 180 kB -+VmStk: 136 kB -+VmExe: 44 kB -+VmLib: 1880 kB -+VmPTE: 44 kB -+VmSwap: 0 kB -+Threads: 1 -+SigQ: 0/3883 -+SigPnd: 0000000000000000 -+ShdPnd: 0000000000000000 -+SigBlk: 0000000000000000 -+SigIgn: 0000000000000000 -+SigCgt: 0000000000000000 -+CapInh: 0000000000000000 -+CapPrm: 0000001fffffffff -+CapEff: 0000001fffffffff -+CapBnd: 0000001fffffffff -+Seccomp: 0 -+Cpus_allowed: ffff -+Cpus_allowed_list: 0-15 -+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 -diff --git a/tests/rhev/sbin/dmidecode b/tests/rhev/sbin/dmidecode -new file mode 100755 -index 0000000..d44f172 ---- /dev/null -+++ b/tests/rhev/sbin/dmidecode -@@ -0,0 +1,123 @@ -+#!/bin/sh - -+cat <<'EOF' -+# dmidecode 3.0 -+Scanning /dev/mem for entry point. -+SMBIOS 2.8 present. -+9 structures occupying 481 bytes. -+Table at 0x000F1D20. -+ -+Handle 0x0000, DMI type 0, 24 bytes -+BIOS Information -+ Vendor: SeaBIOS -+ Version: seabios-1.7.5-11.el7 -+ 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: Red Hat -+ Product Name: RHEV Hypervisor -+ Version: 4.0-2.el7 -+ Serial Number: 4C4C4544-004C-4B10-8036-C7C04F4A5931 -+ UUID: 469665C0-69F7-436B-BBF3-6632988BEDC8 -+ 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.2.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: F3 06 00 00 FF FB 8B 07 -+ Version: RHEL 7.2.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: 1 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: 1024 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 Clock 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: 0x0003FFFFFFF -+ Range Size: 1 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/rhev/sbin/uname b/tests/rhev/sbin/uname -new file mode 100755 -index 0000000..ab0ec89 ---- /dev/null -+++ b/tests/rhev/sbin/uname -@@ -0,0 +1,2 @@ -+#!/bin/sh - -+echo x86_64 -diff --git a/tests/rhev/sbin/virt-what-cpuid-helper b/tests/rhev/sbin/virt-what-cpuid-helper -new file mode 100755 -index 0000000..86e1188 ---- /dev/null -+++ b/tests/rhev/sbin/virt-what-cpuid-helper -@@ -0,0 +1,2 @@ -+#!/bin/sh - -+echo 'KVMKVMKVM' -diff --git a/tests/test-rhev.sh b/tests/test-rhev.sh -new file mode 100755 -index 0000000..76be547 ---- /dev/null -+++ b/tests/test-rhev.sh -@@ -0,0 +1,35 @@ -+# Test for rhev -+# Copyright (C) 2008-2016 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. -+ -+root=tests/rhev -+ -+output="$(./virt-what --test-root=$root 2>&1)" -+expected="rhev -+kvm" -+ -+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 0e048a2..761fc1b 100644 ---- a/virt-what.in -+++ b/virt-what.in -@@ -203,10 +203,13 @@ if echo "$dmi" | grep -q 'Vendor: Parallels'; then - skip_qemu_kvm=true - fi - --# Check for oVirt. -+# Check for oVirt/RHEV. - if echo "$dmi" | grep -q 'Manufacturer: oVirt'; then - echo ovirt - fi -+if echo "$dmi" | grep -q 'Product Name: RHEV Hypervisor'; then -+ echo rhev -+fi - - # Check for Xen. - -diff --git a/virt-what.pod b/virt-what.pod -index fe9567f..c7a211b 100644 ---- a/virt-what.pod -+++ b/virt-what.pod -@@ -133,7 +133,8 @@ Status: contributed by Evgeniy Sokolov - - =item B - --The guest is running on an oVirt or RHEV node. -+The guest is running on an oVirt node. -+(See also C below). - - Status: contributed by RWMJ, not confirmed - -@@ -160,6 +161,12 @@ this. - - Status: confirmed by RWMJ. - -+=item B -+ -+The guest is running on a Red Hat Enterprise Virtualization (RHEV) node. -+ -+Status: confirmed by RWMJ -+ - =item B - - This is a User-Mode Linux (UML) guest. --- -2.10.2 - diff --git a/SPECS/virt-what.spec b/SPECS/virt-what.spec index b69acef..e304000 100644 --- a/SPECS/virt-what.spec +++ b/SPECS/virt-what.spec @@ -1,41 +1,17 @@ Name: virt-what -Version: 1.13 -Release: 10%{?dist} +Version: 1.18 +Release: 4%{?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 -# These patches are kept in the upstream git repo, in the rhel-7.4 branch. -# http://git.annexia.org/?p=virt-what.git;a=shortlog;h=refs/heads/rhel-7.4 -Patch0001: 0001-Differentiate-between-vserver-host-and-guest.patch -Patch0002: 0002-Detect-new-Xen-VMs-RHBZ-973663.patch -Patch0003: 0003-xen-Don-t-emit-warning-message-if-proc-xen-capabilit.patch -Patch0004: 0004-Fix-various-typos-and-mistakes-in-comments.patch -Patch0005: 0005-Fix-spelling-mistake-in-the-man-page-RHBZ-1099289.patch -Patch0006: 0006-Added-check-and-test-routines-for-Docker.patch -Patch0007: 0007-Added-documentation-for-Docker-tests.patch -Patch0008: 0008-virt-what.in-remove-bash-ism.patch -Patch0009: 0009-virt-what.in-get-effective-uid-in-a-portable-way.patch -Patch0010: 0010-virt-what.in-warn-about-missing-cpuid-virt-helper-pr.patch -Patch0011: 0011-virt-what.in-verify-files-exists-before-grepping-the.patch -Patch0012: 0012-virt-what.in-make-option-processing-portable.patch -Patch0013: 0013-build-use-portable-Makefile-variables.patch -Patch0014: 0014-Add-space-before-parens-in-function-defns-for-readab.patch -Patch0015: 0015-Add-lkvm-detection.patch -Patch0016: 0016-Add-ARM-support.patch -Patch0017: 0017-xen-arm-Fix-path-in-EXTRA_DIST.patch -Patch0018: 0018-Update-copyright-years.patch -Patch0019: 0019-Add-QEMU-KVM-detection-for-ACPI-boot-ARM.patch -Patch0020: 0020-trivial-comment-fixup.patch -Patch0021: 0021-Add-oVirt-RHBZ-1249438.patch -Patch0022: 0022-trivial-virt-what.in-doesn-t-use-tabs.patch -Patch0023: 0023-qemu-kvm-try-dmidecode-on-all-targets.patch -Patch0024: 0024-qemu-kvm-dmidecode-look-for-KVM.patch -Patch0025: 0025-Add-support-for-detecting-ppc64-LPAR-as-virt-guests.patch -Patch0026: 0026-Update-the-previous-commit-to-use-system-virt-standa.patch -Patch0027: 0027-Add-detection-of-Red-Hat-Enterprise-Virtualization-h.patch +# 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. @@ -44,15 +20,6 @@ BuildRequires: /usr/bin/pod2man # Required at build time in order to do 'make check' (for getopt). BuildRequires: util-linux -# Runs the 'which' program to find the helper. -Requires: which - -# git is used for patch management. Since some patches touch autoconf -# files, we must also install autotools. -BuildRequires: git -BuildRequires: autoconf -BuildRequires: automake - # virt-what script uses dmidecode and getopt (from util-linux). # RPM cannot detect this so make the dependencies explicit here. %ifarch aarch64 %{ix86} x86_64 @@ -60,6 +27,9 @@ Requires: dmidecode %endif Requires: util-linux +# Runs the 'which' program to find the helper. +Requires: which + %description virt-what is a shell script which can be used to detect if the program @@ -75,15 +45,34 @@ know about or can't detect. Current types of virtualization detected: + - aws Amazon Web Services cloud guest + - bhyve FreeBSD hypervisor + - docker Docker container - hyperv Microsoft Hyper-V + - ibm_power-kvm + IBM POWER KVM + - ibm_power-lpar_shared + - 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 - 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) @@ -93,15 +82,7 @@ Current types of virtualization detected: %prep %setup -q - -# Use git to manage patches. -# http://rwmj.wordpress.com/2011/08/09/nice-rpm-git-patch-management-trick/ -git init -git config user.email "rjones@redhat.com" -git config user.name "virt-what" -git add . -git commit -a -q -m "%{version} baseline" -git am %{patches} +%autopatch -p1 %build @@ -114,8 +95,10 @@ make install DESTDIR=$RPM_BUILD_ROOT %check -make check - +if ! make check ; then + cat test-suite.log + exit 1 +fi %files %doc README COPYING @@ -125,6 +108,15 @@ make check %changelog +* Tue Oct 17 2017 Richard W.M. Jones - 1.18-4 +- Add patch to recognize ppc64le virtualization. + resolves: rhbz#1147876 + +* Tue Oct 17 2017 Richard W.M. Jones - 1.18-2 +- Rebase to Fedora Rawhide / upstream version. +- Include upstream patches since 1.18 was released. + resolves: rhbz#1476878 + * Tue Mar 28 2017 Richard W.M. Jones - 1.13-10 - Require 'which' program resolves: rhbz#1433005