Bug 492178

Summary: virsh capabilities run w/ qemu driver does not show vmx flags in <host> section
Product: Red Hat Enterprise Linux 5 Reporter: Perry Myers <pmyers>
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 5.4CC: apevec, berrange, dallan, kxiong, llim, ovirt-maint, rjones, virt-maint, xen-maint
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-0.8.2-1.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-13 22:51:14 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 Perry Myers 2009-03-25 18:38:06 UTC
Description of problem:
virsh capabilities should show presence of vmx flags in <host> section.  Running virsh capabilities on a box with kvm and kvm_intel modules loaded results in:

<capabilities>

  <host>
    <cpu>
      <arch>x86_64</arch>
    </cpu>
    <topology>
      <cells num='1'>
        <cell id='0'>
          <cpus num='2'>
            <cpu id='0'/>
            <cpu id='1'/>
          </cpus>
        </cell>
      </cells>
    </topology>
  </host>

vmx flag presence is not reported.

Version-Release number of selected component (if applicable):
kvm-83-20.el5ovirt
libvirt-0.5.1-3.el5ovirt

Also reproduced w/
libvirt-0.6.1-4.el5.x86_64.rpm from:
http://veillard.com/libvirt/5.4/x86_64/

How reproducible:
Every time

Steps to Reproduce:
1.
2. 
3.
  
Actual results:
vmx flag is not shown

Expected results:
vmx flag should be present

Additional info:

Comment 1 Alan Pevec 2009-03-25 22:49:53 UTC
From IRC:
<danpb>   <host>
<danpb>     <cpu>
<danpb>       <arch>x86_64</arch>
<danpb>       <features>      
<danpb>         <vmx/>
<danpb>       </features>     
<danpb>     </cpu>
...
<danpb> oh hang on, i'm using xen here
<danpb> bet this is a QMEU driver bug 


...but why is <cpu> not HV independent? Seems like a design issue.

Comment 2 Daniel Veillard 2009-04-23 19:46:53 UTC
True, seeing the same thing here. <vmx/> is present on Xen but missing
on KVM, with otherwise same stack, can't garantee it will be fixed for
5.4 though it should be relatively simple to fix,

Daniel

Comment 3 Daniel Veillard 2009-04-24 09:15:09 UTC
Well there is various pieces of code doing this already but this need to be cleaned up, and I'm afraid the refactoring is too much change for 5.4 at this
point. So a priori postponed to a later release.

Daniel

Comment 4 Daniel Berrangé 2009-10-29 17:08:28 UTC
Upstream libvirt is working on exposing full host CPU flags data. In the meantime we should do a quick fix to expose  vmx/svm flags so QEMU driver is on a par with the Xen driver.

Comment 5 Daniel Veillard 2010-01-14 15:24:06 UTC
I don't think we can cover this for 5.5 at this point, retargetting it for 5.6

Daniel

Comment 6 Jiri Denemark 2010-09-02 11:59:50 UTC
Fixed in libvirt-0.8.2-1.el5

Comment 8 koka xiong 2010-10-20 08:17:06 UTC
Verified on x86-64 kvm Intel and AMD
the steps on AMD
run virsh capabilities
 <cpu>
      <arch>x86_64</arch>
      <model>phenom</model>
  <topology sockets='1' cores='4' threads='1'/>
      <feature name='wdt'/>
      <feature name='skinit'/>
      <feature name='osvw'/>
      <feature name='3dnowprefetch'/>
      <feature name='misalignsse'/>
      <feature name='sse4a'/>
      <feature name='abm'/>
      <feature name='cr8legacy'/>
      <feature name='extapic'/>
      <feature name='cmp_legacy'/>
      <feature name='lahf_lm'/>
      <feature name='rdtscp'/>
      <feature name='pdpe1gb'/>
      <feature name='popcnt'/>
      <feature name='cx16'/>
      <feature name='ht'/>
      <feature name='vme'/>
    </cpu>
Look at the file /usr/share/libvirt/cpu_map.xml
the svm is included in phenom model
So the bug is verified

Comment 10 errata-xmlrpc 2011-01-13 22:51:14 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/RHEA-2011-0060.html