From nobody Mon Feb 9 18:44:29 2026 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.zoho.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 1488511603487787.4030096447426; Thu, 2 Mar 2017 19:26:43 -0800 (PST) Received: from localhost ([::1]:55855 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cjdrd-00084i-Rz for importer@patchew.org; Thu, 02 Mar 2017 22:26:41 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44123) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cjdqR-000833-A6 for qemu-devel@nongnu.org; Thu, 02 Mar 2017 22:25:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cjdqQ-0001HZ-Bd for qemu-devel@nongnu.org; Thu, 02 Mar 2017 22:25:27 -0500 Received: from ozlabs.org ([2401:3900:2:1::2]:36353) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cjdqP-0001E3-5T; Thu, 02 Mar 2017 22:25:26 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 3vZF1R21Jwz9s7c; Fri, 3 Mar 2017 14:25:15 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1488511515; bh=a2JekuR9xEvm5INUJuilioxVl0buUBXa6PvcaugU/98=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O+yYsoslV9GF4Sa+h4RklNvePhdLukcFtYK32N7CXlJ4BvfOsRJDtjhb/FWNvLxJP 0v7IAuO7+FKiSn1Zj6qYkdPJcAH+vQEG+8YGdnWJuARy9mBQpOB7Z+n7IFj10HYL4+ dO9K9O5fVXm3obcKeE4llvMllX7p0rGSmWkxTzJE= From: David Gibson To: peter.maydell@linaro.org Date: Fri, 3 Mar 2017 14:24:51 +1100 Message-Id: <20170303032507.16142-2-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170303032507.16142-1-david@gibson.dropbear.id.au> References: <20170303032507.16142-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 01/17] target/ppc: Add POWER9/ISAv3.00 to compat_table 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, thuth@redhat.com, mdroth@linux.vnet.ibm.com, aik@ozlabs.ru, agraf@suse.de, qemu-devel@nongnu.org, qemu-ppc@nongnu.org, sjitindarsingh@gmail.com, sam.bobroff@au1.ibm.com, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Suraj Jitindar Singh compat_table contains the list of logical pvr compat modes which a cpu can operate in. It is a list of struct CompatInfo which contains the given pvr value for a compat mode, the pcr bits which should be set to operate in that compat mode, the pcr level which must be present in pcr_supported for a processor to support that compat mode and the max threads possible in that compat mode. Add an entry for the POWER9/ISAv3.00 logical pvr which represents a processor running with support for logical pvr 0x0f000005. A processor running in this mode should have PCR_COMPAT_3_00 set in the pcr (if available in pcr_mask) and should have PCR_COMPAT_3_00 in pcr_supported to indicate that it is capable of running in this compat mode. Also add PCR_COMPAT_3_00 to the bits which must be set for all previous compat modes. Since no processor models contain this bit yet in pcr_mask it will never be set, but this ensures we don't forget to in the future. Signed-off-by: Suraj Jitindar Singh Signed-off-by: David Gibson --- target/ppc/compat.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/target/ppc/compat.c b/target/ppc/compat.c index 458da26..e8ec1e1 100644 --- a/target/ppc/compat.c +++ b/target/ppc/compat.c @@ -39,29 +39,35 @@ static const CompatInfo compat_table[] =3D { */ { /* POWER6, ISA2.05 */ .pvr =3D CPU_POWERPC_LOGICAL_2_05, - .pcr =3D PCR_COMPAT_2_07 | PCR_COMPAT_2_06 | PCR_COMPAT_2_05 - | PCR_TM_DIS | PCR_VSX_DIS, + .pcr =3D PCR_COMPAT_3_00 | PCR_COMPAT_2_07 | PCR_COMPAT_2_06 | + PCR_COMPAT_2_05 | PCR_TM_DIS | PCR_VSX_DIS, .pcr_level =3D PCR_COMPAT_2_05, .max_threads =3D 2, }, { /* POWER7, ISA2.06 */ .pvr =3D CPU_POWERPC_LOGICAL_2_06, - .pcr =3D PCR_COMPAT_2_07 | PCR_COMPAT_2_06 | PCR_TM_DIS, + .pcr =3D PCR_COMPAT_3_00 | PCR_COMPAT_2_07 | PCR_COMPAT_2_06 | PCR= _TM_DIS, .pcr_level =3D PCR_COMPAT_2_06, .max_threads =3D 4, }, { .pvr =3D CPU_POWERPC_LOGICAL_2_06_PLUS, - .pcr =3D PCR_COMPAT_2_07 | PCR_COMPAT_2_06 | PCR_TM_DIS, + .pcr =3D PCR_COMPAT_3_00 | PCR_COMPAT_2_07 | PCR_COMPAT_2_06 | PCR= _TM_DIS, .pcr_level =3D PCR_COMPAT_2_06, .max_threads =3D 4, }, { /* POWER8, ISA2.07 */ .pvr =3D CPU_POWERPC_LOGICAL_2_07, - .pcr =3D PCR_COMPAT_2_07, + .pcr =3D PCR_COMPAT_3_00 | PCR_COMPAT_2_07, .pcr_level =3D PCR_COMPAT_2_07, .max_threads =3D 8, }, + { /* POWER9, ISA3.00 */ + .pvr =3D CPU_POWERPC_LOGICAL_3_00, + .pcr =3D PCR_COMPAT_3_00, + .pcr_level =3D PCR_COMPAT_3_00, + .max_threads =3D 4, + }, }; =20 static const CompatInfo *compat_by_pvr(uint32_t pvr) --=20 2.9.3