From patchwork Thu Aug 24 09:28:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 716534 Delivered-To: patch@linaro.org Received: by 2002:adf:f747:0:b0:317:ecd7:513f with SMTP id z7csp1237482wrp; Thu, 24 Aug 2023 02:34:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEYcvJF53AFRVqMiUwru4NUzFMjdw6lDfUU0n6KDOkFG0bflaLOi61Gtwt8sc7Ppu0E5UbD X-Received: by 2002:a0c:db91:0:b0:641:e7a9:274f with SMTP id m17-20020a0cdb91000000b00641e7a9274fmr17175327qvk.3.1692869644066; Thu, 24 Aug 2023 02:34:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692869644; cv=none; d=google.com; s=arc-20160816; b=nsghlmVXOhGoPItzRVjfd/0Rs87FdX3llFx2XwvsbBFUKJJ8yko669L3zMNbMFMsaq YkcAqUz5GoT1mXizsYnM0aVr4NJ4ULIJ+YTkDRT9jfolKWI/phYC+a/7O0BT4b0TjDL5 8AeEeaLsMw0Wl2FiFAJ6V6VAoHF7RGP4BV3CjtV/jknj/CkF9k9qB2mFcLgLeyvkIHj8 t8H+njNHTMS2lzQfNzLTtYQse+bj3jjd4Ep07aWJrbbyiweKxuUzZpLE49QpE+GeIMFk UNA9GlbCGTL+fDUKToRAl/2FmzhOA3PuAYMI+83U/Hys7rzet+2ns00riYboDKOwiAUJ HFHQ== 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=Ync+V6kKLBj1Pw2phHNF031vxHZSCe8+iCSPGtaxtHg=; fh=bFDrUYhlTVi/QyetgXx/byg2+yO/22Hp9SjwoefyKLk=; b=Gi7RNuQCmQ9ou0rlX1hqVS1w23aU6FX1cV95VoTLH3rqyh3eOj5ph3rf99Bwv1is/F n5uBWFYEd2s014F9zm22KDy8mLhLykYjDHTgEcYxc4dWNmAHhED05oqt+V7IgmiPrJ6F m1hMC8I0yKKETP7A6amV3tTqK1A5QPMLCRNbraEdHRFOOzzSgFPLVWWXIrkN4L02yjaY iW0Mh/U41ghwghcRhP0D/mW5VrnFIDxbhqNHpbRnaoWVM+5b6gM8IGSm5dor5uE53kse pvq3AQSKvl6LwXtFQkZwnrjLIw3kLk8VSVotLSSR1EoN5SAz5GN0mkLteoLD3CYmCQ4A VsaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MYYcPSy1; 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 v10-20020a0ce1ca000000b0063d5554816csi661315qvl.387.2023.08.24.02.34.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 24 Aug 2023 02:34:04 -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=MYYcPSy1; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qZ6eu-0008ST-V2; Thu, 24 Aug 2023 05:29:44 -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 1qZ6eG-0004lL-Fv for qemu-devel@nongnu.org; Thu, 24 Aug 2023 05:29:06 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qZ6eA-000510-BU for qemu-devel@nongnu.org; Thu, 24 Aug 2023 05:29:03 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-3ff1c397405so13595205e9.3 for ; Thu, 24 Aug 2023 02:28:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692869328; x=1693474128; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Ync+V6kKLBj1Pw2phHNF031vxHZSCe8+iCSPGtaxtHg=; b=MYYcPSy16JuyPVTGrf6nxrtYklrEja5oQIzCkMe4QdlY9vYKYnRimEY0fi/WDNm94m HlzunkJUdySx4359bodG/TYUHQ96sM8nY5n7pewiZkRqaRM5BtyZLEx1o1s9c0wQdiir Yqr65emKJuS6N/1CRfjQVZbBKN8sl9FWCkAX26oJOosxHSN+zKVie6htySMZkjeFytt9 DisAhnX8gZOjy3Z8nhOSbUG859lrDBSnZSY/QWYOE9RbFn1LmvK04+f1z1m6SJQDVTDy IR/FspQTT0j4q6g/3Mb6vi501sCBXfyJ85EEDxpSLRuxrRPQOQMFpAaCtN+UxDZCbgWU m9JQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692869329; x=1693474129; 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:message-id:reply-to; bh=Ync+V6kKLBj1Pw2phHNF031vxHZSCe8+iCSPGtaxtHg=; b=fojI0HaEXFu/EnmpppCCW6DFzqExT/bdailGHFZgprQ9UpL78IELeVlhoatRQRXDAP i5Uf42tkPElVZt1DgrqkF8nzk3Z7wJHsksiSiXW0Ce0S/C8Dp1vszSwRIrsJOiYV6Psc aS7npue+GWHLnsmMKcjp/QHOJ9t2J4r3EZaP8ixAKPmIueUDRNxSkw+Fqbs+1GNsQCdp gplfHBR6wlwP6YF1Ces+jk3gARgSHkbsUokLvmhqd6PQiYTqt/ys5WHCN/o+huRKLYYr TS2IGbk9DIpRWewfDG0Q1zLZVVoFY6PR8WPFROR7izF0YFMwjC1iXmVbRO2PDeeB0Nn8 D3Bg== X-Gm-Message-State: AOJu0YyDIn9+QwHD/bIyGGdH2xvF183ZQ9aRjWx40EorC2k+kdMTeePB jzk9QvvlgcLDp6h/aMTa0SyNzzOZBCkfEwIuylE= X-Received: by 2002:a7b:c8d0:0:b0:3fc:7d2:e0c0 with SMTP id f16-20020a7bc8d0000000b003fc07d2e0c0mr11450474wml.27.1692869328790; Thu, 24 Aug 2023 02:28:48 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id s12-20020adfeccc000000b00317b5c8a4f1sm21844004wro.60.2023.08.24.02.28.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Aug 2023 02:28:48 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 22/35] target/arm/ptw: Remove S1Translate::in_secure Date: Thu, 24 Aug 2023 10:28:23 +0100 Message-Id: <20230824092836.2239644-23-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230824092836.2239644-1-peter.maydell@linaro.org> References: <20230824092836.2239644-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=peter.maydell@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=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-bounces+patch=linaro.org@nongnu.org We no longer look at the in_secure field of the S1Translate struct anyway, so we can remove it and all the code which sets it. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20230807141514.19075-11-peter.maydell@linaro.org --- target/arm/ptw.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/target/arm/ptw.c b/target/arm/ptw.c index 1ca25438c3c..78bc679deef 100644 --- a/target/arm/ptw.c +++ b/target/arm/ptw.c @@ -51,13 +51,6 @@ typedef struct S1Translate { * value being Stage2 vs Stage2_S distinguishes those. */ ARMSecuritySpace in_space; - /* - * in_secure: whether the translation regime is a Secure one. - * This is always equal to arm_space_is_secure(in_space). - * If a Secure ptw is "downgraded" to NonSecure by an NSTable bit, - * this field is updated accordingly. - */ - bool in_secure; /* * in_debug: is this a QEMU debug access (gdbstub, etc)? Debug * accesses will not update the guest page table access flags @@ -547,7 +540,6 @@ static bool S1_ptw_translate(CPUARMState *env, S1Translate *ptw, S1Translate s2ptw = { .in_mmu_idx = s2_mmu_idx, .in_ptw_idx = ptw_idx_for_stage_2(env, s2_mmu_idx), - .in_secure = arm_space_is_secure(s2_space), .in_space = s2_space, .in_debug = true, }; @@ -1784,7 +1776,6 @@ static bool get_phys_addr_lpae(CPUARMState *env, S1Translate *ptw, QEMU_BUILD_BUG_ON(ARMMMUIdx_Phys_S + 1 != ARMMMUIdx_Phys_NS); QEMU_BUILD_BUG_ON(ARMMMUIdx_Stage2_S + 1 != ARMMMUIdx_Stage2); ptw->in_ptw_idx += 1; - ptw->in_secure = false; ptw->in_space = ARMSS_NonSecure; } @@ -3167,7 +3158,6 @@ static bool get_phys_addr_twostage(CPUARMState *env, S1Translate *ptw, ptw->in_s1_is_el0 = ptw->in_mmu_idx == ARMMMUIdx_Stage1_E0; ptw->in_mmu_idx = ipa_secure ? ARMMMUIdx_Stage2_S : ARMMMUIdx_Stage2; - ptw->in_secure = ipa_secure; ptw->in_space = ipa_space; ptw->in_ptw_idx = ptw_idx_for_stage_2(env, ptw->in_mmu_idx); @@ -3403,7 +3393,6 @@ bool get_phys_addr_with_secure(CPUARMState *env, target_ulong address, { S1Translate ptw = { .in_mmu_idx = mmu_idx, - .in_secure = is_secure, .in_space = arm_secure_to_space(is_secure), }; return get_phys_addr_gpc(env, &ptw, address, access_type, result, fi); @@ -3475,7 +3464,6 @@ bool get_phys_addr(CPUARMState *env, target_ulong address, } ptw.in_space = ss; - ptw.in_secure = arm_space_is_secure(ss); return get_phys_addr_gpc(env, &ptw, address, access_type, result, fi); } @@ -3489,7 +3477,6 @@ hwaddr arm_cpu_get_phys_page_attrs_debug(CPUState *cs, vaddr addr, S1Translate ptw = { .in_mmu_idx = mmu_idx, .in_space = ss, - .in_secure = arm_space_is_secure(ss), .in_debug = true, }; GetPhysAddrResult res = {};