From patchwork Tue May 9 05:04:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 9717039 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 564EB60364 for ; Tue, 9 May 2017 05:05:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 34436252D5 for ; Tue, 9 May 2017 05:05:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 169AD282E8; Tue, 9 May 2017 05:05:53 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6550F252D5 for ; Tue, 9 May 2017 05:05:51 +0000 (UTC) Received: from localhost ([::1]:34976 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7xLK-0006b3-Pe for patchwork-qemu-devel@patchwork.kernel.org; Tue, 09 May 2017 01:05:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39406) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7xKi-0006al-BK for qemu-devel@nongnu.org; Tue, 09 May 2017 01:05:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d7xKh-0008Mo-CZ for qemu-devel@nongnu.org; Tue, 09 May 2017 01:05:12 -0400 Received: from ozlabs.org ([2401:3900:2:1::2]:54739) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d7xKg-0008JD-Hx; Tue, 09 May 2017 01:05:11 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 3wMS3d73q8z9s7C; Tue, 9 May 2017 15:05:01 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1494306301; bh=ZXWkhVzxggoKnI3RmAVzsd6iBDwEFSM6QVWchuvbwOo=; h=From:To:Cc:Subject:Date:From; b=WAq9BRajwPvf5zSVieA3WsRAGewTN/5X537zebzqaSnG+1X6p9e9vCPk1NIU+TGnS yexiNwF3QKteqJVhJaiddE1AW2Nqj8c/OR+9KJStjkTl6iQp2sEB8e8eJaTaYe5BPE 9W+weDDRcO9U35A9hI7wM28nMidr+PaIPVS8+k2s= From: David Gibson To: sam.bobroff@au1.ibm.com, thuth@redhat.com Date: Tue, 9 May 2017 15:04:58 +1000 Message-Id: <20170509050458.23237-1-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.9.3 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2401:3900:2:1::2 Subject: [Qemu-devel] [PATCH] spapr: Don't accidentally advertise HTM support on POWER9 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: lvivier@redhat.com, aik@ozlabs.ru, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com, qemu-ppc@nongnu.org, bharata@linux.vnet.ibm.com, David Gibson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Logic in spapr_populate_pa_features() enables the bit advertising Hardware Transactional Memory (HTM) in the guest's device tree only when KVM advertises its availability with the KVM_CAP_PPC_HTM feature. However, this assumes that the HTM bit is off in the base template used for the device tree value. That is true for POWER8, but not for POWER9. It looks like that was accidentally changed in 9fb4541 "spapr: Enable ISA 3.0 MMU mode selection via CAS". Fixes: 9fb4541f5803f8d2ba116b12113386e26482ba30 Signed-off-by: David Gibson Reviewed-by: Thomas Huth Reviewed-by: Sam Bobroff --- hw/ppc/spapr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index e2dc77c..1b7cada 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -219,7 +219,7 @@ static void spapr_populate_pa_features(CPUPPCState *env, void *fdt, int offset, /* 16: Vector */ 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, /* 12 - 17 */ /* 18: Vec. Scalar, 20: Vec. XOR, 22: HTM */ - 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, /* 18 - 23 */ + 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, /* 18 - 23 */ /* 24: Ext. Dec, 26: 64 bit ftrs, 28: PM ftrs */ 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, /* 24 - 29 */ /* 30: MMR, 32: LE atomic, 34: EBB + ext EBB */