must manually load kvm_hv or kvm_pr before using kvm on ppc64
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| qemu (Ubuntu) |
High
|
Unassigned | |||
| Trusty |
Low
|
Unassigned | |||
Bug Description
on x86_64, kvm modules load automatically.
on ppc64, they do not.
The user has to manually load them via /etc/modules or something like:
grep -q kvm_ /proc/modules || modprobe kvm_hv || modprobe kvm_pr
Should / could kvm modules be automatically loaded on ppc64?
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: linux-image-
ProcVersionSign
Uname: Linux 3.16.0-30-generic ppc64le
ApportVersion: 2.14.1-0ubuntu3.6
Architecture: ppc64el
Date: Mon Feb 9 15:56:34 2015
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: linux-lts-utopic
UpgradeStatus: No upgrade log present (probably fresh install)
| Scott Moser (smoser) wrote : | #1 |
| tags: | added: architecture-ppc64le bugnameltc-121656 severity-medium targetmilestone-inin1404 |
| Breno Leitão (breno-leitao) wrote : | #2 |
------- Comment From <email address hidden> 2015-02-11 15:23 EDT-------
On x86, KVM modules are loaded by checking if some processor features are available.
For instance, in my x86_64 laptop:
-------
[root@lagarcia ~]# modinfo kvm-intel
filename: /lib/modules/
license: GPL
author: Qumranet
alias: cpu:type:
depends: kvm
<...>
-------
The "alias: cpu:type:
On Power, you need to explicitly load the modules. This is usually done by adding scripts wherever appropriate in the system to automatically load modules during system start up. In the case of KVM modules, these scripts are usually included in the QEMU package. From what I could grasp (sorry if I am mistaken as this is the first time I am looking at an Ubuntu source package), this is already done in Ubuntu through the script qemu-system-
| affects: | linux-lts-utopic (Ubuntu) → qemu (Ubuntu) |
| Adam Conrad (adconrad) wrote : | #4 |
So, there's absolutely an init script in qemu-system-ppc that is meant to do this, but it's not shipped, due to a typo in debian/rules:
ifneq ($(filter $(DEB_HOST_
This should read ppc64el, or be HOST_CPU_ARCH, or be installed for all powerpc targets, and adjusted to DTRT on big-endian too.
| bugproxy (bugproxy) wrote : | #5 |
ifneq (,)
| Changed in qemu (Ubuntu): | |
| importance: | Undecided → High |
| status: | New → Triaged |
| Launchpad Janitor (janitor) wrote : | #7 |
This bug was fixed in the package qemu - 1:2.2+dfsg-
---------------
qemu (1:2.2+
[Scott Moser]
* update d/kvm.powerpc to avoid use of awk, which isn't allowed by aa
profile when started by libvirt.
[Serge Hallyn]
* add symlink qemu-system-ppc64le -> qemu-system-ppc64
* debian/rules: fix DEB_HOST_ARCh fix to ppc64el for installing qemu-kvm init script
(LP: #1419855)
[Chris J Arges]
* Determine if we are running inside a virtual environment. If running inside
a virtualized enviornment do _not_ automatically enable KSM. (LP: #1418339)
-- Serge Hallyn <email address hidden> Thu, 12 Feb 2015 13:04:21 -0600
| Changed in qemu (Ubuntu): | |
| status: | Triaged → Fix Released |
| bugproxy (bugproxy) wrote : | #8 |
ifneq (,)
ifneq (,)
| no longer affects: | qemu (Ubuntu Zesty) |
| no longer affects: | qemu (Ubuntu Xenial) |
| no longer affects: | qemu (Ubuntu Yakkety) |
| Changed in qemu (Ubuntu Trusty): | |
| status: | New → Confirmed |
| importance: | Undecided → Low |
| ChristianEhrhardt (paelzer) wrote : | #9 |
Since that was fixed a long time ago, and there is activity to consider fixing trusty in a dup in another bug I'm closing "the remaining" bug (Trusty SRU) as a dup.


> Should / could kvm modules be automatically loaded on ppc64?
Yes, mainly if it is running in opal mode. Something as:
grep OPAL /proc/cpuinfo >/dev/null 2>&1 && opal=1
modprobe -b kvm >/dev/null 2>&1
modprobe -b kvm-hv >/dev/null 2>&1
modprobe -b kvm-pr >/dev/null 2>&1 && kvm=1
if [ "$opal" ]; then
fi