[virt-tools-list] [virt-what PATCH] Add support for KVM on System Z

Thomas Huth thuth at redhat.com
Tue Jul 4 14:20:40 UTC 2017


KVM on System Z can be discovered in the same way as z/VM, by
looking at the "VM* Control Program" lines in /proc/sysinfo.

Signed-off-by: Thomas Huth <thuth at redhat.com>
---
 virt-what.in  | 4 +++-
 virt-what.pod | 8 +++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/virt-what.in b/virt-what.in
index 39afedb..4b86d96 100644
--- a/virt-what.in
+++ b/virt-what.in
@@ -193,7 +193,9 @@ fi
 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
+        if grep -q 'VM.*Control Program.*KVM/Linux' "${root}/proc/sysinfo"; then
+            echo ibm_systemz-kvm
+        elif grep -q 'VM.*Control Program.*z/VM' "${root}/proc/sysinfo"; then
             echo ibm_systemz-zvm
         elif grep -q '^LPAR' "${root}/proc/sysinfo"; then
             echo ibm_systemz-lpar
diff --git a/virt-what.pod b/virt-what.pod
index 272be70..2c087bf 100644
--- a/virt-what.pod
+++ b/virt-what.pod
@@ -78,7 +78,7 @@ Status: not confirmed
 This is Linux running directly on an LPAR on an IBM SystemZ
 hardware partitioning system.
 
-Status: not confirmed
+Status: confirmed by Thomas Huth
 
 =item B<ibm_systemz-zvm>
 
@@ -87,6 +87,12 @@ hardware partitioning system.
 
 Status: confirmed by RWMJ using a Fedora guest running in z/VM
 
+=item B<ibm_systemz-kvm>
+
+This is a KVM guest running on an IBM System Z hardware system.
+
+Status: contributed by Thomas Huth
+
 =item B<linux_vserver>
 
 This is printed for backwards compatibility with older virt-what which
-- 
1.8.3.1




More information about the virt-tools-list mailing list