From: koder Date: Mon, 4 Aug 2014 11:39:19 +0000 (+0300) Subject: hacky fix: now qemu-kvm is force system to load kvm and kvm-xxx modules. Only intel... X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=refs%2Fheads%2F5.1-updates;p=packages%2Fcentos6%2Fqemu.git hacky fix: now qemu-kvm is force system to load kvm and kvm-xxx modules. Only intel and amd supported Closes-bug:#1338913 Change-Id: I1ec016dc58a524b53a8568e72d2f68374c6e24ab --- diff --git a/kvm.modules b/kvm.modules index 9808105..f99e9ef 100755 --- a/kvm.modules +++ b/kvm.modules @@ -1,6 +1,15 @@ #!/bin/sh case $(uname -m) in + i?86|x86_64) + grep vmx /proc/cpuinfo >/dev/null 2>&1 && vmx=1 + grep svm /proc/cpuinfo >/dev/null 2>&1 && svm=1 + + if [ "$vmx" ] || [ "$svm" ]; then + [ "$vmx" ] && modprobe -b kvm-intel >/dev/null 2>&1 && kvm=1 + [ "$svm" ] && modprobe -b kvm-amd >/dev/null 2>&1 && kvm=1 + fi + ;; ppc64) grep OPAL /proc/cpuinfo >/dev/null 2>&1 && opal=1 @@ -13,4 +22,5 @@ case $(uname -m) in ;; esac + exit 0 diff --git a/qemu.spec b/qemu.spec index f8ee37b..ddbee04 100644 --- a/qemu.spec +++ b/qemu.spec @@ -81,12 +81,14 @@ %global kvm_package system-x86 %global kvm_target i386 %global need_qemu_kvm 1 +%global need_kvm_modfile 1 %endif %ifarch x86_64 %global system_x86 kvm %global kvm_package system-x86 %global kvm_target x86_64 %global need_qemu_kvm 1 +%global need_kvm_modfile 1 %endif %ifarch ppc64 %global system_ppc kvm @@ -152,7 +154,7 @@ Summary: QEMU is a FAST! processor emulator Name: qemu Version: 2.0.0 -Release: 4.mira1 +Release: 4 Epoch: 2 License: GPLv2+ and LGPLv2+ and BSD Group: Development/Tools