Bug 606084 - Allow control of kvm cpuid option via -cpu flag
Summary: Allow control of kvm cpuid option via -cpu flag
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm   
(Show other bugs)
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Gleb Natapov
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-20 13:31 UTC by Gleb Natapov
Modified: 2013-12-09 00:49 UTC (History)
7 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.84.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-07-16 07:13:44 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Gleb Natapov 2010-06-20 13:31:49 UTC
Allow disabling of kvm cpuid flags from qemu command line.

Comment 2 RHEL Product and Program Management 2010-06-20 13:43:21 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 3 Amit Shah 2010-06-21 11:38:54 UTC
Gleb, can you mention why this is needed and how to test this?

Comment 4 Gleb Natapov 2010-06-21 11:49:38 UTC
I personally want to have it for debug purpose. If I suspect that there is a problem with kvmclock for instance I can't ask QE to reproduce it without kvmclock since there is not way to disable it without recompile source (disabling kvmclock from kernel command line didn't work in rhel5, haven't checked rhel6). Testing is easy: run rhel6/5 guest and check that kvmclock is in /sys/devices/system/clocksource/clocksource0/available_clocksource. Then run the same guest with -cpu qemu64,-kvmclock and check that kvmclock is not there.

Comment 8 juzhang 2010-07-16 07:11:06 UTC
According to comment4 test suggestion.
Tested on qemu-kvm-0.12.1.2-2.77.el6,whatever you boot with -kvmclock,qemu-kvm will promote "CPU feature kvmclock not found
CPU feature kvmclock not found".


Verified on qemu-kvm-0.12.1.2-2.96.el6,pass  
I both tested guest rhel6/5,take rhel6 for example.

Steps:
1. boot guest with -cpu qemu64
#/usr/libexec/qemu-kvm -m 2G -smp 2 -drive file=/root/zhangjunyi/rhel6.64.qcow2,if=none,id=test,boot=on,cache=none,format=qcow2 -device virtio-blk-pci,drive=test -cpu qemu64 -monitor stdio -boot order=cdn,menu=on -netdev tap,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,mac=22:11:22:45:66:93 -vnc :9 -qmp tcp:0:4445,server,nowait

2 in guest
cat /sys/devices/system/clocksource/clocksource0/available_clocksource
kvm-clock tsc acpi_pm 

kvm-clock is here.
1. boot guest with -cpu qemu64 -kvmclock
#/usr/libexec/qemu-kvm -m 2G -smp 2 -drive file=/root/zhangjunyi/rhel6.64.qcow2,if=none,id=test,boot=on,cache=none,format=qcow2 -device virtio-blk-pci,drive=test -cpu qemu64,-kvmclock -monitor stdio -boot order=cdn,menu=on -netdev tap,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,mac=22:11:22:45:66:93 -vnc :9 -qmp tcp:0:4445,server,nowait

2. in guest
# cat /sys/devices/system/clocksource/clocksource0/available_clocksource
tsc acpi_pm 

kvmclock is not in here

Comment 9 juzhang 2010-07-16 07:13:44 UTC
according to comment8,close this issue.


Note You need to log in before you can comment on or make changes to this bug.