ppc: Improve PCR bit selection in ppc_set_compat()
commiteac4fba965136f61cc239a450bec12adcef6b449
authorThomas Huth <thuth@redhat.com>
Tue, 7 Jun 2016 15:39:39 +0000 (7 17:39 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Tue, 14 Jun 2016 00:41:38 +0000 (14 10:41 +1000)
tree24eb8cb3cfc194a46bbb831f228135d19517a6db
parent52b2519c4ea9a6aa4df7abfe35fd1755c5c8546c
ppc: Improve PCR bit selection in ppc_set_compat()

When using an olderr PowerISA level, all the upper compatibility
bits have to be enabled, too. For example when we want to run
something in PowerISA 2.05 compatibility mode on POWER8, the bit
for 2.06 has to be set beside the bit for 2.05.
Additionally, to make sure that we do not set bits that are not
supported by the host, we apply a mask with the known-to-be-good
bits here, too.

Signed-off-by: Thomas Huth <thuth@redhat.com>
[dwg: Added some #ifs to fix compile on 32-bit targets]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
target-ppc/cpu.h
target-ppc/translate_init.c