Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-7030

Cmd "virsh Hypervisor-cpu-compare" outputs wrong result with VM's active dumpxml as input because of topoext

    • None
    • Moderate
    • rhel-sst-virtualization
    • ssg_virtualization
    • 8
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • If docs needed, set a value
    • None

      Description of problem:
      Cmd "virsh Hypervisor-cpu-compare" outputs wrong result with VM's active dumpxml as input because of topoext

      Version-Release number of selected component (if applicable):
      qemu-kvm-4.1.0-10.module+el8.1.0+4234+33aa4f57.x86_64
      libvirt-5.6.0-5.virtcov.el8.x86_64
      kernel-4.18.0-141.el8.x86_64

      How reproducible:
      100%

      Steps to Reproduce:
      1. Check domcapabilities, there is no topoext cpu feature here

      1. virsh domcapabilities
        ...
        <cpu>
        <mode name='host-passthrough' supported='yes'/>
        <mode name='host-model' supported='yes'>
        <model fallback='forbid'>EPYC-IBPB</model>
        <vendor>AMD</vendor>
        <feature policy='require' name='x2apic'/>
        <feature policy='require' name='tsc-deadline'/>
        <feature policy='require' name='hypervisor'/>
        <feature policy='require' name='tsc_adjust'/>
        <feature policy='require' name='arch-capabilities'/>
        <feature policy='require' name='cmp_legacy'/>
        <feature policy='require' name='perfctr_core'/>
        <feature policy='require' name='invtsc'/>
        <feature policy='require' name='virt-ssbd'/>
        <feature policy='require' name='skip-l1dfl-vmentry'/>
        <feature policy='disable' name='monitor'/>
        <feature policy='disable' name='svm'/>
        </mode>

      2. Prepare a shutdown VM with the following conf

      1. virsh domstate test_1
        shut off
      1. virsh dumpxml test_1 --inactive |grep "<cpu" -A2
        <cpu mode='host-model' check='partial'>
        <model fallback='allow'/>
        </cpu>

      4. Start VM and check active VM's dumpxml, topoext is enabled here

      1. virsh start test_1
        Domain test_1 started
      1. virsh dumpxml test_1 |grep "<cpu" -A20
        <cpu mode='custom' match='exact' check='full'>
        <model fallback='forbid'>EPYC-IBPB</model>
        <vendor>AMD</vendor>
        <feature policy='require' name='x2apic'/>
        <feature policy='require' name='tsc-deadline'/>
        <feature policy='require' name='hypervisor'/>
        <feature policy='require' name='tsc_adjust'/>
        <feature policy='require' name='arch-capabilities'/>
        <feature policy='require' name='cmp_legacy'/>
        <feature policy='require' name='perfctr_core'/>
        <feature policy='require' name='virt-ssbd'/>
        <feature policy='require' name='skip-l1dfl-vmentry'/>
        <feature policy='disable' name='monitor'/>
        <feature policy='disable' name='svm'/>
        <feature policy='require' name='topoext'/>
        </cpu>

      5. Use the active VM's dumpxml as input of "virsh hypervisor-cpu-compare"

      1. virsh dumpxml test_1 > test_1.xml
      1. virsh hypervisor-cpu-compare test_1.xml
        CPU described in test_1.xml is incompatible with the CPU provided by hypervisor on the host

      Actual results:
      As step-5 shows

      Expected results:
      Since VM can start successfully on this host, I think the CPU conf should not be incompatible.

      Additional info:
      1> This issue can be reproduced on both RHEL-8.1 AV and RHEL-8.1.
      2> The reproducing step above is for RHEL-8.1 AV, and the reproducing steps for RHEL-8.1 can be seen in this link: https://bugzilla.redhat.com/show_bug.cgi?id=1619798#c9

              jdenemar@redhat.com Jiri Denemark
              jiyan_jira Jing Yan (Inactive)
              Jiri Denemark Jiri Denemark
              Han Han Han Han
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated: