From patchwork Wed Apr 24 17:09:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 791517 Delivered-To: patch@linaro.org Received: by 2002:a5d:4884:0:b0:346:15ad:a2a with SMTP id g4csp947448wrq; Wed, 24 Apr 2024 10:10:07 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCURSLEGBv27h7F7j4+rbEwjZup18KOoULxeLsW4k1V1wHyWU21087yeDI1vucKEp77OpyZdJAkd+DDBBtFSxD3v X-Google-Smtp-Source: AGHT+IFjZ/rEWwgJM/CdIkVUN4uuDljyo25cv6LnsCzLQI0EaOW5GGfqp8qL5ZzYVUUDC+QYl7O8 X-Received: by 2002:a05:6358:848c:b0:183:861a:a6ff with SMTP id e12-20020a056358848c00b00183861aa6ffmr2875287rwk.1.1713978606843; Wed, 24 Apr 2024 10:10:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713978606; cv=none; d=google.com; s=arc-20160816; b=a0uRMkzK4vqJ2ZrbI50FeRNjdFdKPLyM8bPhqGQ2tzH8MH4s17uFcrlwB8XQoAqEIa cttOzHgP6V4Qn/tHB6JucGgkxUkl7zqmD8Kn/bxz09uNfICGWZc9ZbaXVpINRBpDDwIK fI2kwDWH5EV4H+fTEEkC/jLEOVsfhqzh53A8v0KPPkDPOAwVJQYZkXpxtmx4HfYzLRpA NrhFG6P7EHAnu9wRoz1oW5TWz+4oKbD54io5k7NG+n1wIjZ4kg/T3QQCGeDHWIc/qMip u2AivJo5uYu0WYHVXHgKBDnJQ37LSXa3Yu80MIUD8V2CJNC1Il5zVqiv6qFo4EqdhnvO GaDg== 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:to:from :dkim-signature; bh=qLklIJJZiY2n6UNAfojZ7eG/b6Y2VQ38WZLeXE8ZXgQ=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=xRvpJ+IML4z5XbdxRXN23acztd95zDCegppNTOJx1FU5x0XQ49yEmD8pmHQmIZq0TE N0+8j4Nk02B6geNRh0QGtEomZrez8tyKiyAFEpClWDZd1qgDey/8wyNpD+J8iqr2uUsJ Gfg0U847lliPZDbuzpaKjjDCwvs1CzNjPT/ju1zIewxisF4hoK/vpSPkpwJ+3wlmlNGf lVRDCnmQtDriCLOrFJRU1mo1TyVh4BWNEOTtFOcB2ouz1Gpsrx6NfKGiXPbjp6beRR6z INEW/Q1G8BLKtDMtSaoZPgLj4tc9KWX1J2gmZHqdc0exh/8WXoxgbclFHeB4zuOQyjP5 q2dg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mExn48Vi; 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 n9-20020ab07bc9000000b007ed8bf78271si1370983uav.167.2024.04.24.10.10.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Apr 2024 10:10:06 -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=mExn48Vi; 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 1rzg7b-00020h-2S; Wed, 24 Apr 2024 13:09:28 -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 1rzg7W-000200-Vs for qemu-devel@nongnu.org; Wed, 24 Apr 2024 13:09:24 -0400 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rzg7V-0005Ng-Ec for qemu-devel@nongnu.org; Wed, 24 Apr 2024 13:09:22 -0400 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1e9ffd3f96eso209325ad.3 for ; Wed, 24 Apr 2024 10:09:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713978560; x=1714583360; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=qLklIJJZiY2n6UNAfojZ7eG/b6Y2VQ38WZLeXE8ZXgQ=; b=mExn48ViZ2PFjYG72WwmF0aC58p3mflSOWx9tejM4jSo3gkIk2WxIrotkRquP55dnR OOa68TV0o5DL6Dvti3s5NC41da8Nk8aVSpIQ0Ds2k/Gs26PDedRSlYrJcXb+GYuFVQxp MoXwpyDwDXtAIVLV82TvkyACPYtfoFSettxPNzvjxbjFeLxzF/UKjKaSwEi/dyyVg9fh ylHLkOqQsEAu9Yc3FNkJgD4anMspQmfOYHHPYtS9VrqRxM0Kgh6qtFVuR7eo5d6+PDGi HML2v53IEP9IABxJS7w0gGnSSqJL60LB1/cVESz2/aJLjfZ5LRR3ZtqprCY9SIar3pRx FRJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713978560; x=1714583360; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qLklIJJZiY2n6UNAfojZ7eG/b6Y2VQ38WZLeXE8ZXgQ=; b=mVTlSKLaAyGFPGQkzB0LvTt96UHFlivYfGWWG8nT7pl4Y/qNeUduSvo2ZGC5KIsiDW OEZqFIcSiA5tNfuYSLw3+kpUsvdO7YZVVP/1WUhsvj9D59K/33pQxOoBL0CcrPO8J3Y8 J2eJWWbc5kYy7iuWUU5nVC9E6TLChpFuL7OsbA/gA+jr7NMBLdDy9NTXymS8aDcV41QO vliFU1YGFSPzBj5wAmX5aMbRi+5Gx8U0h0lWu0tFw8dpIUel7MeXMc1LxGSLUxmxV9qX P7axYRF1kRRdO5dobjzjM/sU6awhVorPnRrhRzqiRSgPMRxU9OGFLV1iJM32pmpfKaTX cXEA== X-Gm-Message-State: AOJu0Yw9eogKry3r1CfyXCaq/RM74FpmnFVciQXBjGJI8Rs4pg7mx98m ic+ZYAxkUWtXmOW/waKzb0MD1Soy2vf1Uh6MXJHL7SZZ+Yusr8JSIUJCfIMhuKOa4klgWO8CLLL L X-Received: by 2002:a17:902:d2ce:b0:1e1:1791:3681 with SMTP id n14-20020a170902d2ce00b001e117913681mr4084590plc.61.1713978560055; Wed, 24 Apr 2024 10:09:20 -0700 (PDT) Received: from stoup.. ([156.19.246.23]) by smtp.gmail.com with ESMTPSA id u8-20020a170902e80800b001e0b5d49fc7sm12215489plg.161.2024.04.24.10.09.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 10:09:19 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 5/5] accel/tcg: Introduce CF_BP_PAGE Date: Wed, 24 Apr 2024 10:09:08 -0700 Message-Id: <20240424170908.759043-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240424170908.759043-1-richard.henderson@linaro.org> References: <20240424170908.759043-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x634.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. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- 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 5c70748060..26bf968ff3 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -368,7 +368,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; }