From patchwork Wed Oct 26 02:10:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 618800 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp118108pvb; Tue, 25 Oct 2022 19:31:36 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4peAofgES5vGiGnzIpMbdaJsynYv9b/xd82PHuoFVxs7i19nXbK4qTNOqOHSslPzpA7s8p X-Received: by 2002:a05:622a:420d:b0:38d:961c:a57c with SMTP id cp13-20020a05622a420d00b0038d961ca57cmr34624871qtb.678.1666751496634; Tue, 25 Oct 2022 19:31:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666751496; cv=none; d=google.com; s=arc-20160816; b=ZlQEnlrJkruyIS5y9BGIFyhPVfavQztrn1+OLf8XjwPRxlc9QIJsuwKw3Gcc2hb1xO 8TnVG9r0LbFV0U18Kq6eGbKb4ZsWFZ+xSGS9L73oiUtkIYsuIqO0CDL8cIRDQPqFIYg0 xn4zsKxhRMp3edWbK+U9bYuYhdQTfLrguypyRfH/wVIxV+AQGvxXBoD+rHlf92VEK3CD pv/DmqE6X2+4DUmLfR4zJ2A1+Vv5Xx2m82fRAbXdsx+iP+Lz4eFUR3BD5M8BjxRB1VKs UJovFOhPUtt9KTSccRFyQFnUHJaNjDDT1NeNibecfOizHr8ZO8eWzhN0ajkHKx+Kkkei ItNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender: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=eijG0kSDPpiRBm8vllHxEuHeocUFGDghO4DAqpTBKuY=; b=QFa96LfpWM4phQbaGSeoULjfEsIWVoic2I4mbzYMG4PPKQ7H/7+mAMPhBWc/CsGeBC +/LHQXlcKyj5BoH1v+tPx3ENJYRClO7epJ6O6qcpiPb+SwmCFBQBwbLUJNTjkljVGcz1 X7mtDeXKH8VTTu/nbounNQjSNVeEOZTbAPDDEikmT9AB3JIeU6SmYRmbYaEkQbizhx2P F/6ubifmxmYXuDRKBKfIzo7Laf2hl0heFrz+56t+PNFMKmy9Vb6NmOhasUivSFERORhO eUEtdr87SZZJIxoAj52aW3NNvJ2puQsTkHgobAScbey23hRrdEVX9Fl/r8OJ4gcEDZEJ NL3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Vn+XFUIq; 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 d19-20020a05620a241300b006ee9451de54si3025257qkn.637.2022.10.25.19.31.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Oct 2022 19:31:36 -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=Vn+XFUIq; 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 1onVty-0004xm-RT; Tue, 25 Oct 2022 22:12:18 -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 1onVtx-0004xI-8P for qemu-devel@nongnu.org; Tue, 25 Oct 2022 22:12:17 -0400 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1onVtv-0001AU-L2 for qemu-devel@nongnu.org; Tue, 25 Oct 2022 22:12:17 -0400 Received: by mail-pj1-x1033.google.com with SMTP id m2so8713816pjr.3 for ; Tue, 25 Oct 2022 19:12:15 -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:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=eijG0kSDPpiRBm8vllHxEuHeocUFGDghO4DAqpTBKuY=; b=Vn+XFUIqnxMIwC+VG0Di9Emya12isVwomC/eP9ULFaGbVe8ICDvZIFCjjm2HHyPFnk dQNVMylxuqIdxRxsKVFnjKwokkJsW4VJmZVphsQBOrE9fWwOUhYo9JFkAB2QtDvysKWt nwt89XJv6k84WHOZrMHbCpnTZ2VfxjVU2fKrWDOJpSqh3rN/tDfkoaLPH9tfoG7u3Hks qHZ19CU5LrpqrSSJehLVq/I8oCygOr6enkwfaO9IJv2lQGQyuLWmlJFc6ePBj7Q/xxlw s2tJ180TBXKyNnAzzVVyt8o4JGT3wsOQsWSpK5OH7wm+Zme6Gg5wSyZXd2VAGkkAZxBG 19Yw== 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:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eijG0kSDPpiRBm8vllHxEuHeocUFGDghO4DAqpTBKuY=; b=jLnYqCFCStLIYxZ8JMeErvkgGr3Z6epDUNcsHcLnmXRNJQe7jM7fjaj3tzn+p5qrY0 PohoTnRlR8xD3jtfjNipmSgkietqYAKPnGnStmDMESfqMP4o92V1OMWOGqYGcITfxD71 hnAv4KJk84K4MvPeMZJ4N7KZCEooQxV3YxKX86ajE0xQZVhj++WEq6WhBw02zSYJVsev Z3Rsdshru4HwqiMahE2t64mOIEqnhUoO0EAazsKx1fid1HLNUSS/PCaffjp9iSOn8rlq wKAszxbTyHq7J1wgR+cuJ8AcxNj8oorcCAafKfBcma9sDXoyG43cq/StLR4ATrYayuhk cz5w== X-Gm-Message-State: ACrzQf2UAgeZ3t5BECZf5E1TI4yZ/AsHnFlmj3tosmuJpk8lOlfJFcFb fR5c6/ckKRRTZURt/o14cjapOiJuM33kmciW X-Received: by 2002:a17:902:b20a:b0:178:6f5b:f903 with SMTP id t10-20020a170902b20a00b001786f5bf903mr42806853plr.39.1666750334896; Tue, 25 Oct 2022 19:12:14 -0700 (PDT) Received: from stoup.hotspotlogin.services ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id o29-20020a635d5d000000b0043c9da02729sm1897833pgm.6.2022.10.25.19.12.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Oct 2022 19:12:14 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PULL 18/47] accel/tcg: Unify declarations of tb_invalidate_phys_range Date: Wed, 26 Oct 2022 12:10:47 +1000 Message-Id: <20221026021116.1988449-19-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221026021116.1988449-1-richard.henderson@linaro.org> References: <20221026021116.1988449-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1033; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1033.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: , Sender: "Qemu-devel" Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org We missed this function when we introduced tb_page_addr_t. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 2 +- include/exec/ram_addr.h | 2 -- accel/tcg/tb-maint.c | 13 ++----------- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 5900f4637b..5ae484e34d 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -638,12 +638,12 @@ uint32_t curr_cflags(CPUState *cpu); /* TranslationBlock invalidate API */ #if defined(CONFIG_USER_ONLY) void tb_invalidate_phys_addr(target_ulong addr); -void tb_invalidate_phys_range(target_ulong start, target_ulong end); #else void tb_invalidate_phys_addr(AddressSpace *as, hwaddr addr, MemTxAttrs attrs); #endif void tb_flush(CPUState *cpu); 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 end); void tb_set_jmp_target(TranslationBlock *tb, int n, uintptr_t addr); /* GETPC is the true target of the return instruction that we'll execute. */ diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index f3e0c78161..1500680458 100644 --- a/include/exec/ram_addr.h +++ b/include/exec/ram_addr.h @@ -147,8 +147,6 @@ static inline void qemu_ram_block_writeback(RAMBlock *block) #define DIRTY_CLIENTS_ALL ((1 << DIRTY_MEMORY_NUM) - 1) #define DIRTY_CLIENTS_NOCODE (DIRTY_CLIENTS_ALL & ~(1 << DIRTY_MEMORY_CODE)) -void tb_invalidate_phys_range(ram_addr_t start, ram_addr_t end); - static inline bool cpu_physical_memory_get_dirty(ram_addr_t start, ram_addr_t length, unsigned client) diff --git a/accel/tcg/tb-maint.c b/accel/tcg/tb-maint.c index bac43774c0..c8e921089d 100644 --- a/accel/tcg/tb-maint.c +++ b/accel/tcg/tb-maint.c @@ -20,6 +20,7 @@ #include "qemu/osdep.h" #include "exec/cputlb.h" #include "exec/log.h" +#include "exec/exec-all.h" #include "exec/translate-all.h" #include "sysemu/tcg.h" #include "tcg/tcg.h" @@ -27,12 +28,6 @@ #include "tb-context.h" #include "internal.h" -/* FIXME: tb_invalidate_phys_range is declared in different places. */ -#ifdef CONFIG_USER_ONLY -#include "exec/exec-all.h" -#else -#include "exec/ram_addr.h" -#endif static bool tb_cmp(const void *ap, const void *bp) { @@ -599,11 +594,7 @@ void tb_invalidate_phys_page(tb_page_addr_t addr) * * Called with mmap_lock held for user-mode emulation. */ -#ifdef CONFIG_SOFTMMU -void tb_invalidate_phys_range(ram_addr_t start, ram_addr_t end) -#else -void tb_invalidate_phys_range(target_ulong start, target_ulong end) -#endif +void tb_invalidate_phys_range(tb_page_addr_t start, tb_page_addr_t end) { struct page_collection *pages; tb_page_addr_t next;