Received: by 2002:a17:906:bfc6:b0:9a1:fa4e:495e with SMTP id us6csp682294ejb; Fri, 8 Sep 2023 13:56:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHE8FiPXbBk11xBKae3u0s3sHwdDYbNR49yatbmuquetxPzIubISZzcsrBWJAClVCn6gMNl X-Received: by 2002:a05:620a:29d2:b0:76f:1828:4f36 with SMTP id s18-20020a05620a29d200b0076f18284f36mr4509368qkp.27.1694206609952; Fri, 08 Sep 2023 13:56:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694206609; cv=none; d=google.com; s=arc-20160816; b=i2Td8vd7cQ/Qr+4Groq/+6QDnpOC3R2k3WincpqOPbzXnRA431hrgnS9Y2bzTorAIg WS3ZVNAZTjqTgXnve1egQDmz/E3sK35qw6qstdUhbFpzvjaX0C/7CrV4xwNe7cWuCBTD rjegCBQ58xdquai3HtpGro4YEnYoYLU97V7T+MG/AvhfDA5nAensgedtwS4EbX73mxpm 2S5u+kI9OJeOQjMZIJ6yFhwcA4vfiO619HVcFjEEgPbHROFqdG4qWxPRjlkS7HbDsRQL 1fgEWXHn9Gc/EXD2POcmXp/BORtEhvFIS93ZwgVgnMj/Kkv3IyPPzxEt5plfpVvRv07n mUog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=ByUqUacKFhbA1ou2BOfu9pawjfMy3n2JM+xEhfoLiNg=; fh=+xj4Yfkfa7hWRbLS+DTrcNY2o0evBrBbm0gAigyTnIw=; b=SQ4DZt3IUG3PsbCWx1EeO/ZJcHYzntYHyupblC4SDFr7F/GIERO0faSYdVIxMLHhUV nx7/KrhugaaRy8WhttLzpDyBUixnp5VRGW/OpGPfmO7Xf0kGP5ab95kuhydhcV8h/ISe NlJfUb/erYRkPb+G9HRs8EVhqA6QNdBvhpnjRBjywsBuebBYivZa5EkfMNUQVydlx5BV 29gKmecFEXXyNwMKNPzti7Vd/yxj8cILrZxdR1WTMYVt0nhUSxCxXUc5JYb7XYU5npUY 8lwq+fVRkSERW5PkGxFAYTFUkk7lFZf0xm3M2Aa9KcAnpYV1LatZIlOQu/iPY6wZAneP R7iQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=N1+mZKNX; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (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 z11-20020a05620a260b00b00767c56eb5a1si1612594qko.38.2023.09.08.13.56.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Sep 2023 13:56:49 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=N1+mZKNX; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeiWs-0007PE-EU; Fri, 08 Sep 2023 16:56:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeiWq-0007Oj-NI for qemu-arm@nongnu.org; Fri, 08 Sep 2023 16:56:36 -0400 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qeiWo-0007Ry-Dj for qemu-arm@nongnu.org; Fri, 08 Sep 2023 16:56:36 -0400 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-68e3083aa1dso2351160b3a.1 for ; Fri, 08 Sep 2023 13:56:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694206593; x=1694811393; darn=nongnu.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ByUqUacKFhbA1ou2BOfu9pawjfMy3n2JM+xEhfoLiNg=; b=N1+mZKNXmp6O/KPj71caEawkdJOQ3IUsaNQDPOqimCOotNzUpDvFbJ1JqxSHeZp/0+ auW53itF8yEYlE/L6uDJDYg193foZdp1kuA7yqcQ6Gv+9PUh11PojcH9A6cGjXd2z0r8 8QmskGiN+J51wkp8Mj9NtY+7H+8yJp5AdMo2m8xV6h8THcLkDLaxumSlnzNM8O3Tjzx8 twSceFAiwCDPU3tLFlMXotZaAv6wyp/aaSNLRJxNsPnkx7qM4E+RYx7Ng2yLIz6pWUSk Y2RBdeflSBisQ8G1m+5CfhSTuBAgthw13Rb8hwZ1dNcOqy38tLCpRodSTYBBKFVZVNv6 thNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694206593; x=1694811393; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ByUqUacKFhbA1ou2BOfu9pawjfMy3n2JM+xEhfoLiNg=; b=FNnnKhRccKgIsgUckMuhsg0UMVFKZTe/fco5bokaFdRdrEceoQGCbZkGnRtfUzSjmx sjSD0mqj6hBxhItVjR0pD3nj9JO0kdmglzJMqDAlvdT6pBXt9Yojnt+yvabVS2/lDr0O tZoBbyjD/o5Sz/fFeDUpULjFeqcpzvZmFxAMy/XZXpy9ff8MbkbtYj3gVZw47F++ZsoB uKgwDS4dVkchVa72veU7VW0pN11veCzP0RTHZp8NPF0c3/UOd2of7RC03Kp7awu6rnga IU/rdiE2v4VHFtpVs1gcr2f/rIjPluK4kO0IQVZ9slKhvKCe2DaVjQVJSPvY+tt9pXOW WqWw== X-Gm-Message-State: AOJu0Yz/MOafM/ZfGnn2LECUokCtHNYhlUTdqEffWxAhJEhXxql4VFlJ iPf4xRC6EbZG31Si5WsGkDmxhQ== X-Received: by 2002:a05:6a20:7343:b0:153:6ce7:294d with SMTP id v3-20020a056a20734300b001536ce7294dmr4060392pzc.12.1694206592736; Fri, 08 Sep 2023 13:56:32 -0700 (PDT) Received: from [192.168.0.4] ([71.212.131.115]) by smtp.gmail.com with ESMTPSA id z11-20020aa785cb000000b0068a3e7634d0sm1683851pfn.129.2023.09.08.13.56.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 08 Sep 2023 13:56:32 -0700 (PDT) Message-ID: <23cc3a62-51a8-a6c7-2389-e166b0fb9fb5@linaro.org> Date: Fri, 8 Sep 2023 13:56:29 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Subject: Re: [PATCH 04/14] target/arm: Implement FEAT_MOPS enable bits Content-Language: en-US To: Peter Maydell , qemu-arm@nongnu.org, qemu-devel@nongnu.org References: <20230907160340.260094-1-peter.maydell@linaro.org> <20230907160340.260094-5-peter.maydell@linaro.org> From: Richard Henderson In-Reply-To: <20230907160340.260094-5-peter.maydell@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x435.google.com X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 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, NICE_REPLY_A=-1.473, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org X-TUID: 3zXqeo+rH4jJ On 9/7/23 09:03, Peter Maydell wrote: > FEAT_MOPS defines a handful of new enable bits: > * HCRX_EL2.MSCEn, SCTLR_EL1.MSCEn, SCTLR_EL2.MSCen: > define whether the new insns should UNDEF or not > * HCRX_EL2.MCE2: defines whether memops exceptions from > EL1 should be taken to EL1 or EL2 > > Since we don't sanitise what bits can be written for the SCTLR > registers, we only need to handle the new bits in HCRX_EL2, and > define SCTLR_MSCEN for the new SCTLR bit value. > > The precedence of "HCRX bits acts as 0 if SCR_EL3.HXEn is 0" versus > "bit acts as 1 if EL2 disabled" is not clear from the register > definition text, but it is clear in the CheckMOPSEnabled() > pseudocode(), so we follow that. We'll have to check whether other > bits we need to implement in future follow the same logic or not. > > Signed-off-by: Peter Maydell > --- > target/arm/cpu.h | 6 ++++++ > target/arm/helper.c | 28 +++++++++++++++++++++------- > 2 files changed, 27 insertions(+), 7 deletions(-) Reviewed-by: Richard Henderson r~