Blob Blame History Raw
From 72c1a30661e94a58a347dd6341dd8cabdc23d2dc Mon Sep 17 00:00:00 2001
From: Suraj Jitindar Singh <sursingh@redhat.com>
Date: Tue, 13 Feb 2018 04:12:30 +0100
Subject: [PATCH 13/15] spapr: add missing break in h_get_cpu_characteristics()

RH-Author: Suraj Jitindar Singh <sursingh@redhat.com>
Message-id: <1518495150-24134-10-git-send-email-sursingh@redhat.com>
Patchwork-id: 78985
O-Subject: [RHEL7.5 qemu-kvm-rhev PATCH 9/9] spapr: add missing break in h_get_cpu_characteristics()
Bugzilla: 1532050
RH-Acked-by: David Gibson <dgibson@redhat.com>
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
RH-Acked-by: Thomas Huth <thuth@redhat.com>

From: Greg Kurz <groug@kaod.org>

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)

Conflicts: none

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1532050

Signed-off-by: Suraj Jitindar Singh <sursingh@redhat.com>
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 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 21247cd..d3f811a 100644
--- a/hw/ppc/spapr_hcall.c
+++ b/hw/ppc/spapr_hcall.c
@@ -1672,6 +1672,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;
-- 
1.8.3.1