summaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
authorThomas Huth2016-06-07 17:39:37 +0200
committerDavid Gibson2016-06-14 02:41:38 +0200
commit8cd2ce7aaa3c3fadc561f40045d4d53ff72e94ef (patch)
tree203bffc0130f11a4093594dcc2afca67edb23ede /hw
parentppc/spapr: Refactor h_client_architecture_support() CPU parsing code (diff)
downloadqemu-8cd2ce7aaa3c3fadc561f40045d4d53ff72e94ef.tar.gz
qemu-8cd2ce7aaa3c3fadc561f40045d4d53ff72e94ef.tar.xz
qemu-8cd2ce7aaa3c3fadc561f40045d4d53ff72e94ef.zip
ppc: Split pcr_mask settings into supported bits and the register mask
The current pcr_mask values are ambiguous: Should these be the mask that defines valid bits in the PCR register? Or should these rather indicate which compatibility levels are possible? Anyway, POWER6 and POWER7 should certainly not use the same values here. So let's introduce an additional variable "pcr_supported" here which is used to indicate the valid compatibility levels, and use pcr_mask to signal the valid bits in the PCR register. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw')
-rw-r--r--hw/ppc/spapr_hcall.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c
index bb8f4de1d7..cc16249a8c 100644
--- a/hw/ppc/spapr_hcall.c
+++ b/hw/ppc/spapr_hcall.c
@@ -934,9 +934,9 @@ static void cas_handle_compat_cpu(PowerPCCPUClass *pcc, uint32_t pvr,
}
/* If it is a logical PVR, try to determine the highest level */
- is205 = (pcc->pcr_mask & PCR_COMPAT_2_05) &&
+ is205 = (pcc->pcr_supported & PCR_COMPAT_2_05) &&
(lvl == get_compat_level(CPU_POWERPC_LOGICAL_2_05));
- is206 = (pcc->pcr_mask & PCR_COMPAT_2_06) &&
+ 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)));