Blob Blame History Raw
From 0b7c28b283649783d011c059ef0321d349a0ce46 Mon Sep 17 00:00:00 2001
From: Adrian Likins <alikins@redhat.com>
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