From 15314ad0a6e3764f070b60f6df02a2f881b09fce Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 29 Jun 2017 10:07:38 +0100 Subject: [PATCH] Print 'qemu' fact when running in qemu environment on POWER 9 (RHBZ#1455676). Thanks Nageswara R. Sastry --- tests/test-ppc64-kvm.sh | 3 ++- virt-what.in | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test-ppc64-kvm.sh b/tests/test-ppc64-kvm.sh index c691c96..3a90429 100755 --- a/tests/test-ppc64-kvm.sh +++ b/tests/test-ppc64-kvm.sh @@ -18,7 +18,8 @@ root=tests/ppc64-kvm output="$(./virt-what --test-root=$root 2>&1)" -expected="ibm_power-kvm" +expected="qemu +ibm_power-kvm" 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 1a373ed..aee10cf 100644 --- a/virt-what.in +++ b/virt-what.in @@ -295,6 +295,9 @@ if ! "$skip_qemu_kvm"; then # another CPUID leaf for non-accelerated qemu. if grep -q 'QEMU' "${root}/proc/cpuinfo"; then echo qemu + # https://bugzilla.redhat.com/show_bug.cgi?id=1455676#c6 + elif grep -q 'emulated by qemu' "${root}/proc/cpuinfo"; then + echo qemu fi fi fi -- 1.8.3.1