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 625333 - qemu treatment of -nodefconfig and -readconfig problematic for debug
Summary: qemu treatment of -nodefconfig and -readconfig problematic for debug
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: beta
: ---
Assignee: john cooper
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 580953
TreeView+ depends on / blocked
 
Reported: 2010-08-19 05:47 UTC by john cooper
Modified: 2014-07-25 03:46 UTC (History)
8 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.135.el6
Doc Type: Bug Fix
Doc Text:
Cause Currently -nodefconfig doesn't disable import of cpu-x86_64.conf. This combined with -readconfig imports occurring after cpudef_setup() disallow pointing qemu at an alternate cpu-x86_64.conf file. Consequence User effectively can't read in alternate cpu-x86_64.conf file impacting qemu debug and potentially end user local configuration. Workaround Requires moving/overwriting default config files by the user. Result -nodefconfig works as intended and intuitively expected.
Clone Of:
Environment:
Last Closed: 2011-05-19 11:29:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Example patch providing above fix. (1.66 KB, application/octet-stream)
2010-08-19 05:47 UTC, john cooper
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0534 0 normal SHIPPED_LIVE Important: qemu-kvm security, bug fix, and enhancement update 2011-05-19 11:20:36 UTC

Description john cooper 2010-08-19 05:47:32 UTC
Created attachment 439585 [details]
Example patch providing above fix.

Description of problem:

    Currently -nodefconfig doesn't disable import of cpu-x86_64.conf.
    This combined with -readconfig imports occurring after cpudef_setup()
    disallow pointing qemu at an alternate cpu-x86_64.conf file.

    Notably, -readconfig support is broken.

Version-Release number of selected component (if applicable):

    RHEL6.0-20100816.n.0-Server-x86_64

How reproducible:

  launch qemu with:

    -nodefconfig -readconfig ? -readconfig mydebug/cpu-x86_64.conf

  the definitions in the system installed:

    /usr/share/qemu-kvm/cpu-model/cpu-x86_64.conf

  are unconditionally imported while the:

    mydebug/cpu-x86_64.conf

  definitions are read in but have no effect due to occurring after the
  call to cpudef_setup() in the above example.


Steps to Reproduce:
(as stated above)

Actual results:

  can't read in alternate cpu-x86_64.conf file.

Expected results:

  should be able to use CLI as described above for debug.

Additional info:

1.  Broken -readconfig support went unnoticed as libvirt does not use this
option.  Given libvirt dependencies it may be necessary to entertain
another flag to disable import of cpu-x86_64.conf as libvirt assumes
this file is unconditionally imported.

2.  A patch is attached which includes import of cpu-x86_64.conf under
-nodefconfig and fixes the behavior of -readconfig.

3.  All of the above and related cpu config logic is subject to change
pending reconciling this rhel6 special functionality upstream.

Comment 8 Suqin Huang 2011-02-18 03:26:21 UTC
Remove "sse4a, abm, svm" from cpu64-rhel6 extfeature_ecx in my-cpu-x86_64.conf config file.
boot guest with -nodefconfig -readconfig ? -readconfig my-cpu-x86_64.conf -cpu cpu64-rhel6,check
on host lack "sse4a, abm, svm"

Result: fix on qemu-kvm-0.12.1.2-2.145.el6.x86_64

1. qemu-kvm-0.12.1.2-2.132.el6.x86_64

[root@amd-4450b-4-2 ~]# /usr/libexec/qemu-kvm -nodefconfig -readconfig ? -readconfig my-cpu-x86_64.conf -cpu cpu64-rhel6,check
parsed config file /usr/share/qemu-kvm/cpu-model/cpu-x86_64.conf
parsed config file /root/cpu-x86_64.conf
warning: host cpuid 8000_0001:ecx flag restricted to guest 'svm' [0x00000004]
warning: host cpuid 8000_0001:ecx lacks requested flag 'abm' [0x00000020]
warning: host cpuid 8000_0001:ecx lacks requested flag 'sse4a' [0x00000040]

2. qemu-kvm-0.12.1.2-2.145.el6.x86_64

1). /usr/libexec/qemu-kvm -nodefconfig -readconfig ? -readconfig my-cpu-x86_64.conf -cpu cpu64-rhel6,check
parsed config file /usr/share/qemu-kvm/cpu-model/cpu-x86_64.conf
parsed config file /root/cpu-x86_64.conf
Using CPU model "cpu64-rhel6,check"

2). /usr/libexec/qemu-kvm -nodefconfig -readconfig ? -cpu cp4-rhel6,check
parsed config file /usr/share/qemu-kvm/cpu-model/cpu-x86_64.conf
Using CPU model "cpu64-rhel6,check"
warning: host cpuid 8000_0001:ecx flag restricted to guest 'svm' [0x00000004]
warning: host cpuid 8000_0001:ecx lacks requested flag 'abm' [0x00000020]
warning: host cpuid 8000_0001:ecx lacks requested flag 'sse4a' [0x00000040]

Comment 10 Miya Chen 2011-03-10 02:32:27 UTC
move to verified based on comment#8

Comment 11 john cooper 2011-05-05 14:42:30 UTC
Added CCFR

Comment 12 john cooper 2011-05-05 14:42:30 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause
    Currently -nodefconfig doesn't disable import of cpu-x86_64.conf.
    This combined with -readconfig imports occurring after cpudef_setup()
    disallow pointing qemu at an alternate cpu-x86_64.conf file.

Consequence
    User effectively can't read in alternate cpu-x86_64.conf file impacting
    qemu debug and potentially end user local configuration.

Workaround
    Requires moving/overwriting default config files by the user.

Result
    -nodefconfig works as intended and intuitively expected.

Comment 13 errata-xmlrpc 2011-05-19 11:29:12 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0534.html

Comment 14 errata-xmlrpc 2011-05-19 12:47:42 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0534.html


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