From patchwork Wed May 7 23:42:38 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 888173 Delivered-To: patch@linaro.org Received: by 2002:a5d:4683:0:b0:38f:210b:807b with SMTP id u3csp634406wrq; Wed, 7 May 2025 16:51:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXhQoacmvJTabyoW5tnQ5qxpV9TkXH/e48rXOQonlCxItxpcD+bDMVbDprM5CVZnpmcIR2tTA==@linaro.org X-Google-Smtp-Source: AGHT+IFDzpTylWsDWZvrSMFGnVF3+PdqtXmsCi5olugA3UYGKbeb8lFduKk2ZZrLldn1Rovcefxt X-Received: by 2002:a05:622a:350:b0:476:add4:d2b7 with SMTP id d75a77b69052e-4944964035dmr19319941cf.51.1746661917897; Wed, 07 May 2025 16:51:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1746661917; cv=none; d=google.com; s=arc-20240605; b=Bqy4W0QCKm3j5dPtbgOGQV0dhaGMgUkne8+MBOtt6PQgYbIhaYPQYAqza76S0PD/Ol TJeW/4aBxsiv6qardvWbC/yeJxKbLodw8o1fH5EbvTp5CLyQVfT+fOjRGuQZaefE7Fga DEauTCW6egQwx0rdsgDza5qGopWpPpNf3Ri0z2glgvPwFVraJDYEJJD6pl1LzhQhjg5F v0YLBQ2kO+3PVIytDJJ1NKBbLMtoJZb9IqyudYvpTI+YJ4hVZc+3GuCO+a0/h4q5e+Cq Bgv9ntijxdWW9sdk8WqKx7bTTNdUEjHBzLcm0urxR7+QM+tQZ+umt06yrpdEalwmR91J q/ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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:cc:to :from:dkim-signature; bh=ZWI42H1mGpC+qtJnGTlft49SFGxWloHLdh6QbAbdhzc=; fh=Zbxy5TRiDd+Eff0zsN+2XmZYe/TihsWpxb97dHV4h78=; b=N/6ttw0RacY5k0xL5ae2G94xULmixAOpif1TshUlcSoLCMGdNDJtgssD3T2V4RyxRw qVj//skae8wHg77AMGunSDVqPE2nffJG87A3oyy+9X8VON5y+l3WECnxi8g+BSNPl39K GJvQiElJTNBfe15mQ61de+ViOYxy2lxrDEreuIAMPDU8IWYmnPx4e/bdnxmiCr248Xwk hXco/pmY8mL5lcmw4Rwdq9+KXvOTGXdosFM0iYmU0cIIqjV3neuN/ekhjkbh7yO4Sh+I nt6ZV3yC9/G6j2q6qLDiK3AHqu/tedLiw6Ehjvk/8OZ4Wk0jZYA3cDLYJGn4yQ+N2l0X uSag==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gWggpCoB; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-4922354d652si31700721cf.572.2025.05.07.16.51.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 May 2025 16:51:57 -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=gWggpCoB; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uCoVA-00033k-I8; Wed, 07 May 2025 19:48: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 1uCoTd-0000c6-6s for qemu-devel@nongnu.org; Wed, 07 May 2025 19:47:02 -0400 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uCoTb-00039e-53 for qemu-devel@nongnu.org; Wed, 07 May 2025 19:47:00 -0400 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-22e6344326dso5100625ad.1 for ; Wed, 07 May 2025 16:46:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1746661618; x=1747266418; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZWI42H1mGpC+qtJnGTlft49SFGxWloHLdh6QbAbdhzc=; b=gWggpCoBc99/MqcfabmgUSQythwwMnA1Ilwzn/tCrlGMGMMMHaJZOVW0mNL1/2MEwD x5xLbZcte0/kJAd2NWhqllsgtprzGr6yi9UIrteehjdX81qjAvuZYtYki13kPnnyzg8H PhkmnbE+0MyecN7zTm5tLgycyg2WgGu1X3AwZ1PJKGmLxwvr6SwxEfCY/gi7Alhx2ozx bfhPV18fWSF7s6ONBFbXxkSiae+KVWhIRGsrTGV4Hwq9WdJ4BmJArk5Esw9weOpPEeXA nVXJKvuDSS46m60etq9vlSZyYstXlP/5Qbo4012OKAA/juiMhCNsa78Vw7fq37XiAYR9 2uoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746661618; x=1747266418; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZWI42H1mGpC+qtJnGTlft49SFGxWloHLdh6QbAbdhzc=; b=fXWaWIyPPLkxSDdfoh/i1gWhKnNK5nupQRA9/UmF9TJwjvF5SHFSDQpboLhyURxGwF 8JpS5hfAUiDf1He537zbvlCO3lTgfvh/htHzkWFA0JqHVbSX5Xx85wFhLqlfudxxguvI ilElh0eWurl3XpDk82ssO58mzKNHthSCaiN+b39XeKuG/B0Ty2rOK4oIlyZFcFHENAEq gg87Eppd2KK91v/emxS9Jf52t9e97BQeK6dTU2CujEATody2s6h/SH+jOL4t82NgR9r9 q/SX3z1CG57iWur06+IRUZDAgOShc1ucDprr/PNfhpq4zcgOw8EC629atJvz/li7m/nA jQxw== X-Gm-Message-State: AOJu0Yy2vKaqzbxyFZUE4COncA3SxLclPbYBAbdKLx8Khmu/xGWnGbrq AgjOfHou6fYfb40GGnkY3ATsPh53ONVqup735Lt9Ih0iIzAmrNXBFstw45aS5Y1kUEZ681192my B4kRU/g== X-Gm-Gg: ASbGncslnnU26ZndNgdUAEY2XSrU9YPqWCt3OKRkrjwwuyhNtJygwkbxIHRrdEldcWE wvsseTOub16SL6yCCk6BTch5quc79g1hPKbRDfSOHG2YLYs3QjZxbTT5K+HrCUaKhCeeoBMQ+a2 QTo7bsf5IuNB1FGcc9ti2Q/cRrK2udwUdaE9qf2DAd23kMuM6SoSqP1V8AhjeKRaqPeuKJ85030 KDu1582mv57JRYn/h1QPWN7+7s7AwybEbzC3+Ui0qHgcSZcO7ASq+ppVKTiJfApgOSuLObAsQdL 4fPzfe+klN8Cp/k7YqLyfYzX9rv3qOtVReSmz9VG X-Received: by 2002:a17:903:32c5:b0:211:e812:3948 with SMTP id d9443c01a7336-22e85367010mr21293255ad.0.1746661617799; Wed, 07 May 2025 16:46:57 -0700 (PDT) Received: from pc.. ([38.41.223.211]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22e151e97absm100792435ad.62.2025.05.07.16.46.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 May 2025 16:46:57 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, anjo@rev.ng, Peter Maydell , Richard Henderson , alex.bennee@linaro.org, Paolo Bonzini , kvm@vger.kernel.org, =?utf-8?q?Philipp?= =?utf-8?q?e_Mathieu-Daud=C3=A9?= , Pierrick Bouvier Subject: [PATCH v7 47/49] target/arm/tcg/tlb-insns: compile file once (system) Date: Wed, 7 May 2025 16:42:38 -0700 Message-ID: <20250507234241.957746-48-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250507234241.957746-1-pierrick.bouvier@linaro.org> References: <20250507234241.957746-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x634.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.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 aarch64 specific code is guarded by cpu_isar_feature(aa64*), so it's safe to expose it. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/tcg/tlb-insns.c | 7 ------- target/arm/tcg/meson.build | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/target/arm/tcg/tlb-insns.c b/target/arm/tcg/tlb-insns.c index 0407ad5542d..95c26c6d463 100644 --- a/target/arm/tcg/tlb-insns.c +++ b/target/arm/tcg/tlb-insns.c @@ -35,7 +35,6 @@ static CPAccessResult access_ttlbis(CPUARMState *env, const ARMCPRegInfo *ri, return CP_ACCESS_OK; } -#ifdef TARGET_AARCH64 /* Check for traps from EL1 due to HCR_EL2.TTLB or TTLBOS. */ static CPAccessResult access_ttlbos(CPUARMState *env, const ARMCPRegInfo *ri, bool isread) @@ -46,7 +45,6 @@ static CPAccessResult access_ttlbos(CPUARMState *env, const ARMCPRegInfo *ri, } return CP_ACCESS_OK; } -#endif /* IS variants of TLB operations must affect all cores */ static void tlbiall_is_write(CPUARMState *env, const ARMCPRegInfo *ri, @@ -802,7 +800,6 @@ static const ARMCPRegInfo tlbi_el3_cp_reginfo[] = { .writefn = tlbi_aa64_vae3_write }, }; -#ifdef TARGET_AARCH64 typedef struct { uint64_t base; uint64_t length; @@ -1270,8 +1267,6 @@ static const ARMCPRegInfo tlbi_rme_reginfo[] = { .writefn = tlbi_aa64_paallos_write }, }; -#endif - void define_tlb_insn_regs(ARMCPU *cpu) { CPUARMState *env = &cpu->env; @@ -1299,7 +1294,6 @@ void define_tlb_insn_regs(ARMCPU *cpu) if (arm_feature(env, ARM_FEATURE_EL3)) { define_arm_cp_regs(cpu, tlbi_el3_cp_reginfo); } -#ifdef TARGET_AARCH64 if (cpu_isar_feature(aa64_tlbirange, cpu)) { define_arm_cp_regs(cpu, tlbirange_reginfo); } @@ -1309,5 +1303,4 @@ void define_tlb_insn_regs(ARMCPU *cpu) if (cpu_isar_feature(aa64_rme, cpu)) { define_arm_cp_regs(cpu, tlbi_rme_reginfo); } -#endif } diff --git a/target/arm/tcg/meson.build b/target/arm/tcg/meson.build index 49c8f4390a1..5d326585401 100644 --- a/target/arm/tcg/meson.build +++ b/target/arm/tcg/meson.build @@ -34,7 +34,6 @@ arm_ss.add(files( 'mve_helper.c', 'op_helper.c', 'vec_helper.c', - 'tlb-insns.c', 'arith_helper.c', 'vfp_helper.c', )) @@ -68,6 +67,7 @@ arm_common_system_ss.add(files( 'iwmmxt_helper.c', 'neon_helper.c', 'tlb_helper.c', + 'tlb-insns.c', )) arm_user_ss.add(files( 'hflags.c',