[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 13/14] ppc/spapr-caps: Disallow setting workaround fo
From: |
David Gibson |
Subject: |
[Qemu-devel] [PULL 13/14] ppc/spapr-caps: Disallow setting workaround for spapr-cap-ibs |
Date: |
Fri, 16 Feb 2018 21:06:16 +1100 |
From: Suraj Jitindar Singh <address@hidden>
The spapr-cap cap-ibs can only have values broken or fixed as there is
no explicit workaround required. Currently setting the value workaround
for this cap will hit an assert if the guest makes the hcall
h_get_cpu_characteristics.
Report an error when attempting to apply the setting with a more helpful
error message.
Reported-by: Satheesh Rajendran <address@hidden>
Signed-off-by: Suraj Jitindar Singh <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/spapr_caps.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/ppc/spapr_caps.c b/hw/ppc/spapr_caps.c
index e69d308560..99a4b71d19 100644
--- a/hw/ppc/spapr_caps.c
+++ b/hw/ppc/spapr_caps.c
@@ -205,7 +205,9 @@ static void cap_safe_bounds_check_apply(sPAPRMachineState
*spapr, uint8_t val,
static void cap_safe_indirect_branch_apply(sPAPRMachineState *spapr,
uint8_t val, Error **errp)
{
- if (tcg_enabled() && val) {
+ if (val == SPAPR_CAP_WORKAROUND) { /* Can only be Broken or Fixed */
+ error_setg(errp, "Requested safe indirect branch capability level
\"workaround\" not valid, try cap-ibs=fixed");
+ } else if (tcg_enabled() && val) {
/* TODO - for now only allow broken for TCG */
error_setg(errp, "Requested safe indirect branch capability level not
supported by tcg, try a different value for cap-ibs");
} else if (kvm_enabled() && (val > kvmppc_get_cap_safe_indirect_branch()))
{
@@ -263,7 +265,7 @@ sPAPRCapabilityInfo capability_table[SPAPR_CAP_NUM] = {
},
[SPAPR_CAP_IBS] = {
.name = "ibs",
- .description = "Indirect Branch Serialisation" VALUE_DESC_TRISTATE,
+ .description = "Indirect Branch Serialisation (broken, fixed)",
.index = SPAPR_CAP_IBS,
.get = spapr_cap_get_tristate,
.set = spapr_cap_set_tristate,
--
2.14.3
- [Qemu-devel] [PULL 00/14] ppc-for-2.12 queue 20180216, David Gibson, 2018/02/16
- [Qemu-devel] [PULL 08/14] spapr: move VCPU calculation to core machine code, David Gibson, 2018/02/16
- [Qemu-devel] [PULL 06/14] ppc/spapr-caps: Change migration macro to take full spapr-cap name, David Gibson, 2018/02/16
- [Qemu-devel] [PULL 04/14] hw/ppc/spapr_hcall: set htab_shift after kvmppc_resize_hpt_commit, David Gibson, 2018/02/16
- [Qemu-devel] [PULL 13/14] ppc/spapr-caps: Disallow setting workaround for spapr-cap-ibs,
David Gibson <=
- [Qemu-devel] [PULL 09/14] spapr: rename spapr_vcpu_id() to spapr_get_vcpu_id(), David Gibson, 2018/02/16
- [Qemu-devel] [PULL 02/14] ppc: move CUDAState and other CUDA-related definitions into separate cuda.h file, David Gibson, 2018/02/16
- [Qemu-devel] [PULL 03/14] cuda: convert to trace-events, David Gibson, 2018/02/16
- [Qemu-devel] [PULL 10/14] spapr: consolidate the VCPU id numbering logic in a single place, David Gibson, 2018/02/16
- [Qemu-devel] [PULL 07/14] spapr: use spapr->vsmt to compute VCPU ids, David Gibson, 2018/02/16
- [Qemu-devel] [PULL 12/14] target/ppc: convert to TranslatorOps, David Gibson, 2018/02/16
- [Qemu-devel] [PULL 05/14] hw/char: remove legacy interface escc_init(), David Gibson, 2018/02/16
- [Qemu-devel] [PULL 11/14] target/ppc: convert to DisasContextBase, David Gibson, 2018/02/16
- [Qemu-devel] [PULL 01/14] cuda: convert to use the shared mos6522 device, David Gibson, 2018/02/16
- [Qemu-devel] [PULL 14/14] ppc4xx: Add device models found in PPC440 core SoCs, David Gibson, 2018/02/16