From patchwork Tue May 7 14:33:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 795219 Delivered-To: patch@linaro.org Received: by 2002:a5d:525c:0:b0:34e:ceec:bfcd with SMTP id k28csp330040wrc; Tue, 7 May 2024 07:37:44 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXcG6hSOYtuxFxkDAGcKEZPcyyI4ITWwjp9qNL+XwEQ2wA5UwxUx6mXCz9ead0YmH3tOsCvfdq42vej9pnOdC7D X-Google-Smtp-Source: AGHT+IHzmirOscszbk3geA5UE2Mt79OTNIMHAXE4EQxJlItSKcx+R5/VGhx2eU15aAH3c5oLFqjc X-Received: by 2002:a05:6122:91b:b0:4c9:b8a8:78d4 with SMTP id j27-20020a056122091b00b004c9b8a878d4mr12305274vka.3.1715092663745; Tue, 07 May 2024 07:37:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1715092663; cv=none; d=google.com; s=arc-20160816; b=WFtPmg5TXWeWEf/O//nrYdcQJNB2eEGm4C6vNyWl93/YHcg75zuYBSXZzctXtRhMwI Fiu/Frod+3syAcef+n56sXN58HjL9iu5xSV+0Ub+XG06kcuHJSYW+XQ27qywmAMC9y1d 4x4HKSzOPlqL5sHrf2tTyy8/+gf3vxDy0ROlAjtfjnghiTV8izzn4KLUkkYA6LyBk7la /a9LS4XT7+Y4IYOceaMLej+Xua2C8IHQiWCviJyHeoBtJ8mdoKqtPhsWgfgbErsp4YJX 5i14Op8Wb5I3AJLDyv2yBQzjqvKtHSE0H9G98SNo3+vhfvi8nRtceB5rauAa7UNXT6Hj +Hkw== 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=v6IIOegRVX0IRNGiRvdKLFUu17MQmdNwKORAfdJtFaw=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=qxOR9OnB4XQjm7rPhpzi0PI1+6M8RxWA3YiAfNPQNAV8iLH59udi6OBuhkmYcG8vYd mrdtpwnxr7E/7dCWAKon+6U7DbHYqKHAqzeGA8JLjYuhuAPDIBYaNMVvCZbfpG7qqibv XtYsb99rpfvY8hIWzuB6Jkl1CHmmhgZq7jnC+JQv8FiHLFb0EVVRk2iEQCJ57PT/HKF4 LHa/k6WRmIhigds+ZtLPHgS96lAIEugRiniNLU5T1NpNEkZknZyyDEfueOjSviTE8Bd4 7VqIxuh/FB9ee0yXWi/ef4e8yV+5nyo0yYV8AlNtOCZlJOjYIvh7e+k0Dt2JFzJvE6va 6pZw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=w1wvSFHG; 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 o125-20020a1f7383000000b004c8cb1f79eesi2031570vkc.316.2024.05.07.07.37.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 May 2024 07:37:43 -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=w1wvSFHG; 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 1s4LtA-0003P6-1w; Tue, 07 May 2024 10:33:52 -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 1s4Lsk-0003BV-41 for qemu-devel@nongnu.org; Tue, 07 May 2024 10:33:30 -0400 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s4Lsd-0001MR-MJ for qemu-devel@nongnu.org; Tue, 07 May 2024 10:33:25 -0400 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1ee0132a6f3so19265455ad.0 for ; Tue, 07 May 2024 07:33:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715092395; x=1715697195; 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=v6IIOegRVX0IRNGiRvdKLFUu17MQmdNwKORAfdJtFaw=; b=w1wvSFHG4ykTETQyRuC0EGd/Tz5I8DFt0v3UlPgGhliV/0ECmLa44H0BBLsZ+feegb DYnr7l8MR7J1+m5r+WJ0mWlCLe5LE/ZlUMB51Ul7Bw83KqMXrPf6p4DQ7R/+XdwIR0f3 s5KfusXdMUoHhAo3lwrigHgLmwCk3Apo+/9aV2a5fUG8BGDuvIBnSUSAHl6sJpIiw6tT dthfx5PbJNRk7vjxpnns+EIc2w31KmJtbEpTApOMwFuVLrMoETAgnLyIN72MspSeTZpO 5hXejSFDpddUUZxUWK+f47Qkc5NkOmNEm/FCDqKXaNQOu1yCcTeqyXo+xU+WrZyvIAK/ gPKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715092395; x=1715697195; 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=v6IIOegRVX0IRNGiRvdKLFUu17MQmdNwKORAfdJtFaw=; b=U0RgePzhUx+RTRWBw8UWo4BrS2vhhrIzEky8yBz3N9glE2GFC5Z0OGU+kXcK2Eez1E n4DCEbqy0jIr/PdYh279hkD8G9y+3l2rQqbig/tMomzBggP/9GtsZFUoSxc7dEKriWAk TDITJg74Hl3Jf2kNzlRERSmzhrlR9vuuMOZZFslCnn3b/No1bjlOG+soQ8K/1wLsvQcH VH0PGD2DkiVEHtbLjbA0U0Hv4YLi7hrXAsVYfKVZrDziYqTQViaI6H2er4/N9jlcsTdg OgZPahND+qCS3bNzVTxcJPDgRi366j4bqf6SV0z7Npce7KMob2/1tFzPZFt7jAqwPNWc Nluw== X-Gm-Message-State: AOJu0YwMt+oebVkEPohVusZ2k4v2hxlhIDmMFvv+CtEMDyd4KvKsruXQ aI6oR14vc8heQ2+/O6WrrjZckVOD33dytpog/dF6eePRKykhbdQbT8WxdVgN9uPCfT6GgV10LPv a X-Received: by 2002:a17:903:240a:b0:1e6:40f1:93be with SMTP id e10-20020a170903240a00b001e640f193bemr15652254plo.27.1715092395403; Tue, 07 May 2024 07:33:15 -0700 (PDT) Received: from stoup.. (174-21-72-5.tukw.qwest.net. [174.21.72.5]) by smtp.gmail.com with ESMTPSA id p3-20020a170902780300b001ed2d84c1cbsm8690097pll.193.2024.05.07.07.33.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 07:33:15 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 5/9] accel/tcg: Introduce CF_BP_PAGE Date: Tue, 7 May 2024 07:33:05 -0700 Message-Id: <20240507143309.5528-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240507143309.5528-1-richard.henderson@linaro.org> References: <20240507143309.5528-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62a.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 Record the fact that we've found a breakpoint on the page in which a TranslationBlock is running. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/exec/translation-block.h | 1 + accel/tcg/cpu-exec.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/exec/translation-block.h b/include/exec/translation-block.h index 48211c890a..a6d1af6e9b 100644 --- a/include/exec/translation-block.h +++ b/include/exec/translation-block.h @@ -77,6 +77,7 @@ struct TranslationBlock { #define CF_PARALLEL 0x00008000 /* Generate code for a parallel context */ #define CF_NOIRQ 0x00010000 /* Generate an uninterruptible TB */ #define CF_PCREL 0x00020000 /* Opcodes in TB are PC-relative */ +#define CF_BP_PAGE 0x00040000 /* Breakpoint present in code page */ #define CF_CLUSTER_MASK 0xff000000 /* Top 8 bits are cluster ID */ #define CF_CLUSTER_SHIFT 24 diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 225e5fbd3e..6a764f527b 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -371,7 +371,7 @@ static bool check_for_breakpoints_slow(CPUState *cpu, vaddr pc, * breakpoints are removed. */ if (match_page) { - *cflags = (*cflags & ~CF_COUNT_MASK) | CF_NO_GOTO_TB | 1; + *cflags = (*cflags & ~CF_COUNT_MASK) | CF_NO_GOTO_TB | CF_BP_PAGE | 1; } return false; }