]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
spapr: add missing break in h_get_cpu_characteristics()
authorGreg Kurz <groug@kaod.org>
Thu, 1 Feb 2018 19:47:41 +0000 (20:47 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 13 Feb 2018 01:39:27 +0000 (19:39 -0600)
Detected by Coverity (CID 1385702). This fixes the recently added hypercall
to let guests properly apply Spectre and Meltdown workarounds.

Fixes: c59704b25473 "target/ppc/spapr: Add H-Call H_GET_CPU_CHARACTERISTICS"
Reported-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
(cherry picked from commit fa86f59234919b479b7e8da6b0dc2dad894a5eac)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/ppc/spapr_hcall.c

index 0e1a0aed760322bec7ac3b7a84841735bbb04f83..8416452e3391ddad5c81bf420663f383bbb9316e 100644 (file)
@@ -1698,6 +1698,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;