mirror of https://github.com/xemu-project/xemu.git
target/ppc: Check mask when setting cap_ppc_safe_indirect_branch
Check the character and character_mask field when setting
cap_ppc_safe_indirect_branch based on the hypervisor response
to KVM_PPC_GET_CPU_CHAR. Previously the mask field wasn't checked
which was incorrect.
Fixes: 8acc2ae5
(target/ppc/kvm: Add cap_ppc_safe_[cache/bounds_check/indirect_branch])
Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
b6712ea391
commit
cb931c2108
|
@ -2494,7 +2494,7 @@ static void kvmppc_get_cpu_characteristics(KVMState *s)
|
||||||
cap_ppc_safe_bounds_check = 1;
|
cap_ppc_safe_bounds_check = 1;
|
||||||
}
|
}
|
||||||
/* Parse and set cap_ppc_safe_indirect_branch */
|
/* Parse and set cap_ppc_safe_indirect_branch */
|
||||||
if (c.character & H_CPU_CHAR_BCCTRL_SERIALISED) {
|
if (c.character & c.character_mask & H_CPU_CHAR_BCCTRL_SERIALISED) {
|
||||||
cap_ppc_safe_indirect_branch = 2;
|
cap_ppc_safe_indirect_branch = 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue