From patchwork Fri Jun 4 15:52:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 454097 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp577477jae; Fri, 4 Jun 2021 09:43:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznSaC1Ig4gmmRm6bStLvpLCwmN9PuB3GCUQY2U2A8shiHJYDKz7AqvVD+ZbdHX7CYKT8H8 X-Received: by 2002:a67:87ca:: with SMTP id j193mr3426207vsd.55.1622825019106; Fri, 04 Jun 2021 09:43:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622825019; cv=none; d=google.com; s=arc-20160816; b=TxY6MWPx6OF23WYSMe6Jxa5xGBR35ilBs77JC4YXiSC4QekjnnFsXGiHxgL7RIsBPV F8cm4IvagaIazJJu5XEf602knZCaa05htUV5qC6sK58IXwdaspWLXjfAyETVUlUuDffv ToJsSIrKWQBNM0fUGv1bdBDyCmLD3uYst5xAe/pu63Mg/PpiF3OjvZoGVayRw8HKFF+b pAJv+Qe+ko9XPbtBaINEK3OQukeA82sXZ0my+xwlnEv3f1VfVM/b34WYeQKYn8AxeEF4 YhcuCtS1Io7XnOzKBHB5HdLA/SfahUGqxB9dKiEcgRXOe6umfFoHIAguD8wzIDHX35qH mEFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=4nGP6Z5x0fcvCA1VqJc1xqqHTfKci3f1/omLPFccgrE=; b=Ec5R+y3KDMlPODmjbM4khlOY4LjhD4glq5GPMFF0+kiiUpBa8zPMGj+GnUWwVP2xEx LcFF89t4XmW5iA0xxK9r2wDt9vv2dTdY12EzbOtvSloADaQFpO68jyR96QyDM0T3vn7t XMME4ogP8Fo6puzva0n0YP+BdIT5pwXmVs+5Gt8wBi3XeLsNJVwzCWDTQH/oLRQfuOyT C6jSq3thhcMc+1jbrYEVHvxQHeE3jZonqAS/qF68/QRdmyivX+6wAb+YslDs8A8miAXb JTt6J3vNv1HzszZcfRao92QocT0AvHXvUaNJnmZuy2b6q7+P75LNUTkuSdIOO4v4d5OP JReQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=rYrBGRRK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z189si3830035vsb.105.2021.06.04.09.43.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 04 Jun 2021 09:43:39 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=rYrBGRRK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:34046 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lpCv4-0004Wa-Ej for patch@linaro.org; Fri, 04 Jun 2021 12:43:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48578) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpCI3-0008Jt-7q for qemu-devel@nongnu.org; Fri, 04 Jun 2021 12:03:19 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:43960) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lpCHc-0005pv-Ro for qemu-devel@nongnu.org; Fri, 04 Jun 2021 12:03:18 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 3-20020a05600c0243b029019f2f9b2b8aso5901647wmj.2 for ; Fri, 04 Jun 2021 09:02:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4nGP6Z5x0fcvCA1VqJc1xqqHTfKci3f1/omLPFccgrE=; b=rYrBGRRKUpmtFoVFXwQDQZhTI56HGv0MSBw/8FGkC1Wcjuet3fUoIZiQjf+DQuUqwC z4HprW60hoQme4+MsVmcNa6ubCxEJHr7owrpzpAXlqHruAp3/wKRshqydHctNhVCuP/v TpXU3bwe7feRBXO//YJ+UHkQ4Dzc24DngLhNnYHOFXOGUd05Xc8zIAUYfpRDtJk9N7wo p3pdHe3MdTT/CdiChZvFd3mY3KUSjidE3fLkk6H310oPCsY6qKGyJFxQbWh2dvDBFZcv 4zdJXvaiihDdbV3PRa+3fF8VDS1EwPU+OQbLytjuTP6I8s6aldexm74oOyFu3AAIUB1Z 8ldg== 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:mime-version:content-transfer-encoding; bh=4nGP6Z5x0fcvCA1VqJc1xqqHTfKci3f1/omLPFccgrE=; b=Mczs4lj9PXRVS7+ejAazDKr8V/HOdbgrkpVz5Wo3nkJbUmMc6XhmPDM3T3sgJhCTNk 0jqBQOnvl2iLy8oh4UC76Zd8S+DsddObzx3T9tiaFvRi6m85S8jgMWr0cSHfmsUukrwW v+xsdHr4dWf5cYooh9G9vwTHpMWQFh+BDSbpwt0lyBpX4NWU5spWdW1MHrUS1ipv+D8b S8JaDYGVsosJqu4LBFSGMQ+HBgXcdgzn0/RNaoUYB7/G8TIuxw+ZBPmkzqwMmJcoHOi2 asfYwGTT+r2oKEC5XEQ4y7YEYGKVmOFD3+OB0G/NYpUg7J02ZqQ9achzQW7/ek5COUGd e1jQ== X-Gm-Message-State: AOAM5339HLIEubiRga9YpfiZ2B/vYJYFHhKGS5XCpDvrf6YnhRNsr3Q4 o0SmqNreqBCuH+KBU3d74lP+CA== X-Received: by 2002:a05:600c:21cf:: with SMTP id x15mr4323372wmj.174.1622822571487; Fri, 04 Jun 2021 09:02:51 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id a123sm10341991wmd.2.2021.06.04.09.02.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Jun 2021 09:02:43 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 6CD941FFF1; Fri, 4 Jun 2021 16:53:22 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v16 79/99] target/arm: tcg: restrict ZCR cpregs to TARGET_AARCH64 Date: Fri, 4 Jun 2021 16:52:52 +0100 Message-Id: <20210604155312.15902-80-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210604155312.15902-1-alex.bennee@linaro.org> References: <20210604155312.15902-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-arm@nongnu.org, Richard Henderson , Claudio Fontana , Peter Maydell Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Claudio Fontana restrict zcr_el1, zcr_el2, zcr_no_el2, zcr_el3 reginfo, and the related SVE functions to TARGET_AARCH64. Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée --- target/arm/tcg/cpregs.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- 2.20.1 diff --git a/target/arm/tcg/cpregs.c b/target/arm/tcg/cpregs.c index 8422da4335..56d56f7f81 100644 --- a/target/arm/tcg/cpregs.c +++ b/target/arm/tcg/cpregs.c @@ -5791,6 +5791,8 @@ static const ARMCPRegInfo debug_lpae_cp_reginfo[] = { REGINFO_SENTINEL }; +#ifdef TARGET_AARCH64 + static void zcr_write(CPUARMState *env, const ARMCPRegInfo *ri, uint64_t value) { @@ -5843,6 +5845,8 @@ static const ARMCPRegInfo zcr_el3_reginfo = { .writefn = zcr_write, .raw_writefn = raw_write }; +#endif /* TARGET_AARCH64 */ + static void dbgwvr_write(CPUARMState *env, const ARMCPRegInfo *ri, uint64_t value) { @@ -7572,6 +7576,7 @@ void register_cp_regs_for_features(ARMCPU *cpu) define_arm_cp_regs(cpu, vhe_reginfo); } +#ifdef TARGET_AARCH64 if (cpu_isar_feature(aa64_sve, cpu)) { define_one_arm_cp_reg(cpu, &zcr_el1_reginfo); if (arm_feature(env, ARM_FEATURE_EL2)) { @@ -7584,7 +7589,6 @@ void register_cp_regs_for_features(ARMCPU *cpu) } } -#ifdef TARGET_AARCH64 if (cpu_isar_feature(aa64_pauth, cpu)) { define_arm_cp_regs(cpu, pauth_reginfo); } @@ -7614,7 +7618,7 @@ void register_cp_regs_for_features(ARMCPU *cpu) define_arm_cp_regs(cpu, mte_tco_ro_reginfo); define_arm_cp_regs(cpu, mte_el0_cacheop_reginfo); } -#endif +#endif /* TARGET_AARCH64 */ if (cpu_isar_feature(any_predinv, cpu)) { define_arm_cp_regs(cpu, predinv_reginfo);