must manually load kvm_hv or kvm_pr before using kvm on ppc64

Bug #1419855 reported by Scott Moser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qemu (Ubuntu)
Fix Released
High
Unassigned
Trusty
Confirmed
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-3.16.0-30-generic 3.16.0-30.40~14.04.1
ProcVersionSignature: User Name 3.16.0-30.40~14.04.1-generic 3.16.7-ckt3
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_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: linux-lts-utopic
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Scott Moser (smoser) wrote :
bugproxy (bugproxy)
tags: added: architecture-ppc64le bugnameltc-121656 severity-medium targetmilestone-inin1404
Revision history for this message
Breno Leitão (breno-leitao) wrote :

> 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-pr >/dev/null 2>&1 && kvm=1
  if [ "$opal" ]; then
            modprobe -b kvm-hv >/dev/null 2>&1
  fi

Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- 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/3.18.5-201.fc21.x86_64/kernel/arch/x86/kvm/kvm-intel.ko.xz
license: GPL
author: Qumranet
alias: cpu:type:x86,ven*fam*mod*:feature:*0085*
depends: kvm
<...>

---------------------------

The "alias: cpu:type:x86,ven*fam*mod*:feature:*0085*" will instruct the kernel to load this module whenever this feature is available. The same is not true on other platforms.

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-ppc.qemu-kvm.upstart.

Adam Conrad (adconrad)
affects: linux-lts-utopic (Ubuntu) → qemu (Ubuntu)
Revision history for this message
Adam Conrad (adconrad) wrote :

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_ARCH),ppc64le),)

This should read ppc64el, or be HOST_CPU_ARCH, or be installed for all powerpc targets, and adjusted to DTRT on big-endian too.

Revision history for this message
bugproxy (bugproxy) wrote :

ifneq (,)

Changed in qemu (Ubuntu):
importance: Undecided → High
status: New → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qemu - 1:2.2+dfsg-5expubuntu4

---------------
qemu (1:2.2+dfsg-5expubuntu4) vivid; urgency=medium

  [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
Revision history for this message
bugproxy (bugproxy) wrote :

ifneq (,)
ifneq (,)

Scott Moser (smoser)
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
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

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.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.