From nobody Tue Feb 10 08:31:19 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1656840532; cv=none; d=zohomail.com; s=zohoarc; b=fxOJRJfmfdhCy7dNJZumxXF2rQQOb+50/HH0zLTWNih29HwOJsOdZ9NMi+JM2jVxhtlzA7wM8pkM6DmHSHultpzOrL/smsL6OyBJ+pu7EkL4O9Xzc31hAacWS0Id14B1xzuOAV0FkaJ0cmVUrsVCcQKxW5dLHJut8kqembNZhII= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1656840532; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=LzZAk2sWUDfOJVyhEAahGWIXzjO1BF4nkh933Xz/rqw=; b=bu2tC2qJ597Jv3dpLAg/Ino07Sb6DH8VtuhSX+Rw9wdw4Awq8z3a9p98cW1IRK5KjhsLr9DMYHVdAZM0FGPFvfO8eWkPJ/ouN4zf9igtSiaG/k8kcvLBt1GANObK6WR/c5HkUYc30R9UjL9ZY2lyweu+peDirFtzsa1n5gbB7nU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 165684053206448.31060994482789; Sun, 3 Jul 2022 02:28:52 -0700 (PDT) Received: from localhost ([::1]:45084 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o7vuN-00054p-1h for importer@patchew.org; Sun, 03 Jul 2022 05:28:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54956) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o7uzy-0002Bs-K2 for qemu-devel@nongnu.org; Sun, 03 Jul 2022 04:30:38 -0400 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]:44825) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o7uzw-00072J-8J for qemu-devel@nongnu.org; Sun, 03 Jul 2022 04:30:34 -0400 Received: by mail-pl1-x62f.google.com with SMTP id l6so6006495plg.11 for ; Sun, 03 Jul 2022 01:30:31 -0700 (PDT) Received: from stoup.. ([122.255.60.245]) by smtp.gmail.com with ESMTPSA id g6-20020a1709026b4600b0016788487357sm18574523plt.132.2022.07.03.01.30.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Jul 2022 01:30:29 -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=LzZAk2sWUDfOJVyhEAahGWIXzjO1BF4nkh933Xz/rqw=; b=OMIs+BTzsmw4SFXZyTabVkxs3BOyTk43Iw2JgdvPlsmjreRmRVVIwpyahf/OyBW6+V wZbaCu2VJna8X0lzKpiY4yk65YkgamyN7XIJy9pQ8BcwHz7+bIwH8cgqJg86vOvP+2V6 1I+TtzyozA7P/SslcWmd12BDy1YIKgHRljaCP44v1WR1q4MdZIQ1Xj5JS7lYmiWnFONA imy0fTAGKksZrVGjz7+nkvC6ABPjwd6uV4KMaLGVfJJYUgKZPhLVb27c6SICnwVc2+Oh eRo2DdGfvOQ1L+rW+GSJTZj/xRWrGDu9ccQZSIv4Tgx7onZRhKI5LzcNHRV60LKVyLO4 BClQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LzZAk2sWUDfOJVyhEAahGWIXzjO1BF4nkh933Xz/rqw=; b=a2yKjz/EKOlcajGKpLpsX3rCPILiDyTqFAjkfC1e5bvMiL9GWim5opF4w0dbw7ez5y bSlg3rYEOnc+7KIOmfXsDrm0YjFzAVHzHb5ldEwfqbtz7dyFEMLbWgqtqNhZFS9Kbocw DFxqP9vYObrPC6GaCgnIELEIRMhRZrsEqKJekLZza6YUKCJEUPGN5ovoN+TPA2G/ewQC FT7emKTEAgxM1DMvl4mv17FfD8RBhJ+8SmQA2848k1ENFo5N79q8J/qY1H/MQ8UibNOR BGVfClx5xONx7Bp8TUy+HuXAGhzPZ85a1Bxha9c/x3KOX8SUrE0XPeejyuZMv3sTFmRL /r9w== X-Gm-Message-State: AJIora+NUtWS59uepUkOTPegd6uXLjUfKKcP223pNsTKNBHYN2HG+4t2 /hOIdCneGrBKzm6LdVU4S13xmA2wrssxsyTs X-Google-Smtp-Source: AGRyM1s3i0DaRLyCfY8UbJusIjRpYho3eJ9bWu087rrUSREhkjssh3Fa8tFCI5TdIFFMWO248SBIjw== X-Received: by 2002:a17:90b:1e06:b0:1ec:b396:7468 with SMTP id pg6-20020a17090b1e0600b001ecb3967468mr28088345pjb.63.1656837030903; Sun, 03 Jul 2022 01:30:30 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH 61/62] target/arm: Consider GP an attribute in get_phys_addr_lpae Date: Sun, 3 Jul 2022 13:54:18 +0530 Message-Id: <20220703082419.770989-62-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220703082419.770989-1-richard.henderson@linaro.org> References: <20220703082419.770989-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62f; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62f.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1656840534053100001 Content-Type: text/plain; charset="utf-8" Both GP and DBM are in the upper attribute block. Extend the computation of attrs to include them, then simplify the setting of guarded. Signed-off-by: Richard Henderson --- target/arm/ptw.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/target/arm/ptw.c b/target/arm/ptw.c index e7569ece33..07ed49bd70 100644 --- a/target/arm/ptw.c +++ b/target/arm/ptw.c @@ -1026,7 +1026,6 @@ static bool get_phys_addr_lpae(CPUARMState *env, uint= 64_t address, uint32_t el =3D regime_el(env, mmu_idx); uint64_t descaddrmask; bool aarch64 =3D arm_el_is_aa64(env, el); - bool guarded =3D false; S1TranslateResult s1; uint64_t descriptor; bool nstable; @@ -1288,7 +1287,7 @@ static bool get_phys_addr_lpae(CPUARMState *env, uint= 64_t address, descaddr &=3D ~(page_size - 1); descaddr |=3D (address & (page_size - 1)); /* Extract attributes from the descriptor */ - attrs =3D descriptor & (MAKE_64BIT_MASK(2, 10) | MAKE_64BIT_MASK(52, 1= 2)); + attrs =3D descriptor & (MAKE_64BIT_MASK(2, 10) | MAKE_64BIT_MASK(50, 1= 4)); =20 if (mmu_idx =3D=3D ARMMMUIdx_Stage2 || mmu_idx =3D=3D ARMMMUIdx_Stage2= _S) { /* Stage 2 table descriptors do not include any attribute fields */ @@ -1296,7 +1295,6 @@ static bool get_phys_addr_lpae(CPUARMState *env, uint= 64_t address, } /* Merge in attributes from table descriptors */ attrs |=3D nstable << 5; /* NS */ - guarded =3D extract64(descriptor, 50, 1); /* GP */ if (param.hpd) { /* HPD disables all the table attributes except NSTable. */ goto skip_attrs; @@ -1348,7 +1346,7 @@ static bool get_phys_addr_lpae(CPUARMState *env, uint= 64_t address, } /* When in aarch64 mode, and BTI is enabled, remember GP in the IOTLB.= */ if (aarch64 && cpu_isar_feature(aa64_bti, cpu)) { - result->cacheattrs.guarded =3D guarded; + result->cacheattrs.guarded =3D extract64(attrs, 50, 1); /* GP */ } =20 if (mmu_idx =3D=3D ARMMMUIdx_Stage2 || mmu_idx =3D=3D ARMMMUIdx_Stage2= _S) { --=20 2.34.1