From patchwork Fri Jan 19 11:34:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 763912 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a08:0:b0:337:62d3:c6d5 with SMTP id m8csp397981wrq; Fri, 19 Jan 2024 03:38:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IGra9F2eAKH4dVYpTweD5HyQ1ohdkCtkBgYX4bZT3KFCwGYuqwTLj4Z5STWHkb70UY/2FfY X-Received: by 2002:a05:620a:2406:b0:783:8c5d:da1b with SMTP id d6-20020a05620a240600b007838c5dda1bmr414351qkn.21.1705664321404; Fri, 19 Jan 2024 03:38:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705664321; cv=none; d=google.com; s=arc-20160816; b=si80Wj8lhBAzu+xPQtQeg7Pr34dcBaut4iSpS0M2cyhkHROhpVLsVRv1NtPsX0kpv5 N/ZGrq7zy1N1O5JHZkHSnRZlKV8n5uqpc0mcOTE/VjzW3x2AN9ID32qtJ+YVfSPwhYW6 eJN7QdoPpL6dUJu4e51lLkgQugayOnjJnLRrn1uZr2INo/Gh9rcuuCkckKGsJg1murSk RTJRGkHPqnxJ9c/z5dOMTvgoqMJJ18T5Sr1fIBa/VgHH/yEpzppCaejrufF/67iU5jEf werOBzy6SoJ7WafbO7pB/KvqqqS7S1bMkPIEPHvpXM2MDvTcOAuSmiadVaD0qC8u2rKC +vGg== 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:cc:to :from:dkim-signature; bh=1kHSnHH1cspbXUMLrjnX00ivshEejOmgJvy2gqACDDE=; fh=0x3oxSDM+3B1iq7MNcEDPiiYDxF4jnBXeQY/LXh8Yxc=; b=sW45FktVtBbkRfJV8U51dV1VnsRAXD8/oVwhS4iRzN0pqeEy1h4+Gso19aEWqQU0I6 6deFsLAq0U/occ1f/a8q/V9ePJBmWyuuW2rjORz00AInnijNkecsUo7zYw89hwA9rTDQ qChxMpAeUHFykpfjGvdMVmfcNLDo2lEo7w50EwPSEK2ntAPjBewL2cXRHmCbhXyOgaHm WN3NoOm+1zQGNbJANrNzp3zsp1W7wCMnV8l+qurZlIM+7KH+wQBx+L9fvy6A+/f95Wcs cEgJS4H6PNbfxv1eI+o56WWc7YOUcRaLUBsLaA/sjEsJ6GYYHRCJeC58r83m75BQjmxh M6ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Pmp2M1qF; 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 g2-20020a05620a108200b007816c8b03a1si15765850qkk.744.2024.01.19.03.38.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 19 Jan 2024 03:38:41 -0800 (PST) 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=Pmp2M1qF; 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 1rQnA2-0001vp-C1; Fri, 19 Jan 2024 06:35:46 -0500 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 1rQnA1-0001te-2W for qemu-devel@nongnu.org; Fri, 19 Jan 2024 06:35:45 -0500 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 1rQn9y-0008TJ-5f for qemu-devel@nongnu.org; Fri, 19 Jan 2024 06:35:44 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-40e779f0273so7103175e9.2 for ; Fri, 19 Jan 2024 03:35:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705664140; x=1706268940; 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=1kHSnHH1cspbXUMLrjnX00ivshEejOmgJvy2gqACDDE=; b=Pmp2M1qFgKdzOe+yvdLB+GLMLhJAEBXba31E0fg38K7BDaV7/XKG2Gb5/tIWAxD3ok Mje+5NNxEoTEs+bDhNUbm6f8/cW88JgYAIc3H8rz/WWFurqdqO91tVgNC1RI8V6LT5rC am+E28XQ4lKzciIwl4eFZStciQsncCpRMWkajWsfygrtB5RvffQEyJcrUTf9catzjPPJ A+AxmNdhgzlJTQU7L8Kr9V6jNoULC88EM4KDrfu/Xr2OnFn7GcsU8+S4Lj1ZLp5lP2oR KhRqyykkKVQPtSvXEE7KIcNnq5bfpEO5NmYAq3BRpYtbwdGQUskqnUxEHwCEB8twWfNe g1Vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705664140; x=1706268940; 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=1kHSnHH1cspbXUMLrjnX00ivshEejOmgJvy2gqACDDE=; b=q4XGYEoi+FB1MrOloYDK7/f3w+mVLpOKZfzvKDdGDbijXW+9GJs3ZZXIvmCHQFGbnY 0eSOHWb8OLgy2fk/JsOTrghSTiiKwt6DzyqRui0NVrBBGOcis+D4x5DM+FRH7qidPOYS oiP3x0Ad3mBeIKKbPE3lDRMZ1pBbSx/8PrBTMgD9CYTLA2loZQvVDJzSrh1s3xmNqaHE kwJTTR44fIDJDrbgWNFAYk0cRm7p/e81dJ3e+ekGvmWRal57d3qz+4mlH4uKgBOhvglI 92fHuFPH/Ny2oKX4yn0qEo5e6Mz3A+4MMcxvCwDcjm2cLBaEd7moYYCNB3C3AEkBR7Ap STzA== X-Gm-Message-State: AOJu0YzM3Sb4he6bHY1gzlpkUAG1g4S2LiW4ADARw7MxKMfRHj5VQoPo DxD4NNMWs5rvLzTT8oLI2YrPy/vn3Ad6RJe67p1UrQKVTC+m9Bw7q6Zzgnz/E3cTe0WIjGANuem udzSk5g== X-Received: by 2002:a05:600c:5697:b0:40e:9d7f:d00f with SMTP id jt23-20020a05600c569700b0040e9d7fd00fmr501059wmb.122.1705664140557; Fri, 19 Jan 2024 03:35:40 -0800 (PST) Received: from localhost.localdomain (91-163-26-170.subs.proxad.net. [91.163.26.170]) by smtp.gmail.com with ESMTPSA id r7-20020a05600c35c700b0040d1bd0e716sm28955617wmq.9.2024.01.19.03.35.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 19 Jan 2024 03:35:40 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Paolo Bonzini Subject: [PULL 07/36] accel/tcg: Remove unused tb_invalidate_phys_addr() Date: Fri, 19 Jan 2024 12:34:36 +0100 Message-ID: <20240119113507.31951-8-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240119113507.31951-1-philmd@linaro.org> References: <20240119113507.31951-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@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, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Commit e3f7c801f1 introduced the TCGCPUOps::debug_check_breakpoint() handler, and commit 10c37828b2 "moved breakpoint recognition outside of translation", so "we no longer need to flush any TBs when changing BPs". The last target using tb_invalidate_phys_addr() was converted to the debug_check_breakpoint(), so this function is now unused. Remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20231130203241.31099-1-philmd@linaro.org> --- include/exec/exec-all.h | 5 ----- cpu-target.c | 29 ----------------------------- 2 files changed, 34 deletions(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index ee90ef122b..df3d93a2e2 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -518,11 +518,6 @@ static inline void tb_set_page_addr1(TranslationBlock *tb, uint32_t curr_cflags(CPUState *cpu); /* TranslationBlock invalidate API */ -#if defined(CONFIG_USER_ONLY) -void tb_invalidate_phys_addr(hwaddr addr); -#else -void tb_invalidate_phys_addr(AddressSpace *as, hwaddr addr, MemTxAttrs attrs); -#endif void tb_phys_invalidate(TranslationBlock *tb, tb_page_addr_t page_addr); void tb_invalidate_phys_range(tb_page_addr_t start, tb_page_addr_t last); void tb_set_jmp_target(TranslationBlock *tb, int n, uintptr_t addr); diff --git a/cpu-target.c b/cpu-target.c index 5eecd7ea2d..d51adfd7e3 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -314,35 +314,6 @@ void list_cpus(void) cpu_list(); } -#if defined(CONFIG_USER_ONLY) -void tb_invalidate_phys_addr(hwaddr addr) -{ - mmap_lock(); - tb_invalidate_phys_page(addr); - mmap_unlock(); -} -#else -void tb_invalidate_phys_addr(AddressSpace *as, hwaddr addr, MemTxAttrs attrs) -{ - ram_addr_t ram_addr; - MemoryRegion *mr; - hwaddr l = 1; - - if (!tcg_enabled()) { - return; - } - - RCU_READ_LOCK_GUARD(); - mr = address_space_translate(as, addr, &addr, &l, false, attrs); - if (!(memory_region_is_ram(mr) - || memory_region_is_romd(mr))) { - return; - } - ram_addr = memory_region_get_ram_addr(mr) + addr; - tb_invalidate_phys_page(ram_addr); -} -#endif - /* enable or disable single step mode. EXCP_DEBUG is returned by the CPU loop after each instruction */ void cpu_single_step(CPUState *cpu, int enabled)