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 \
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 \
--- /dev/null
+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:
+
--- /dev/null
+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
--- /dev/null
+#!/bin/sh -
+exit 1
--- /dev/null
+#!/bin/sh -
+echo x86_64
--- /dev/null
+#!/bin/sh -
+echo LKVMLKVMLKVM
--- /dev/null
+# 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
set -u
root=''
skip_qemu_kvm=false
+skip_lkvm=false
VERSION="@VERSION@"
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
fi
fi
+if ! "$skip_lkvm"; then
+ if [ "$cpuid" = "LKVMLKVMLKVM" ]; then
+ echo lkvm
+ fi
+fi
+
# Check for Docker.
if [ -f "${root}/.dockerinit" ]; then
echo docker
Status: confirmed by RWMJ.
+=item B<lkvm>
+
+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<openvz>
The guest appears to be running inside an OpenVZ or Virtuozzo