[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [QEMU-PPC] [PATCH V2 1/7] target/ppc: Check mask when setting
From: |
Suraj Jitindar Singh |
Subject: |
[Qemu-ppc] [QEMU-PPC] [PATCH V2 1/7] target/ppc: Check mask when setting cap_ppc_safe_indirect_branch |
Date: |
Thu, 1 Mar 2018 17:37:58 +1100 |
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 <address@hidden>
---
V1 -> V2:
- No Change
---
target/ppc/kvm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c
index 9842b3bb12..2c183f61e2 100644
--- a/target/ppc/kvm.c
+++ b/target/ppc/kvm.c
@@ -2494,7 +2494,7 @@ static void kvmppc_get_cpu_characteristics(KVMState *s)
cap_ppc_safe_bounds_check = 1;
}
/* 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;
}
}
--
2.13.6
- [Qemu-ppc] [QEMU-PPC] [PATCH V2 1/7] target/ppc: Check mask when setting cap_ppc_safe_indirect_branch,
Suraj Jitindar Singh <=
- [Qemu-ppc] [QEMU-PPC] [PATCH V2 2/7] ppc/spapr-caps: Add support for custom spapr_capabilities, Suraj Jitindar Singh, 2018/03/01
- [Qemu-ppc] [QEMU-PPC] [PATCH V2 3/7] ppc/spapr-caps: Convert cap-cfpc to custom spapr-cap, Suraj Jitindar Singh, 2018/03/01
- [Qemu-ppc] [QEMU-PPC] [PATCH V2 4/7] ppc/spapr-caps: Convert cap-sbbc to custom spapr-cap, Suraj Jitindar Singh, 2018/03/01
- [Qemu-ppc] [QEMU-PPC] [PATCH V2 6/7] ppc/spapr-caps: Remove tristate spapr-caps support, Suraj Jitindar Singh, 2018/03/01
- [Qemu-ppc] [QEMU-PPC] [PATCH V2 5/7] ppc/spapr-caps: Convert cap-ibs to custom spapr-cap, Suraj Jitindar Singh, 2018/03/01
- [Qemu-ppc] [QEMU-PPC] [PATCH V2 7/7] ppc/spapr-caps: Define the pseries-2.12-sxxm machine type, Suraj Jitindar Singh, 2018/03/01
- Re: [Qemu-ppc] [QEMU-PPC] [PATCH V2 1/7] target/ppc: Check mask when setting cap_ppc_safe_indirect_branch, David Gibson, 2018/03/01