From patchwork Tue Apr 22 19:26:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883012 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp2584709wrs; Tue, 22 Apr 2025 12:29:59 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXQuohcMaHzvHAHvIdy1m/U2WHwtls5gWiz5NKlBuHEas8AHUsI80T2DqMffz5DDMTWoyrXPA==@linaro.org X-Google-Smtp-Source: AGHT+IGRLi5PKm7coKxzkwSJ3Hef1Lj9fgQDmipJwo4qICPN2vZG9GLRrV9LwKh4cxTajS+TbbJH X-Received: by 2002:a05:6214:c2f:b0:6ea:d604:9e49 with SMTP id 6a1803df08f44-6f2c464071amr320824626d6.34.1745350199367; Tue, 22 Apr 2025 12:29:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745350199; cv=none; d=google.com; s=arc-20240605; b=C9LFl3o/NYieqMFD2zhHUKaqTnkc88hnjAVa/lhAM/1Tq8ceq4ZBr5HPvUwKDlCuWw vzQSZMe7xttosicudlbv3VuWwcHQgTNiumyG1Y7hgbP2cI7aUYcpCUkLR1WYSLLZCmb8 qcoiQ8nmIz+0TJHxCOOi13m5V8gn6201t803J6sFapzsv/p2AtfZUZKrzW9HaQRaBHCp 6LWexEEftmSi1JuScDzVA/qsn7b9oOcAtn3T91+aNX0HZoGIRTaGNiEmt1HbAWPGBR1Z W0dgWHVnIGlFxXHMhYSfTnPh78TGaxeT1ht/JCfrioxAJ3uJxud3MgHlVFGCLQIUXqbM moRA== 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=EXxySmM5H2uZxfcMpHXVVabc3DpRRBx3hmcc7DOhhC4=; fh=i/pWNGcx7KiR3ewgypxpPkuORYlkCnVXLqKVm9/UgNc=; b=f/bEKVqU2qzqUvTvnhxt8Ui15NDcayXHxN0rDZimerWyiKQtSv9ebIxRGxUoqEJ0lO QLZSzFuWWnjj+fAn3rjLnyIEahbLnKCtFwAA7chn20Q5RV4Y8ZnCU209xEAAsIUvZP1f V1Rr37dxIMswiOG8ldMVFBMBi/8+iQSaeYi400sMaUlmVAIxAt7+ItrPmnC+48qhnrTk vV2QtFXD2Ytp82btenErZdO1+aP+GqkWzhe1+hw+ANHT2b8L9+lMC9xy2T0WlwOl9EHT g1VAQkHfCPczZmPHOnJSlWOP3rW0Fmml8+nhKeB6VLUw+PGCLbm9ug3C1ltn+Esp2TDi z/fw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IYM484aP; 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-6f2c2c11c2bsi115046586d6.275.2025.04.22.12.29.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Apr 2025 12:29:59 -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=IYM484aP; 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 1u7JJ1-0002u2-55; Tue, 22 Apr 2025 15:29:19 -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 1u7JIV-0002W5-Ae for qemu-devel@nongnu.org; Tue, 22 Apr 2025 15:28:48 -0400 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7JIR-0006E4-2a for qemu-devel@nongnu.org; Tue, 22 Apr 2025 15:28:46 -0400 Received: by mail-pg1-x52b.google.com with SMTP id 41be03b00d2f7-af523f4511fso4745201a12.0 for ; Tue, 22 Apr 2025 12:28:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745350121; x=1745954921; 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=EXxySmM5H2uZxfcMpHXVVabc3DpRRBx3hmcc7DOhhC4=; b=IYM484aP3CZY4OOhegmYBKTLIPdHTw3PNnhBnGg0k7NrdYaWuxP677JOCJ0PFdr6ZI c1WBWFZZoX27TwXyCV50+26fIWUu6kRPIkeMYybYqhs7lIlSzeA+i+XjETLmi9b3APno 0ZHJmSiokYUhNA2ls5sh/YCyCwlCUHW7HGlMVZKJDGeLCo4OIbApaHmwKxyHQXSTQySX Y6kK01q1ZLloGZ0k/RKrMI6i3urJqrjcVTayog2fSWDUs2hs/7GDEOdrex0EnPHtF/j3 xg9/tpSr6LycPSANtC+MJuKTha4AOb7uWraxYfjpFxNI5DHGRYJhF89KADMxP5jOXXIJ Ec/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745350121; x=1745954921; 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=EXxySmM5H2uZxfcMpHXVVabc3DpRRBx3hmcc7DOhhC4=; b=PMZQXDTd9Yl8ZvmAHvdiZuvt3yokYeMu9RQw6JKAvSrOYGtinw1o2xcocR+KqSo9dn nS87GbySA6w7GRN+aaQ6vRUU0GFWH5rehIxqkNeuuc85iK+AzxJm8F/u1xsxJttANQQc xkBzNfSpcev94TcwmHbq49TcBmWqtdbYsbnfuM5TT/4J9FVoSNq//5NPdfckCskMRaOX I4qpB4J5q/sFFcDGSVyS+0hJ7xNqyrmD54L1M886kI2Qd3abQPUYFNTD+t3HNCjy/Y12 MlC5L9uPcKTi1gfGvAduKcqfoVgdDESb1zDSUay4ZWV7BElqumkSyqteJrkHHkuKIQj9 8mDg== X-Gm-Message-State: AOJu0YwSJJhsYz/cs8Cb2NMqB9jNSjaWDYXcO8g7w0nzvajKmJ+oOXZF fw/n7s6MKGy1uiURG8G/D+HzOtBzo1DtpXS3jUFd1PEEVQ8Z4ab0LrzwaV3WQNRnNI6IjliBove N X-Gm-Gg: ASbGncvNnRoGuFeoerElxh/fQSh7CJUMa6IW5XVLAQTEuxNoraWB8j+x8JzD1YNx+fF gJglwy8c53JFlnF15tr2uYf6IcWKTQwS3lSiEGQW3bKZQlGXySNNq5KvvUla4MB0Vx/k3wSduph 5KW5fh5/qaJZflkwJ9xeTn4+urL0vjaUCRsgQgYI0kxdBEZ/hHSyj2BfpiDOLQ+bv1J20TpUHr2 G71Va/hK49UlBdZADJULp9Y4eXXAQNDaP8k1+DqHnMKC31cnY8NzqAM8eWDuEwKZPu5AzsIaXGF 7iHLSXlCfkzLxma/CchSXhvjhxmYS9jnVrIQWeGgfpA2K2AmB0aHFEyENA1oLVbPv0l/YtJhdlt KD2uHpygy7A== X-Received: by 2002:a17:90b:2d0d:b0:2ee:8427:4b02 with SMTP id 98e67ed59e1d1-3087bbbddc7mr23918181a91.28.1745350121583; Tue, 22 Apr 2025 12:28:41 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3087df21278sm9146865a91.29.2025.04.22.12.28.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Apr 2025 12:28:41 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Pierrick Bouvier Subject: [PATCH 032/147] accel/tcg: Remove mmap_lock/unlock from watchpoint.c Date: Tue, 22 Apr 2025 12:26:21 -0700 Message-ID: <20250422192819.302784-33-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250422192819.302784-1-richard.henderson@linaro.org> References: <20250422192819.302784-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52b; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52b.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 The mmap_lock is user-only, whereas watchpoint.c is only compiled for system mode. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/watchpoint.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/accel/tcg/watchpoint.c b/accel/tcg/watchpoint.c index 65b21884ce..cfb37a49e7 100644 --- a/accel/tcg/watchpoint.c +++ b/accel/tcg/watchpoint.c @@ -124,17 +124,14 @@ void cpu_check_watchpoint(CPUState *cpu, vaddr addr, vaddr len, } cpu->watchpoint_hit = wp; - mmap_lock(); /* This call also restores vCPU state */ tb_check_watchpoint(cpu, ra); if (wp->flags & BP_STOP_BEFORE_ACCESS) { cpu->exception_index = EXCP_DEBUG; - mmap_unlock(); cpu_loop_exit(cpu); } else { /* Force execution of one insn next time. */ cpu->cflags_next_tb = 1 | CF_NOIRQ | curr_cflags(cpu); - mmap_unlock(); cpu_loop_exit_noexc(cpu); } } else {