Red Hat Bugzilla – Bug 1535752
Device tree incorrectly advertises compatibility modes for secondary CPUs
Last modified: 2018-04-10 20:58:52 EDT
Description of problem: The fix for bug 1528234 unfortunately introduced a different regression. The compatibility modes for hotplugged CPUs are now set correctly in the hardware. However, the device tree entries for non-boot cpus no longer correctly advertise their compatibility mode in the device tree. Version-Release number of selected component (if applicable): qemu-kvm-rhev-2.10.0-17.el7 How reproducible: 100% Precised reproducer steps coming...
Steps to reproduce: 1. Start a guest with: $QEMU -name bz1535752 -nographic -vga none -nodefaults \ -machine pseries,accel=kvm,max-cpu-compat=power8 \ -smp 2 \ -m 2048 -cpu host -enable-kvm \ -chardev stdio,id=conmon,mux=on,signal=off -mon conmon -device spapr-vty,chardev=conmon \ -drive file=$DIR/disk.qcow2,if=none,id=hd0 \ -device virtio-scsi-pci,id=scsi \ -device scsi-hd,bus=scsi.0,drive=hd0 \ -netdev tap,id=hostnet0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown \ -device virtio-net-pci,netdev=hostnet0 \ "$@" 2. In the guest run: $ lsprop lsprop /proc/device-tree/cpus/PowerPC\,POWER9\@*/cpu-version Actual results: /proc/device-tree/cpus/PowerPC,POWER9@0/cpu-version 0f000004 (251658244) /proc/device-tree/cpus/PowerPC,POWER9@1/cpu-version 004e1200 (5116416) Expected results: /proc/device-tree/cpus/PowerPC,POWER9@0/cpu-version 0f000004 (251658244) /proc/device-tree/cpus/PowerPC,POWER9@1/cpu-version 0f000004 (251658244)
Greg Kurz has some upstream patches for this which I am reviewing.
I've reviewed and merged Greg's relevant patch, it should go into my next pull request.
Fix included in qemu-kvm-rhev-2.10.0-18.el7
Reproduced this bug: test env: qemu-kvm-rhev-2.10.0-17.el7 kernel-4.14.0-22.el7a.ppc64le Steps: 1.Boot up a P8-compat guest on power9 host: /usr/libexec/qemu-kvm \ -vga std \ -smp 2 \ -m 20480\ -vnc :9 \ -nographic \ -device qemu-xhci,id=xhci \ -device usb-kbd,id=kbd \ -device usb-tablet,id=tablet \ -device virtio-scsi-pci,bus=pci.0 \ -device scsi-hd,id=scsi-hd0,drive=scsi-hd0-dr0,bootindex=0 \ -device virtio-net-pci,netdev=net0,id=nic0,mac=52:54:00:c4:e7:84 \ -netdev tap,id=net0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown,vhost=on \ -drive file=rhel75-ppc64le-virtio-scsi.qcow2,if=none,id=scsi-hd0-dr0,format=qcow2,cache=none \ -machine pseries,max-cpu-compat=power8 \ -chardev socket,path=monitor,id=vty,server,nowait,signal=off \ -mon chardev=vty,mode=readline \ 2.Check compatibility modes of non-boot cpus from device tree in guest #lsprop /proc/device-tree/cpus/PowerPC\,POWER9\@*/cpu-version Actual results: /proc/device-tree/cpus/PowerPC,POWER9@0/cpu-version 0f000004 (251658244) /proc/device-tree/cpus/PowerPC,POWER9@1/cpu-version 004e1200 (5116416) Verified this bug: test env: qemu-kvm-rhev-2.10.0-18.el7 kernel-4.14.0-22.el7a.ppc64le Steps: The same as steps to reproduce. Actual results: /proc/device-tree/cpus/PowerPC,POWER9@0/cpu-version 0f000004 (251658244) /proc/device-tree/cpus/PowerPC,POWER9@8/cpu-version 0f000004 (251658244) Base the results above,set status to verified.
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, 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/RHSA-2018:1104