Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 606084

Summary: Allow control of kvm cpuid option via -cpu flag
Product: Red Hat Enterprise Linux 6 Reporter: Gleb Natapov <gleb>
Component: qemu-kvmAssignee: Gleb Natapov <gleb>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: amit.shah, juzhang, knoel, llim, mkenneth, tburke, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
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: --- Target Upstream Version:
Embargoed:

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

Comment 2 RHEL 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.