Loading...
Loading...
Description of problem: CPU flags don't match between QEMU cmdline and Libvirt xml(dumpxml) on some AMD hosts Version-Release number of selected component (if applicable): Test Env: 5.14.0-252.el9.x86_64 qemu-kvm-7.2.0-6.el9.x86_64 libvirt-9.0.0-3.el9.x86_64 Model name: AMD EPYC 7313 16-Core Processor How reproducible: 100% Steps to Reproduce: 1. define one basic xml file cat test.xml <domain type='kvm'> <name>test</name> <memory>1</memory> <os> <type arch='x86_64' machine='q35'>hvm</type> </os> <cpu mode='host-model'/> </domain> 2. start libvirt with above xml configuration. Then check the cpu element by 'virsh dumpxml test' when it's running. <cpu mode='custom' match='exact' check='full'> <model fallback='forbid'>EPYC-Milan</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='vaes'/> <feature policy='require' name='vpclmulqdq'/> <feature policy='require' name='spec-ctrl'/> <feature policy='require' name='stibp'/> <feature policy='require' name='arch-capabilities'/> <feature policy='require' name='ssbd'/> <feature policy='require' name='cmp_legacy'/> <feature policy='require' name='virt-ssbd'/> <feature policy='disable' name='lbrv'/> <feature policy='disable' name='tsc-scale'/> <feature policy='disable' name='vmcb-clean'/> <feature policy='disable' name='pause-filter'/> <feature policy='disable' name='pfthreshold'/> <feature policy='disable' name='v-vmsave-vmload'/> <feature policy='disable' name='vgif'/> <feature policy='require' name='rdctl-no'/> <feature policy='require' name='skip-l1dfl-vmentry'/> <feature policy='require' name='mds-no'/> <feature policy='require' name='pschange-mc-no'/> <feature policy='disable' name='svm'/> <feature policy='require' name='topoext'/> <feature policy='disable' name='npt'/> <feature policy='disable' name='nrip-save'/> <feature policy='disable' name='svme-addr-chk'/> </cpu> 3. Check the QEMU cpu command lines with 'ps -aux | grep qemu' -cpu EPYC-Milan,x2apic=on,tsc-deadline=on,hypervisor=on,tsc-adjust=on,vaes=on,vpclmulqdq=on,spec-ctrl=on,stibp=on,arch-capabilities=on,ssbd=on,cmp-legacy=on,virt-ssbd=on,lbrv=on,tsc-scale=on,vmcb-clean=on,pause-filter=on,pfthreshold=on,v-vmsave-vmload=on,vgif=on,rdctl-no=on,skip-l1dfl-vmentry=on,mds-no=on,pschange-mc-no=on Actual results: 1. we can see libvirt disables lots of features but in qemu command line, these features are still 'on'. 2. Boot a separate qemu process with above qemu command line, I can get lots of warnings. /usr/libexec/qemu-kvm -qmp unix:/tmp/mm,server=on,wait=off -M q35 -cpu EPYC-Milan,x2apic=on,tsc-deadline=on,hypervisor=on,tsc-adjust=on,vaes=on,vpclmulqdq=on,spec-ctrl=on,stibp=on,arch-capabilities=on,ssbd=on,cmp-legacy=on,virt-ssbd=on,lbrv=on,tsc-scale=on,vmcb-clean=on,pause-filter=on,pfthreshold=on,v-vmsave-vmload=on,vgif=on,rdctl-no=on,skip-l1dfl-vmentry=on,mds-no=on,pschange-mc-no=on -monitor stdio QEMU 7.2.0 monitor - type 'help' for more information (qemu) qemu-kvm: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.lbrv [bit 1] qemu-kvm: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.tsc-scale [bit 4] qemu-kvm: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.vmcb-clean [bit 5] qemu-kvm: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.pause-filter [bit 10] qemu-kvm: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.pfthreshold [bit 12] qemu-kvm: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.v-vmsave-vmload [bit 15] qemu-kvm: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.vgif [bit 16] VNC server running on ::1:5900 3. Run `query-cpu-model-expansion` with model name `host`, these features all show 'True'. { "execute":"query-cpu-model-expansion","arguments":{"type":"full","model": {"name":"host"} }} Expected results: They should be the same Additional info: Such situation also happens on AMD Rome and AMD Geona,
Won't Do
Click on a version to see all relevant bugs
Red Hat Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.