|
From: | Daniel Henrique Barboza |
Subject: | Re: [Qemu-ppc] [PATCH] spapr: add missing break in h_get_cpu_characteristics() |
Date: | Fri, 2 Feb 2018 07:11:08 -0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 |
On 02/01/2018 05:47 PM, Greg Kurz
wrote:
Detected by Coverity (CID 1385702). This fixes the recently added hypercall to let guests properly apply Spectre and Meltdown workarounds. Paolo Bonzini reported this error in a reply to the pull request that added the patch: "Re: [Qemu-ppc] [Qemu-devel] [PULL 12/12] target/ppc/spapr: Add H-Call H_GET_CPU_CHARACTERISTICS On 28/01/2018 22:28, David Gibson wrote: + switch (safe_indirect_branch) { + case SPAPR_CAP_FIXED: + characteristics |= H_CPU_CHAR_BCCTRL_SERIALISED; Missing "break;" here. Paolo" I think it is nice to mention in the commit msg that Paolo also detected this same error, specially given that his email was sent before this patch. Thanks, Daniel Fixes: c59704b25473 "target/ppc/spapr: Add H-Call H_GET_CPU_CHARACTERISTICS" Signed-off-by: Greg Kurz <address@hidden> --- hw/ppc/spapr_hcall.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c index 4d0e6eb0cf1d..596f58378a40 100644 --- a/hw/ppc/spapr_hcall.c +++ b/hw/ppc/spapr_hcall.c @@ -1697,6 +1697,7 @@ static target_ulong h_get_cpu_characteristics(PowerPCCPU *cpu, switch (safe_indirect_branch) { case SPAPR_CAP_FIXED: characteristics |= H_CPU_CHAR_BCCTRL_SERIALISED; + break; default: /* broken */ assert(safe_indirect_branch == SPAPR_CAP_BROKEN); break; |
[Prev in Thread] | Current Thread | [Next in Thread] |