[virt-tools-list] [PATCH 2/3] qemu/kvm: try dmidecode on all targets
Andrew Jones
drjones at redhat.com
Tue Oct 27 17:16:03 UTC 2015
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 2c958ca3e5d45..0045bcb5d7d84 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 64db9eb23bacb..114470a1e8439 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 5d7e083febc0d..ae083128afadc 100644
--- a/virt-what.in
+++ b/virt-what.in
@@ -257,6 +257,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
@@ -264,11 +269,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
--
1.8.3.1
More information about the virt-tools-list
mailing list