powertop crashes inside intel kvm machine
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
powertop (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Running powertop inside a KVM intel VM crashes with this output:
unknown op '{'
powertop should not crash out to prompt.
Upstream patch supposed to address this:
https:/
1. $ lsb_release -rd
Description: Ubuntu Xenial Xerus (development branch)
Release: 16.04
2. $ apt-cache policy powertop
powertop:
Installed: 2.8-1
Candidate: 2.8-1
Version table:
*** 2.8-1 500
500 http://
100 /var/lib/
3. sudo powertop should startup and run as it does on baremetal (without error)
4. sudo powertop exits 254 and with the message above.
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: powertop 2.8-1
ProcVersionSign
Uname: Linux 4.3.0-7-generic x86_64
ApportVersion: 2.19.4-0ubuntu1
Architecture: amd64
Date: Thu Feb 4 11:30:02 2016
Ec2AMI: ami-0000079f
Ec2AMIManifest: FIXME
Ec2Availability
Ec2InstanceType: m1.large
Ec2Kernel: None
Ec2Ramdisk: None
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: powertop
UpgradeStatus: No upgrade log present (probably fresh install)
The suggested patch in my original report is already applied.
Instead, I believe this is an issue under KVM where the MSR powertop is using (IA32_APERF, 0xe8) is an unimplemented MSR.
http:// www.spinics. net/lists/ kvm/msg120054. html
Ideally powertop would detect it's running under KVM and avoid using unimplemented MSRs. For example if could skip sampling the IA32_APERF MSR and use only TSC records.
Alternatively, powertop could have a more robust get_msr() method which handled failure with fallback behavior (and warn of reduced accuracy due to unavailable MSRs).