Comment 29 for bug 1832622

------- Comment From <email address hidden> 2019-08-27 12:42 EDT-------
I tested this out with the same verification checks as above and got the same results. The summary is that the mitigations are detected correctly in the guest and the migrations works when it should, warns when it should, and fails when it should.

ii qemu-block-extra:ppc64el 1:2.11+dfsg-1ubuntu7.18 ppc64el extra block backend modules for qemu-system and qemu-utils
ii qemu-kvm 1:2.11+dfsg-1ubuntu7.18 ppc64el QEMU Full virtualization on x86 hardware
ii qemu-system-common 1:2.11+dfsg-1ubuntu7.18 ppc64el QEMU full system emulation binaries (common files)
ii qemu-system-ppc 1:2.11+dfsg-1ubuntu7.18 ppc64el QEMU full system emulation binaries (ppc)
ii qemu-utils 1:2.11+dfsg-1ubuntu7.18 ppc64el QEMU utilities

No migration:
max-cpu-compat=power9,cap-ibs=workaround,cap-ccf-assist=on
count-cache-flush: hardware assisted flush sequence enabled

max-cpu-compat=power9,cap-ibs=workaround,cap-ccf-assist=off
count-cache-flush: full software flush sequence enabled.

max-cpu-compat=power9,cap-ibs=broken
count-cache-flush: software flush disabled.

Migrations:
Source: max-cpu-compat=power9,cap-ibs=broken
Target: max-cpu-compat=power9,cap-ibs=workaround,cap-ccf-assist=off

Worked w/warning:
qemu-system-ppc64le: warning: cap-ibs lower level (0) in incoming stream than on destination (1)
count-cache-flush: software flush disabled.

Source: max-cpu-compat=power9,cap-ibs=broken
Target: max-cpu-compat=power9,cap-ibs=workaround,cap-ccf-assist=on

Worked w/warning:
count-cache-flush: software flush disabled.
qemu-system-ppc64le: warning: cap-ibs lower level (0) in incoming stream than on destination (1)
qemu-system-ppc64le: warning: cap-ccf-assist lower level (0) in incoming stream than on destination (1)
count-cache-flush: software flush disabled.

Source: max-cpu-compat=power9,cap-ibs=broken
Target: max-cpu-compat=power9,cap-ibs=broken

Worked
count-cache-flush: software flush disabled.

Set 2:

Source: max-cpu-compat=power9,cap-ibs=workaround,cap-ccf-assist=off
Target: max-cpu-compat=power9,cap-ibs=workaround,cap-ccf-assist=off
Worked
count-cache-flush: full software flush sequence enabled.

Source: max-cpu-compat=power9,cap-ibs=workaround,cap-ccf-assist=off
Target: max-cpu-compat=power9,cap-ibs=workaround,cap-ccf-assist=on
Worked w/warning
count-cache-flush: full software flush sequence enabled.
qemu-system-ppc64le: warning: cap-ccf-assist lower level (0) in incoming stream than on destination (1)

Source: max-cpu-compat=power9,cap-ibs=workaround,cap-ccf-assist=off
Target: max-cpu-compat=power9,cap-ibs=broken

Failed:
qemu-system-ppc64le: cap-ibs higher level (1) in incoming stream than on destination (0)
qemu-system-ppc64le: error while loading state for instance 0x0 of device 'spapr'
qemu-system-ppc64le: load of migration failed: Invalid argument

Third set:
Source: max-cpu-compat=power9,cap-ibs=workaround,cap-ccf-assist=on
Target: max-cpu-compat=power9,cap-ibs=workaround,cap-ccf-assist=on

Worked
count-cache-flush: hardware assisted flush sequence enabled

Source: max-cpu-compat=power9,cap-ibs=workaround,cap-ccf-assist=on
Target: max-cpu-compat=power9,cap-ibs=workaround,cap-ccf-assist=off

Failed:
qemu-system-ppc64le: cap-ccf-assist higher level (1) in incoming stream than on destination (0)
qemu-system-ppc64le: error while loading state for instance 0x0 of device 'spapr'
qemu-system-ppc64le: load of migration failed: Invalid argument

Source: max-cpu-compat=power9,cap-ibs=workaround,cap-ccf-assist=on
Target: max-cpu-compat=power9,cap-ibs=broken

Failed:
qemu-system-ppc64le: cap-ibs higher level (1) in incoming stream than on destination (0)
qemu-system-ppc64le: cap-ccf-assist higher level (1) in incoming stream than on destination (0)
qemu-system-ppc64le: error while loading state for instance 0x0 of device 'spapr'
qemu-system-ppc64le: load of migration failed: Invalid argument