From patchwork Sat Mar 8 22:58:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 871604 Delivered-To: patch@linaro.org Received: by 2002:a5d:64ce:0:b0:38f:210b:807b with SMTP id f14csp345679wri; Sat, 8 Mar 2025 15:00:29 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCV3knab+dTLP7co4rm4abnVlE/swZ+gjyO7ayBSFBbKbqBiBFJmyIFT+45ao42GqsWMu/CYAQ==@linaro.org X-Google-Smtp-Source: AGHT+IFIQOY7YdVMnLDkq3NauFROqLj9wmkYh802chRw5x8TV2oYl8cuLvv9KrD/S6RvRTzvtoDk X-Received: by 2002:a05:6214:411b:b0:6e6:61f1:458a with SMTP id 6a1803df08f44-6e9005e8f70mr96687256d6.14.1741474829469; Sat, 08 Mar 2025 15:00:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1741474829; cv=none; d=google.com; s=arc-20240605; b=KFipLFCJjy3Zl5fT7JQaAGGhCND7TKNyRkrsp+oDrS1RmdnhJ77eMgt5zvs0RklDBS TZLwzEeCiVSex9aHhw63c4uyAO1Igm8vJl9FHL50Gmeyx1L8owSDuTeiJafLXC2oO7ou AXbNUk014UzHeO6kGGtAEdjBFTQXZDPlPXDLCWY4LyD1SA+hCBJ56MsI32bDi7i3ejKH lq/D7Vw+PcP1Po+8y3q7viQp8c0LIPz5FR+d0NwhLGQWhWhKWPcLBijrGUbo3QcImMXT SQ8O8/61jKmRrb/DO5Wi6OKnvLQjLtgWBL0wMKC1VLwV/Zwcz5iMrTnTWbNBxCb4fBO8 wTVQ== 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=rcajlMgTUfCgyOIfOLm4spslr595y2hmlpKS/Lu7HtA=; fh=i/pWNGcx7KiR3ewgypxpPkuORYlkCnVXLqKVm9/UgNc=; b=g2UkQK4sqXoAlMqBqugkVaJjZWZ4jwmxWTzexeIz9nQ/IgiIopEP9ioyGS2CT/oQZs KmZDYPKlbXG0gjwE7GaOd6Qxht66703YRWa16Ii7R4eHMAvMoxActgzjckqRXfrofQRY ynoWaLUJ5B98owrjZwNYUQ9jN1IyPG4ktZNdBKwb8gGKYgG/ScVZgVSusP9Qzcs8jad7 E5im12kGBqWTCUBPGFDUpfpZtJ6FzFi54nnqX3MANDi2rNsklrerZP19C1m1Q8/TwMBF W/dWNKPC7cKNHVSiXZ+o6rjxymRDxzRu5mVeUFKToOB3wRQWonvIjiT6n1tbKJUhASUY nVJQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DFIqQhLY; 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 6a1803df08f44-6e9074b7ed7si29578496d6.154.2025.03.08.15.00.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 08 Mar 2025 15:00:29 -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=DFIqQhLY; 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 1tr38Y-0004bo-OD; Sat, 08 Mar 2025 17:59:18 -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 1tr38Q-0004X6-Fi for qemu-devel@nongnu.org; Sat, 08 Mar 2025 17:59:10 -0500 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tr38O-0005Kp-GJ for qemu-devel@nongnu.org; Sat, 08 Mar 2025 17:59:09 -0500 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-2243803b776so34770505ad.0 for ; Sat, 08 Mar 2025 14:59:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741474747; x=1742079547; 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=rcajlMgTUfCgyOIfOLm4spslr595y2hmlpKS/Lu7HtA=; b=DFIqQhLYzA7RJwFFFlOH2ETr1xlkYu85UEcZfrmq0o6k/8MZvQXCcfGKn/R5mvrOnT m50htf86mzvTh5BcCC2/C1Cgu1WyjLGEWQ74kNiH1qb4PUTFel8up5xvodUvof8YpRJJ UXbgcCf3Da/qzPgQIxYuDuCm6uPpPJy7x07PJLx9HWHtiQrKxC6DFZi3iqXmyfoB+uWS N3yFiBac9ZtuaNmNCHh9x1tSyiw53pPxb6Pwzldnuy7YxqbH+ydJhXbaTBAXAp2Ss7w8 BCW9KFfiEv+MmVT6EJnbGjKhdg25og24NOB32vCFLBdCclPmMk1y2TNIrigfQIl6ofr+ 0K1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741474747; x=1742079547; 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=rcajlMgTUfCgyOIfOLm4spslr595y2hmlpKS/Lu7HtA=; b=vyDJV2KliJYf0JX4ByVmr0znFGhwFvrsX6mrNPnStBKP+jzBhGsq1JaCOzlZyjbUZd IhC5DDLVpz1gJt4y/HhceeNUF0pfv+DfVs5vWgcPzLjXuywh4mQjdXCrxG1GSQvWCN3w ZPj6DJJljgi7zJpD5m8Rg8Hqvd7oqZ7EqEfE6As843Krs0uo4kiix0n62kyb6bMR78FK Xf5tv8lxyTakwZ6vrIES1gIc/Z1SGnsuoEiihifYAe9RpL4cNeDRU5GZ672nUKv8KNYk BdOrLkFLhRHDC0nV51GWGwfl6pmWGziSFhpvHL4yb6vbKnrCUM9gLdRp1ejMwmdI4swB YQ5Q== X-Gm-Message-State: AOJu0Yw6mzmTw9mqo1xTT+UY4IATwEgrEF2NmqjnYWcdPcrt725WFi5Z WyOSJInmniiPrKiNHnFA5P58ax/Z1H/zb0KldbZs+CWqliq5O+zgRReVhntjSFaJKiT0m5h23HZ 6 X-Gm-Gg: ASbGncu2c0TrI9SAj1PmJJiFF9Fd/BIwWsI4m7tnQm4G0BXNydnT9jtYnndSOf58AKN qoyaWxiCTL0tSek7I1+0bbT37R97RN2eAHc0aKR91G4e4cstLyGRy7YHZB2o7deV9IFTwa9ENxO byytkym4CKdZBddgeh6Jkay5aRuLHDTdENhUlNg/3ltWqqUC9N0JDW5cHhcvGSEpNDUFF3b1AWX DHg3OZTRgOwWnqjdcvVwZSQLtcVWJ704l7uJNR6szqrVqwCQFEGrN7za5066lyA9dQDZMQOq7sa C1vln7Rsd3khKh/WbOz5ngIwwUo3jJquL40FjAEaGA1736aOxYy2eDG9bcRrAxsd9F1i7YFzJvC V X-Received: by 2002:a17:902:eb81:b0:224:1935:d9a3 with SMTP id d9443c01a7336-2242888ab01mr150766635ad.21.1741474747234; Sat, 08 Mar 2025 14:59:07 -0800 (PST) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22410a908a0sm51831175ad.162.2025.03.08.14.59.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Mar 2025 14:59:06 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Pierrick Bouvier Subject: [PULL 05/23] accel/tcg: Compile watchpoint.c once Date: Sat, 8 Mar 2025 14:58:44 -0800 Message-ID: <20250308225902.1208237-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250308225902.1208237-1-richard.henderson@linaro.org> References: <20250308225902.1208237-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x630.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 Move tb_check_watchpoint declaration from tb-internal.h, which is still target-specific, to internal-common.h, which isn't. Otherwise, all that is required to build watchpoint.c once is to include the new exec/cpu-interrupt.h instead of exec/exec-all.h. Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/internal-common.h | 2 ++ accel/tcg/tb-internal.h | 2 -- accel/tcg/watchpoint.c | 5 ++--- accel/tcg/meson.build | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/accel/tcg/internal-common.h b/accel/tcg/internal-common.h index 7ef620d963..9b6ab3a8cc 100644 --- a/accel/tcg/internal-common.h +++ b/accel/tcg/internal-common.h @@ -72,4 +72,6 @@ void tcg_exec_unrealizefn(CPUState *cpu); /* current cflags for hashing/comparison */ uint32_t curr_cflags(CPUState *cpu); +void tb_check_watchpoint(CPUState *cpu, uintptr_t retaddr); + #endif diff --git a/accel/tcg/tb-internal.h b/accel/tcg/tb-internal.h index abd423fcf5..62a59a5307 100644 --- a/accel/tcg/tb-internal.h +++ b/accel/tcg/tb-internal.h @@ -75,6 +75,4 @@ void tb_invalidate_phys_range_fast(ram_addr_t ram_addr, bool tb_invalidate_phys_page_unwind(tb_page_addr_t addr, uintptr_t pc); -void tb_check_watchpoint(CPUState *cpu, uintptr_t retaddr); - #endif diff --git a/accel/tcg/watchpoint.c b/accel/tcg/watchpoint.c index 40112b2b2e..ba8c9859cf 100644 --- a/accel/tcg/watchpoint.c +++ b/accel/tcg/watchpoint.c @@ -19,11 +19,10 @@ #include "qemu/osdep.h" #include "qemu/main-loop.h" -#include "qemu/error-report.h" -#include "exec/exec-all.h" +#include "exec/breakpoint.h" +#include "exec/cpu-interrupt.h" #include "exec/page-protection.h" #include "exec/translation-block.h" -#include "tb-internal.h" #include "system/tcg.h" #include "system/replay.h" #include "accel/tcg/cpu-ops.h" diff --git a/accel/tcg/meson.build b/accel/tcg/meson.build index 69f4808ac4..979ce90eb0 100644 --- a/accel/tcg/meson.build +++ b/accel/tcg/meson.build @@ -20,7 +20,6 @@ specific_ss.add_all(when: 'CONFIG_TCG', if_true: tcg_specific_ss) specific_ss.add(when: ['CONFIG_SYSTEM_ONLY', 'CONFIG_TCG'], if_true: files( 'cputlb.c', - 'watchpoint.c', 'tcg-accel-ops.c', 'tcg-accel-ops-mttcg.c', 'tcg-accel-ops-icount.c', @@ -30,4 +29,5 @@ specific_ss.add(when: ['CONFIG_SYSTEM_ONLY', 'CONFIG_TCG'], if_true: files( system_ss.add(when: ['CONFIG_TCG'], if_true: files( 'icount-common.c', 'monitor.c', + 'watchpoint.c', ))