]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/ppc: Update setting of cpu features to account for compat modes
authorSuraj Jitindar Singh <sjitindarsingh@gmail.com>
Fri, 17 Nov 2017 05:39:00 +0000 (16:39 +1100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Fri, 15 Dec 2017 15:36:56 +0000 (09:36 -0600)
commit2f3e3890c49bae320431a95a72f45041c79ccc70
treea70c7ba32d7fcac435a865b8f9b3b5879291d9e8
parent26c1b49d56d53453b561863c61b1028d551c7f0f
target/ppc: Update setting of cpu features to account for compat modes

The device tree nodes ibm,arch-vec-5-platform-support and ibm,pa-features
are used to communicate features of the cpu to the guest operating
system. The properties of each of these are determined based on the
selected cpu model and the availability of hypervisor features.
Currently the compatibility mode of the cpu is not taken into account.

The ibm,arch-vec-5-platform-support node is used to communicate the
level of support for various ISAv3 processor features to the guest
before CAS to inform the guests' request. The available mmu mode should
only be hash unless the cpu is a POWER9 which is not in a prePOWER9
compat mode, in which case the available modes depend on the
accelerator and the hypervisor capabilities.

The ibm,pa-featues node is used to communicate the level of cpu support
for various features to the guest os. This should only contain features
relevant to the operating mode of the processor, that is the selected
cpu model taking into account any compat mode. This means that the
compat mode should be taken into account when choosing the properties of
ibm,pa-features and they should match the compat mode selected, or the
cpu model selected if no compat mode.

Update the setting of these cpu features in the device tree as described
above to properly take into account any compat mode. We use the
ppc_check_compat function which takes into account the current processor
model and the cpu compat mode.

Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
(cherry picked from commit 7abd43baec0649002d32bbb1380e936bec6f5867)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/ppc/spapr.c