Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 606084 - Allow control of kvm cpuid option via -cpu flag
Allow control of kvm cpuid option via -cpu flag
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: Gleb Natapov
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-20 09:31 EDT by Gleb Natapov
Modified: 2013-12-08 19:49 EST (History)
7 users (show)

See Also:
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 03:13:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Gleb Natapov 2010-06-20 09:31:49 EDT
Allow disabling of kvm cpuid flags from qemu command line.
Comment 2 RHEL Product and Program Management 2010-06-20 09:43:21 EDT
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 07:38:54 EDT
Gleb, can you mention why this is needed and how to test this?
Comment 4 Gleb Natapov 2010-06-21 07:49:38 EDT
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 03:11:06 EDT
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 03:13:44 EDT
according to comment8,close this issue.

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