]> git.proxmox.com Git - mirror_qemu.git/commit
spapr: fallback to raw mode if best compat mode cannot be set during CAS
authorGreg Kurz <groug@kaod.org>
Thu, 17 Aug 2017 11:23:50 +0000 (13:23 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 7 Sep 2017 23:30:55 +0000 (09:30 +1000)
commitcc7b35b169e96600c09947a31c610c84a3eda3ff
treefe27a1dd46d8afd3e93d3d8af6b866fd822e327a
parent280503ee9d7833a793770d732dda5358659825e9
spapr: fallback to raw mode if best compat mode cannot be set during CAS

KVM PR doesn't allow to set a compat mode. This causes ppc_set_compat_all()
to fail and we return H_HARDWARE to the guest right away.

This is excessive: even if we favor compat mode since commit 152ef803ceb19,
we should at least fallback to raw mode if the guest supports it.

This patch modifies cas_check_pvr() so that it also reports that the real
PVR was found in the table supplied by the guest. Note that this is only
makes sense if raw mode isn't explicitely disabled (ie, the user didn't
set the machine "max-cpu-compat" property). If this is the case, we can
simply ignore ppc_set_compat_all() failures, and let the guest run in raw
mode.

Signed-off-by: Greg Kurz <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/spapr_hcall.c