From patchwork Fri Sep 30 13:35:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 610947 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp1538285pvb; Fri, 30 Sep 2022 06:51:38 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7DrpJXus1xeJFuQw0+/akTIGAKqdI51okiIkuWRXgTOpj8OtPHk9vzMEXBOHS03gLq0CzY X-Received: by 2002:a05:620a:40c1:b0:6ce:a11a:7279 with SMTP id g1-20020a05620a40c100b006cea11a7279mr6046683qko.703.1664545898193; Fri, 30 Sep 2022 06:51:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664545898; cv=none; d=google.com; s=arc-20160816; b=nktxtuM3Z+v8g64Hvmets6q5+63sbRxN3E+YUpi0abdoJHCjC5ddt8uC9eKvA6TKW6 NcNUTBQXBgXWP1nDSn0YoGD0i4cPC/E+pqNHz6ewhPeoWiGGFJBXmp56tlaQ8jR5frTX jR3nto0bPDXdYPBMZH0mKd9khewEg7eyud3x44iEb5twEn+OOGS2Gqt3K+yHIROHDCTE 0CXeERMvQuykcMgokt7OXSQORil4c9w5XZ/yDXIjZRE+7K2QThMusUn7czW9emuK6KJe B3uyeLcQA9/l3dQr5+6Ds6FR82wpyLkEPFAz3d0kjp2HDJsLOxaOB7oz/Fv9XcPkkYuy aL7Q== 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 :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=NhqIrzhBpcl574rWKiDGts78z115WmBNREKOX97NyXE=; b=ye5ZG5UpWTgwAk8H0setDOjHf42z1IKUqOMQcNEM9luywOJ72bw6qPmd3X+/xu380r E4t9VlkCY+VKThT69Gm96+M+Tr1q4pScJBMuyqKQCTL6/0AhiAqmcr+76C7wl939EsM5 YZFD4VD1zjO58JDMWOORRnWuX154qNu56oXfpJY5/W49leSH19qMD3cB3bcWqmzy/SPA WW9aywdBpmm8Rq+FhPxG6hkXyQiXambO6x9Ym8YERHg3jZG/B+miofNatEDNvTdmxC6f nGdoGynZJBtOciCuIf2q2x1yw+BHlHojXeiYYbFR3S/mxablm6sS7h/KtSaJGFMjCgvZ WezQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xYIhCA1l; 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=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 o7-20020a05622a044700b00343d051f5f1si1170240qtx.640.2022.09.30.06.51.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 30 Sep 2022 06:51:38 -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=pass header.i=@linaro.org header.s=google header.b=xYIhCA1l; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:34070 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oeGQT-0000of-OA for patch@linaro.org; Fri, 30 Sep 2022 09:51:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51882) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oeGAp-0000HS-6q for qemu-devel@nongnu.org; Fri, 30 Sep 2022 09:35:27 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:36676) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oeGAl-0006WR-Sa for qemu-devel@nongnu.org; Fri, 30 Sep 2022 09:35:26 -0400 Received: by mail-wr1-x42f.google.com with SMTP id j7so1512148wrr.3 for ; Fri, 30 Sep 2022 06:35:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date; bh=NhqIrzhBpcl574rWKiDGts78z115WmBNREKOX97NyXE=; b=xYIhCA1lDFNWkEalEw6EWIGnRJMJNdPQFwGza0I9HnF+tEJs/UClkxTrE4kbWXljx8 o17nqeKFXFhXUAGas13qsh9n8OFQTLSNpCRJvQJPOxPqLq+DLwr34NCCuSoyD/qQ4Q0H AlBFhrS4G25BrNTxy3y6bkOmtCkZPpQl7ljtc3gBKhaR6xr1q/UQBUv0s8WRr7JnG0sN EMjM7MLomQRAevsKlfYQ1uWrM2bFwG/91vVN9SNh0zfLffI81rcVBCzYnRw2c5JhFytx E6bR97eAWR7D+RlUn+k/gOrfPBoLlQFxHAUvt1YqDQG0sxVQaJvUGApL/5DmndLZth5t JBWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date; bh=NhqIrzhBpcl574rWKiDGts78z115WmBNREKOX97NyXE=; b=DSt/CfoRc6Vadciz6ooYUIre/kit6paq324Nq5Wmdh1/qzd5kh2y0Vy11laynxfdXu PZBARsxgLnCJh0NkzTS2qxltRl/6fJAMTSZ3yUqSxkAOtsNyl2/Iam6vSGeG5fUC9RS7 G0SrlscIOpWPPtgX49+9719UXeA2/x8vF6bKTDLT+uYEHPByyDkIyvLcCWEad7BJqt+p d015SkVOVKIsYqjeCzXcEsqUGaWHPTHVME+i/IvPp4M16proTLCBEWblOhdf929OdxvV e7jOr0h9Stx36Jgdh3v8Cyk/VkkFXdlNP1DWLtE+u5srTu2ImS3upkFbynOk3MkJCZnq 5lTw== X-Gm-Message-State: ACrzQf2/iW3w16H2KpFypFukFBAKlQDuT/GULeSaEGdWDPCeGxqDhoQc gXtGZGj1H4JY/2uz0mXvYSIakvRqfzRhVQ== X-Received: by 2002:a05:6000:1881:b0:22b:262f:ee2a with SMTP id a1-20020a056000188100b0022b262fee2amr5811470wri.432.1664544921851; Fri, 30 Sep 2022 06:35:21 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id q12-20020adfcd8c000000b0021e4829d359sm1982551wrj.39.2022.09.30.06.35.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Sep 2022 06:35:21 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 10/10] target/arm: mark SP_EL1 with ARM_CP_EL3_NO_EL2_KEEP Date: Fri, 30 Sep 2022 14:35:11 +0100 Message-Id: <20220930133511.2112734-11-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220930133511.2112734-1-peter.maydell@linaro.org> References: <20220930133511.2112734-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42f.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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@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-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Jerome Forissier SP_EL1 must be kept when EL3 is present but EL2 is not. Therefore mark it with ARM_CP_EL3_NO_EL2_KEEP. Cc: qemu-stable@nongnu.org Fixes: 696ba3771894 ("target/arm: Handle cpreg registration for missing EL") Signed-off-by: Jerome Forissier Reviewed-by: Richard Henderson Message-id: 20220927120058.670901-1-jerome.forissier@linaro.org Signed-off-by: Peter Maydell --- target/arm/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 24c592ffef8..db3b1ea72da 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -5088,7 +5088,7 @@ static const ARMCPRegInfo v8_cp_reginfo[] = { .fieldoffset = offsetof(CPUARMState, sp_el[0]) }, { .name = "SP_EL1", .state = ARM_CP_STATE_AA64, .opc0 = 3, .opc1 = 4, .crn = 4, .crm = 1, .opc2 = 0, - .access = PL2_RW, .type = ARM_CP_ALIAS, + .access = PL2_RW, .type = ARM_CP_ALIAS | ARM_CP_EL3_NO_EL2_KEEP, .fieldoffset = offsetof(CPUARMState, sp_el[1]) }, { .name = "SPSel", .state = ARM_CP_STATE_AA64, .opc0 = 3, .opc1 = 0, .crn = 4, .crm = 2, .opc2 = 0,