Bug 625333 - qemu treatment of -nodefconfig and -readconfig problematic for debug
qemu treatment of -nodefconfig and -readconfig problematic for debug
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.0
All Linux
medium Severity medium
: beta
: ---
Assigned To: john cooper
Virtualization Bugs
:
Depends On:
Blocks: 580953
  Show dependency treegraph
 
Reported: 2010-08-19 01:47 EDT by john cooper
Modified: 2014-07-24 23:46 EDT (History)
8 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-05-19 07:29:12 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)
Example patch providing above fix. (1.66 KB, application/octet-stream)
2010-08-19 01:47 EDT, john cooper
no flags Details

  None (edit)
Description john cooper 2010-08-19 01:47:32 EDT
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-17 22:26:21 EST
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-09 21:32:27 EST
move to verified based on comment#8
Comment 11 john cooper 2011-05-05 10:42:30 EDT
Added CCFR
Comment 12 john cooper 2011-05-05 10:42:30 EDT
    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 07:29:12 EDT
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 08:47:42 EDT
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.