From patchwork Fri Mar 1 04:46:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suraj Jitindar Singh X-Patchwork-Id: 10834469 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0FD451390 for ; Fri, 1 Mar 2019 05:03:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F282E2F728 for ; Fri, 1 Mar 2019 05:03:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E4A9A2F72E; Fri, 1 Mar 2019 05:03:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 90A912F728 for ; Fri, 1 Mar 2019 05:03:36 +0000 (UTC) Received: from localhost ([127.0.0.1]:50790 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzaKd-0003Ee-Ql for patchwork-qemu-devel@patchwork.kernel.org; Fri, 01 Mar 2019 00:03:35 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51641) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzaHs-0000yq-Q6 for qemu-devel@nongnu.org; Fri, 01 Mar 2019 00:00:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gza42-0004lT-LH for qemu-devel@nongnu.org; Thu, 28 Feb 2019 23:46:27 -0500 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]:33601) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gza41-0004kj-Lj; Thu, 28 Feb 2019 23:46:25 -0500 Received: by mail-pl1-x632.google.com with SMTP id y10so10885794plp.0; Thu, 28 Feb 2019 20:46:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=3/Lanh6/bbKiAjHXi0VYhsYPbH29pYzMJlyWiU3lxIs=; b=KckkvGJshhOn9LpWH/RBCmnQJhwh1G5PiQ/EC+ux8nBeIzbzFMOqoTzKOJxWkvI0TV mtyO7dDKsKFPBjhhYE20YKHdzdLqQTd0nwyaogNZo2cckXqMjEoQhSdFMzWrlJRFj4eW bFxIi4hHlCY4VQPL2mRgY3UeeXau9yTCigM49lIF6zIG+VWFTnCogy+I1Bal+61ZU4qi 436xivMMLnRrnunXXeTYro1JsRpdZCbnx0VgonP/8F/iRs0LvfXE1jDdi75ANsCvP0h9 0EmjxDfhPWazYyoQP6NiQbN8Df5WG3dAl2WXoFQOsUOGouWUJJqJBit3g6ioMrQlt0xF R5pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=3/Lanh6/bbKiAjHXi0VYhsYPbH29pYzMJlyWiU3lxIs=; b=UJfR9hTcub2VK/vEmsz+wG++V/Yqf386tDfR3RuMWRBUrCWxUdncLwQ3Ucs9iNJAtv 3EdgIijbpfyAcGkS3cytKAZ2j6hL4VSmJZeXKKizYxgkf2gpvKshkXfUrwu61KaXsOef Plf62B1mOs3VKoRTmByBBNJDQi9rhpbx5y4PGgNhH/kwXjl9y8yfzpwVXNKabyWpOIHN l7qjJA1CPyVB8jjNfuPQ6u2wIUmS/zQqf8XczVVWrqNCME+pxs5kg5oOnpQbVGz6VJ3a TI1Xpv7XD4hKxX8EQ9/+okSBQ5YSmrxg6AE4D8c7mJSdd7N1LovbW8xda8l87r5mo908 aqRg== X-Gm-Message-State: APjAAAWCDFMsLFZZJph9PepMtrr8+Igjw7NWNWAqBh5ons26F0RDk5Iv SfRu1iSLOHnNzFu1NnkNUXcZlNn+ X-Google-Smtp-Source: APXvYqyh50LAnkc/haDABfc7dei+lyZi69CvUL8uZMItcinv+UTgmy8fPNzZ8sVi8HhUT5saufrARg== X-Received: by 2002:a17:902:8e82:: with SMTP id bg2mr3395940plb.217.1551415584522; Thu, 28 Feb 2019 20:46:24 -0800 (PST) Received: from surajjs2.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id f65sm18804266pff.21.2019.02.28.20.46.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Feb 2019 20:46:23 -0800 (PST) From: Suraj Jitindar Singh To: qemu-ppc@nongnu.org Date: Fri, 1 Mar 2019 15:46:09 +1100 Message-Id: <20190301044609.9626-3-sjitindarsingh@gmail.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20190301044609.9626-1-sjitindarsingh@gmail.com> References: <20190301044609.9626-1-sjitindarsingh@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::632 Subject: [Qemu-devel] [QEMU-PPC] [PATCH 2/2] target/ppc/spapr: Enable mitigations by default for pseries-4.0 machine type 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: qemu-devel@nongnu.org, Suraj Jitindar Singh , david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP There are currently 3 mitigations the availability of which is controlled by the spapr-caps mechanism, cap-cfpc, cap-sbbc, and cap-ibs. Enable these mitigations by default for the pseries-4.0 machine type. By now machine firmware should have been upgraded to allow these settings. Signed-off-by: Suraj Jitindar Singh --- hw/ppc/spapr.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 708e18dcdf..b103d2677e 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -4314,9 +4314,9 @@ static void spapr_machine_class_init(ObjectClass *oc, void *data) smc->default_caps.caps[SPAPR_CAP_HTM] = SPAPR_CAP_OFF; smc->default_caps.caps[SPAPR_CAP_VSX] = SPAPR_CAP_ON; smc->default_caps.caps[SPAPR_CAP_DFP] = SPAPR_CAP_ON; - smc->default_caps.caps[SPAPR_CAP_CFPC] = SPAPR_CAP_BROKEN; - smc->default_caps.caps[SPAPR_CAP_SBBC] = SPAPR_CAP_BROKEN; - smc->default_caps.caps[SPAPR_CAP_IBS] = SPAPR_CAP_BROKEN; + smc->default_caps.caps[SPAPR_CAP_CFPC] = SPAPR_CAP_WORKAROUND; + smc->default_caps.caps[SPAPR_CAP_SBBC] = SPAPR_CAP_WORKAROUND; + smc->default_caps.caps[SPAPR_CAP_IBS] = SPAPR_CAP_WORKAROUND; smc->default_caps.caps[SPAPR_CAP_HPT_MAXPAGESIZE] = 16; /* 64kiB */ smc->default_caps.caps[SPAPR_CAP_NESTED_KVM_HV] = SPAPR_CAP_OFF; smc->default_caps.caps[SPAPR_CAP_LARGE_DECREMENTER] = SPAPR_CAP_ON; @@ -4396,6 +4396,9 @@ static void spapr_machine_3_1_class_options(MachineClass *mc) mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("power8_v2.0"); smc->update_dt_enabled = false; smc->dr_phb_enabled = false; + smc->default_caps.caps[SPAPR_CAP_CFPC] = SPAPR_CAP_BROKEN; + smc->default_caps.caps[SPAPR_CAP_SBBC] = SPAPR_CAP_BROKEN; + smc->default_caps.caps[SPAPR_CAP_IBS] = SPAPR_CAP_BROKEN; smc->default_caps.caps[SPAPR_CAP_LARGE_DECREMENTER] = SPAPR_CAP_OFF; }