From patchwork Thu May 11 04:14:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 760942 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wNg5j06G8z9s7m for ; Thu, 11 May 2017 14:26:01 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.b="H0UjOxqf"; dkim-atps=neutral Received: from localhost ([::1]:45908 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8ffq-0006c0-HW for incoming@patchwork.ozlabs.org; Thu, 11 May 2017 00:25:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56240) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8fUz-0005O4-7W for qemu-devel@nongnu.org; Thu, 11 May 2017 00:14:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d8fUx-0001XK-S4 for qemu-devel@nongnu.org; Thu, 11 May 2017 00:14:45 -0400 Received: from ozlabs.org ([2401:3900:2:1::2]:52495) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d8fUx-0001Sb-C4; Thu, 11 May 2017 00:14:43 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 3wNfrS1Gftz9sNK; Thu, 11 May 2017 14:14:31 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1494476072; bh=hl1CHNveVTsYHxa8oFoS1rHsEcbzipc2z4tICe5rBxo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H0UjOxqfSJkcFg6a1l7iAE/IRaAioVhFL/yvsPuCl7/unw5yqvnci+7ZVCeRDu++q nTi7bj0NvdiuQKMNmlreVKQfDliHHQw5EhCjifOGRpUmXD7zCbd0P9lJltOOfJxQut aeTl4Yomu4o62/IyTnaN4is4b2SGMV/LwE13BFO8= From: David Gibson To: peter.maydell@linaro.org Date: Thu, 11 May 2017 14:14:23 +1000 Message-Id: <20170511041426.6488-21-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170511041426.6488-1-david@gibson.dropbear.id.au> References: <20170511041426.6488-1-david@gibson.dropbear.id.au> 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] [PULL 20/23] 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: mdroth@linux.vnet.ibm.com, nikunj@linux.vnet.ibm.com, aik@ozlabs.ru, mark.cave-ayland@ilande.co.uk, agraf@suse.de, qemu-devel@nongnu.org, qemu-ppc@nongnu.org, clg@kaod.org, sjitindarsingh@gmail.com, bharata@linux.vnet.ibm.com, sam.bobroff@au1.ibm.com, David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 --- 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 */