• Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Undefined Undefined
    • None
    • rhel-9.6
    • libvirt
    • None
    • No
    • None
    • rhel-sst-virt-tools
    • ssg_virtualization
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      What were you trying to do that didn't work?

      Report incorrect CPU model blockers in domain capabilities.

      How reproducible is this bug?:

      100%

      Steps to reproduce

      1. Execute the below shell script to compare CPU model blockers in domain capabilities  with qemu.
        un_usable_model=$(virsh domcapabilities --xpath "//model[@usable='no']/text()")
        all_model_pass="True"
        for model in $un_usable_model;do
            lacked_feature=()
            domcap_blocked_feature=$(virsh domcapabilities --xpath "//blockers[@model='$model']//feature"|awk -F '"' '{ print $2 }'| tr '\n' ' ')
            qemu_feature=($(diff <(virsh qemu-monitor-command 3 "{\"execute\":\"query-cpu-model-expansion\",\"arguments\":{\"type\":\"static\", \"model\":{\"name\":\"$model\"}}}" | jq ".return.model.props") \
                                 <(virsh qemu-monitor-command 3 "{\"execute\":\"query-cpu-model-expansion\",\"arguments\":{\"type\":\"static\", \"model\":{\"name\":\"host\"}}}" | jq ".return.model.props") \
                               | grep '^<' | grep true | awk -F '"' '{print $2}' | tr '\n' ' '))
        
           for feature in "${qemu_feature[@]}"; do
           if echo "$domcap_blocked_feature" | grep -q "$feature"; then
               continue
           else
               lacked_feature+=($feature)
           fi
           done
        
           if [ "${#lacked_feature[@]}" -ne 0 ]; then
               echo -e "****Model name:$model blocked feature is lacking in qemu qmp,but not lacking in the virsh domcap:${lacked_feature[@]}\n"
               all_model_pass="False"
           fi
        done
        
           if [ "$all_model_pass" == "True" ];then
               echo "Checking the current host virsh domcap blocker lacked feature PASS"
           fi un_usable_model=$(virsh domcapabilities --xpath "//model[@usable='no']/text()")
        all_model_pass="True"
        for model in $un_usable_model;do
            lacked_feature=()
            domcap_blocked_feature=$(virsh domcapabilities --xpath "//blockers[@model='$model']//feature"|awk -F '"' '{ print $2 }'| tr '\n' ' ')
            qemu_feature=($(diff <(virsh qemu-monitor-command 3 "{\"execute\":\"query-cpu-model-expansion\",\"arguments\":{\"type\":\"static\", \"model\":{\"name\":\"$model\"}}}" | jq ".return.model.props") \
                                 <(virsh qemu-monitor-command 3 "{\"execute\":\"query-cpu-model-expansion\",\"arguments\":{\"type\":\"static\", \"model\":{\"name\":\"host\"}}}" | jq ".return.model.props") \
                               | grep '^<' | grep true | awk -F '"' '{print $2}' | tr '\n' ' '))
        
           for feature in "${qemu_feature[@]}"; do
           if echo "$domcap_blocked_feature" | grep -q "$feature"; then
               continue
           else
               lacked_feature+=($feature)
           fi
           done
        
           if [ "${#lacked_feature[@]}" -ne 0 ]; then
               echo -e "****Model name:$model blocked feature is lacking in qemu qmp,but not lacking in the virsh domcap:${lacked_feature[@]}\n"
               all_model_pass="False"
           fi
        done
        
           if [ "$all_model_pass" == "True" ];then
               echo "Checking the current host virsh domcap blocker lacked feature PASS"
           fi
        

       

      No Host cpu model name Env Domcap Lacked feature list
      1 Skylake-Server
      1. rpm -q libvirt qemu-kvm;uname -r
        libvirt-10.10.0-6.el10.x86_64
        qemu-kvm-9.1.0-13.el10.x86_64
        6.12.0-31.el10.x86_64
      skylake_server_domcap.xml skylake_server_lacked_feature
      2 Cascadelake-Server ]# uname -r;rpm -q libvirt qemu-kvm
      5.14.0-570.4.1.el9_6.x86_64
      libvirt-10.10.0-7.1.el9_6.x86_64
      qemu-kvm-9.1.0-15.el9.x86_64
      Cascadelake_domcap.xml Cascadelake_lacked_feature
      3 Icelake-Server  ~]# rpm -q libvirt qemu-kvm ;uname -r 
      libvirt-10.10.0-6.el9.x86_64
      qemu-kvm-9.1.0-14.el9.x86_64
      5.14.0-565.el9.x86_64
      IceLake_domcap.xml Icelake_lacked_feature
      4 Cooperlake ~]# uname -r ;rpm -q libvirt qemu-kvm
      5.14.0-570.4.1.el9_6.x86_64
      libvirt-10.10.0-7.1.el9_6.x86_64
      qemu-kvm-9.1.0-15.el9.x86_64
      Cooperlake.xml Cooperlake_lacked_feature
      5 SapphireRapids ~]# uname -r;rpm -q libvirt qemu-kvm
      5.14.0-570.1.1.el9_6.x86_64
      libvirt-10.10.0-7.1.el9_6.x86_64
      qemu-kvm-9.1.0-15.el9.x86_64
      SapphireRapids_domcap.xml SapphireRapids_lacked_feature
      6 GraniteRapids ~]# uname -r;rpm -q libvirt qemu-kvm
      5.14.0-570.3.1.el9_6.x86_64
      libvirt-10.10.0-7.el9.x86_64
      qemu-kvm-9.1.0-15.el9.x86_64
      GraniteRapids_domcap.xml GraniteRapids_lacked_feature
      7 SierraForest #uname -r;rpm -q libvirt qemu-kvm
      5.14.0-570.4.1.el9_6.x86_64
      libvirt-10.10.0-7.1.el9_6.x86_64
      qemu-kvm-9.1.0-15.el9.x86_64
      SierraForest_domcap.xml SF_lacked_feature
      8 EPYC ~]# uname -r;rpm -q libvirt qemu-kvm 
      5.14.0-570.1.1.el9_6.x86_64
      libvirt-10.10.0-7.1.el9_6.x86_64
      qemu-kvm-9.1.0-15.el9.x86_64
      EPYC_domcap.xml EPYC_lacked_feature
      9 EPYC-Rome ~# rpm -q libvirt qemu-kvm
      libvirt-10.10.0-5.el10.x86_64
      qemu-kvm-9.1.0-13.el10.x86_64
      #uname -r
      6.12.0-52.el10.x86_64
      EPYC_rome_domcap.xml rome_lacked_feature
      10 EPYC-Milan :~# rpm -q libvirt qemu-kvm;uname -r
      libvirt-10.10.0-6.el10.x86_64
      qemu-kvm-9.1.0-13.el10.x86_64
      6.12.0-48.el10.x86_64
      millian-domcap.xml milian_lacked_feature
      11 EPYC-Genoa :~# rpm -q libvirt qemu-kvm;uname -r
      libvirt-10.10.0-3.el10.x86_64
      qemu-kvm-9.1.0-8.el10.x86_64
      6.11.0-29.el10.x86_64
      ... PASS
      12 Broadwell ~]# rpm -q libvirt qemu-kvm;uname -r
      libvirt-10.10.0-6.el9.x86_64
      qemu-kvm-9.1.0-14.el9.x86_64
      5.14.0-569.el9.x86_64
      Broadwell_domcap.xml Broadwell_lacked_feature
      13 Hashwell ~]# rpm -q libvirt qemu-kvm;uname -r
      libvirt-10.10.0-6.el9.x86_64
      qemu-kvm-9.1.0-14.el9.x86_64
      5.14.0-567.el9.x86_64
      Haswell_domcap.xml Haswell_lacked_feature

       

      The lacked blockers are shown in last item for the sheet above.

        1. Broadwell_domcap.xml
          69 kB
        2. Broadwell_lacked_feature
          10 kB
        3. Cascadelake_domcap.xml
          50 kB
        4. Cascadelake_lacked_feature
          10 kB
        5. comet_lake_domcap.xml
          60 kB
        6. comet_lake_lacked_feature
          11 kB
        7. Cooperlake_lacked_feature
          10 kB
        8. Cooperlake.xml
          49 kB
        9. EPYC_domcap.xml
          64 kB
        10. EPYC_lacked_feature
          1 kB
        11. EPYC_rome_domcap.xml
          53 kB
        12. GraniteRapids_domcap.xml
          32 kB
        13. GraniteRapids_lacked_feature
          9 kB
        14. GraniteRapids_lacked_feature-1
          9 kB
        15. Haswell_domcap.xml
          81 kB
        16. Haswell_lacked_feature
          11 kB
        17. IceLake_domcap.xml
          41 kB
        18. IceLake_domcap-1.xml
          41 kB
        19. Icelake_lacked_feature
          9 kB
        20. milian_lacked_feature
          0.2 kB
        21. millian-domcap.xml
          42 kB
        22. rome_lacked_feature
          0.5 kB
        23. SapphireRapids_domcap.xml
          37 kB
        24. SapphireRapids_lacked_feature
          9 kB
        25. SF_lacked_feature
          10 kB
        26. SierraForest_domcap.xml
          45 kB
        27. skylake_server_domcap.xml
          49 kB
        28. skylake_server_lacked_feature
          8 kB

              virt-maint virt-maint
              nanli@redhat.com Nannan Li
              virt-maint virt-maint
              virt-bugs virt-bugs
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: