From patchwork Fri Jan 13 06:28:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suraj Jitindar Singh X-Patchwork-Id: 9514637 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 B1FEE601E5 for ; Fri, 13 Jan 2017 06:29:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9FE252871F for ; Fri, 13 Jan 2017 06:29:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 91D4B28723; Fri, 13 Jan 2017 06:29:29 +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_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 1E5722871F for ; Fri, 13 Jan 2017 06:29:28 +0000 (UTC) Received: from localhost ([::1]:39258 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cRvMc-000629-1I for patchwork-qemu-devel@patchwork.kernel.org; Fri, 13 Jan 2017 01:29:26 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53039) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cRvM0-00060S-La for qemu-devel@nongnu.org; Fri, 13 Jan 2017 01:28:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cRvLv-0001v1-O4 for qemu-devel@nongnu.org; Fri, 13 Jan 2017 01:28:48 -0500 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]:35941) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cRvLt-0001uT-Mc; Fri, 13 Jan 2017 01:28:41 -0500 Received: by mail-pf0-x242.google.com with SMTP id b22so6874733pfd.3; Thu, 12 Jan 2017 22:28:41 -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=ur9/9rB4fhwZrCKrtFvcg7qxkSZOPRMJBUAOSBzVbCQ=; b=ukJQWzzjzwVDFPa0zgth1+AAbzhwi4Qpv1FWxmHdm4qW3EVPMyNWOUHF3xSDSGmk+3 w8Iy9HJiA3ZLUeLVy/pzvp/+4GF9u6tGcMGCXTfm4KgFWo+xCWBtS4uj/R5Fgrg5T8WX AlAhVt78FrzF3jI5cK3DclxGWeNxsAYQeeeXHYkZf+dLJWBQ5QHpxsn7GsYPMNIK8t4J aR5l/7yQ5Zboa8CQ6+jcN6FYsqpdEPWYyTebU1PPg6i01pCg1TvZthVcmxGN8TmrFZ4e 9sYPlDkOc5KSU4PN7sUU39draLPXItXQarWS83wuEzuljfUO3aE+q2rC/QJZ32vd2dZQ 9z2Q== 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=ur9/9rB4fhwZrCKrtFvcg7qxkSZOPRMJBUAOSBzVbCQ=; b=qmm7L86KikjBmPbnB+fOK/WlR7JyoaiEqshbY5GYYnOlaiLjqKYGofL/yBlffrEnb0 wDpp8dIF0977jN3pqeTHCMvjNQg9yGwVb00rwgQWewPf2AuUbc/8jALgUJK98nMU9eJm tYfiZxHilvUcRVe5bN5IXKxmPAv+Eotby/MMPU5kAHUAgjVaAOWblE4pFJEI3LDCKlJW 6mI+U8Ji5NDROSyryy3Vy9NCnJXEcFxfyUDwwGYsrxn8r3akQFKQM/EnxvwY6wU0g3Ig 4sAPP6TWLRGcdO2yoG6iaQlGgLBDfWBD+UcxGgzlLa/mIpxxvORO1itW2NxLRcyBRcL1 ZLJg== X-Gm-Message-State: AIkVDXKccqF6NtAYQnotHhUXE+25VjLILjqVv+SynkJPVFeoViFVubseUPYkyRdxIqSqYw== X-Received: by 10.99.113.82 with SMTP id b18mr22640480pgn.118.1484288920780; Thu, 12 Jan 2017 22:28:40 -0800 (PST) Received: from dyn253.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id r2sm26004999pfi.67.2017.01.12.22.28.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jan 2017 22:28:40 -0800 (PST) From: Suraj Jitindar Singh To: qemu-ppc@nongnu.org Date: Fri, 13 Jan 2017 17:28:09 +1100 Message-Id: <1484288903-18807-4-git-send-email-sjitindarsingh@gmail.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1484288903-18807-1-git-send-email-sjitindarsingh@gmail.com> References: <1484288903-18807-1-git-send-email-sjitindarsingh@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c00::242 Subject: [Qemu-devel] [RFC PATCH 03/17] target/ppc: Add pcr_supported to POWER9 cpu class definition 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, agraf@suse.de, 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 pcr_supported is used to define the supported PCR values for a given processor. A POWER9 processor can support 3.00, 2.07, 2.06 and 2.05 compatibility modes, thus we set this accordingly. Signed-off-by: Suraj Jitindar Singh --- target/ppc/cpu.h | 1 + target/ppc/translate_init.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index 2a50c43..afb7ddb 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -2250,6 +2250,7 @@ enum { PCR_COMPAT_2_05 = 1ull << (63-62), PCR_COMPAT_2_06 = 1ull << (63-61), PCR_COMPAT_2_07 = 1ull << (63-60), + PCR_COMPAT_3_00 = 1ull << (63-59), PCR_VEC_DIS = 1ull << (63-0), /* Vec. disable (bit NA since POWER8) */ PCR_VSX_DIS = 1ull << (63-1), /* VSX disable (bit NA since POWER8) */ PCR_TM_DIS = 1ull << (63-2), /* Trans. memory disable (POWER8) */ diff --git a/target/ppc/translate_init.c b/target/ppc/translate_init.c index 626e031..bfc1f24 100644 --- a/target/ppc/translate_init.c +++ b/target/ppc/translate_init.c @@ -8797,6 +8797,8 @@ POWERPC_FAMILY(POWER9)(ObjectClass *oc, void *data) dc->props = powerpc_servercpu_properties; pcc->pvr_match = ppc_pvr_match_power9; pcc->pcr_mask = PCR_COMPAT_2_05 | PCR_COMPAT_2_06 | PCR_COMPAT_2_07; + pcc->pcr_supported = PCR_COMPAT_3_00 | PCR_COMPAT_2_07 | PCR_COMPAT_2_06 | + PCR_COMPAT_2_05; pcc->init_proc = init_proc_POWER9; pcc->check_pow = check_pow_nocheck; pcc->insns_flags = PPC_INSNS_BASE | PPC_ISEL | PPC_STRING | PPC_MFTB |