OSDN Git Service

target-ppc: Implement "compat" CPU option
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Fri, 23 May 2014 02:26:52 +0000 (12:26 +1000)
committerAlexander Graf <agraf@suse.de>
Mon, 16 Jun 2014 11:24:37 +0000 (13:24 +0200)
commit6d9412ea8132d6fa23bb0d57167ea585c728c3f1
tree8b003cda7a9e0682cd6a451ff253c097df9ea21e
parent833d46685d2c59078d484ca22708d9b46283fbd4
target-ppc: Implement "compat" CPU option

This adds basic support for the "compat" CPU option. By specifying
the compat property, the user can manually switch guest CPU mode from
"raw" to "architected".

This defines feature disable bits which are not used yet as, for example,
PowerISA 2.07 says if 2.06 mode is selected, the TM bit does not matter -
transactional memory (TM) will be disabled because 2.06 does not define
it at all. The same is true for VSX and 2.05 mode. So just setting a mode
must be ok.

This does not change the existing behavior as the actual compatibility
mode support is coming in next patches.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
[agraf: fix compilation on 32bit hosts]
Signed-off-by: Alexander Graf <agraf@suse.de>
hw/ppc/spapr.c
target-ppc/cpu-qom.h
target-ppc/cpu.h
target-ppc/translate_init.c