From nobody Sat May 4 21:38:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 151751781042761.09184832262099; Thu, 1 Feb 2018 12:43:30 -0800 (PST) Received: from localhost ([::1]:33226 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehLhf-0001cg-6X for importer@patchew.org; Thu, 01 Feb 2018 15:43:27 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37826) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehLfS-0000tv-Iu for qemu-devel@nongnu.org; Thu, 01 Feb 2018 15:42:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ehLeM-0003fK-2j for qemu-devel@nongnu.org; Thu, 01 Feb 2018 15:41:08 -0500 Received: from 1.mo1.mail-out.ovh.net ([178.32.127.22]:38493) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ehKq3-0002ed-KJ for qemu-devel@nongnu.org; Thu, 01 Feb 2018 14:48:03 -0500 Received: from player691.ha.ovh.net (gw6.ovh.net [213.251.189.206]) by mo1.mail-out.ovh.net (Postfix) with ESMTP id EAD9FD41ED for ; Thu, 1 Feb 2018 20:47:53 +0100 (CET) Received: from bahia.lan (lns-bzn-46-82-253-208-248.adsl.proxad.net [82.253.208.248]) (Authenticated sender: groug@kaod.org) by player691.ha.ovh.net (Postfix) with ESMTPA id 0DB13260099; Thu, 1 Feb 2018 20:47:47 +0100 (CET) From: Greg Kurz To: qemu-devel@nongnu.org Date: Thu, 01 Feb 2018 20:47:41 +0100 Message-ID: <151751446151.11348.15065690714406381610.stgit@bahia.lan> User-Agent: StGit/0.17.1-46-g6855-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Ovh-Tracer-Id: 7991919016891881973 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtfedrtdeggddufeefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 178.32.127.22 Subject: [Qemu-devel] [PATCH] spapr: add missing break in h_get_cpu_characteristics() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexey Kardashevskiy , qemu-ppc@nongnu.org, Suraj Jitindar Singh , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 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" Signed-off-by: Greg Kurz Reviewed-by: Suraj Jitindar Singh --- 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(PowerPC= CPU *cpu, switch (safe_indirect_branch) { case SPAPR_CAP_FIXED: characteristics |=3D H_CPU_CHAR_BCCTRL_SERIALISED; + break; default: /* broken */ assert(safe_indirect_branch =3D=3D SPAPR_CAP_BROKEN); break;