Description of problem: The cpu model fallback changed after restart libvirtd Version-Release number of selected component (if applicable): # rpm -q qemu-kvm libvirt qemu-kvm-2.12.0-44.module+el8+2259+6d80f0a6.ppc64le libvirt-4.5.0-14.module+el8+2210+474b8474.ppc64le How reproducible: 100% Steps to Reproduce: 1. Prepare a guest with the cpu model element. <cpu mode='host-model' check='partial'> <model fallback='forbid'>power9</model> </cpu> 2. Start the guest and check the guest xml virsh start test virsh dumpxml test The fallback is forbid now 3. Restart libvirtd and check the guest xml systemctl restart libvirtd virsh dumpxml test The fallback is changed to allow now Actual results: The fallback is changed Expected results: The fallback should not be changed Additional info: Could be reproduced on POWER8/9, could not be reproduced on x86_64
This bug happens due to an unintended side-effect of the fix for https://bugzilla.redhat.com/show_bug.cgi?id=1532980. Starting on Libvirt 2.3, guests being launched with 'host-mode' will get their cpu->mode converted from 'host-model' to 'custom' after launch. This caused problems with guests created in Libvirt < 2.3, with fallback set to 'forbid', after a Libvirt update. Daemon restart would convert the 'host-model' to 'custom', but the fallback set to 'forbid' would make the translation fail, causing the problem described in 1532980. The fix was to ignore the user defined 'fallback' setting, changing it to ALLOW in these circumstances. All other guest arch works this way, except for pSeries. pSeries operates with 'host-model' regardless of Libvirt version due to specific compat mode mechanics, never translating it to 'custom'. This means that we do no good changing 'fallback' to ALLOW for pSeries, being better of leaving the user choice untouched. The fix was posted in the ML: https://www.redhat.com/archives/libvir-list/2020-May/msg01053.html
Fix is available upstream: commit 9665b27dba9f41fc51c6d2863eb017cadd760ccc Author: Daniel Henrique Barboza <danielhb413> Date: Mon May 25 09:39:45 2020 -0300 qemuProcessRefreshCPU: skip 'host-model' logic for pSeries guests v6.3.0-169-g9665b27dba
Andrea, do you know if 6.4.0 will be rebased into RHEL-AV 8.3?
(In reply to dbarboza from comment #3) > Andrea, do you know if 6.4.0 will be rebased into RHEL-AV 8.3? Yes, and it looks like Jirka took care of that already :)
Test package: libvirt-6.4.0-1.module+el8.3.0+6881+88468c00.ppc64le qemu-kvm-5.0.0-0.el8.dwg202005221156.ppc64le 1. a> Edit guest with <cpu mode='host-model'> <model fallback='forbid'>power9</model> </cpu> b> Start the guest c> Restart libvirtd d> Dumpxml guest <cpu mode='host-model' check='partial'> <model fallback='forbid'>power9</model> </cpu> There is no change for 'fallback' now. 2. a> Edit guest with below and save. <cpu> <model>power9</model> </cpu> b> Edit guest again and some default values are automatically filled in. <cpu mode='custom' match='exact' check='partial'> <model fallback='allow'>power9</model> </cpu> Change fallback to 'forbid'. c> Start guest and dumpxml <cpu mode='host-model' check='partial'> <model fallback='forbid'>power9</model> </cpu>
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (virt:8.3 bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:5137