diff options
author | Thomas Huth <thuth@redhat.com> | 2016-06-07 17:39:40 +0200 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2016-06-14 10:41:38 +1000 |
commit | b30ff227c27c931155f768a04c44a6c8757f195f (patch) | |
tree | 66d6c0eeabfeff8641ea560ae3566911dbaf004c /hw/ppc | |
parent | eac4fba965136f61cc239a450bec12adcef6b449 (diff) | |
download | qemu-b30ff227c27c931155f768a04c44a6c8757f195f.zip qemu-b30ff227c27c931155f768a04c44a6c8757f195f.tar.gz qemu-b30ff227c27c931155f768a04c44a6c8757f195f.tar.bz2 |
ppc: Add PowerISA 2.07 compatibility mode
Make sure that guests can use the PowerISA 2.07 CPU sPAPR
compatibility mode when they request it and the target CPU
supports it.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc')
-rw-r--r-- | hw/ppc/spapr_hcall.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c index cc16249..2ba5cbd 100644 --- a/hw/ppc/spapr_hcall.c +++ b/hw/ppc/spapr_hcall.c @@ -927,7 +927,7 @@ static void cas_handle_compat_cpu(PowerPCCPUClass *pcc, uint32_t pvr, unsigned *cpu_version) { unsigned lvl = get_compat_level(pvr); - bool is205, is206; + bool is205, is206, is207; if (!lvl) { return; @@ -939,8 +939,10 @@ static void cas_handle_compat_cpu(PowerPCCPUClass *pcc, uint32_t pvr, is206 = (pcc->pcr_supported & PCR_COMPAT_2_06) && ((lvl == get_compat_level(CPU_POWERPC_LOGICAL_2_06)) || (lvl == get_compat_level(CPU_POWERPC_LOGICAL_2_06_PLUS))); + is207 = (pcc->pcr_supported & PCR_COMPAT_2_07) && + (lvl == get_compat_level(CPU_POWERPC_LOGICAL_2_07)); - if (is205 || is206) { + if (is205 || is206 || is207) { if (!max_lvl) { /* User did not set the level, choose the highest */ if (*compat_lvl <= lvl) { |