From nobody Thu Apr 3 18:11:25 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1626744361829696.8442699825218; Mon, 19 Jul 2021 18:26:01 -0700 (PDT) Received: from localhost ([::1]:53188 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m5eWG-0007cJ-Ok for importer@patchew.org; Mon, 19 Jul 2021 21:26:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32846) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5eOq-0006gx-Ml for qemu-devel@nongnu.org; Mon, 19 Jul 2021 21:18:22 -0400 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]:33437) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m5eOp-0003Tf-Ah for qemu-devel@nongnu.org; Mon, 19 Jul 2021 21:18:20 -0400 Received: by mail-pf1-x42e.google.com with SMTP id m83so18271910pfd.0 for ; Mon, 19 Jul 2021 18:18:18 -0700 (PDT) Received: from localhost.localdomain (204-210-126-223.res.spectrum.com. [204.210.126.223]) by smtp.gmail.com with ESMTPSA id e4sm25378054pgi.94.2021.07.19.18.18.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jul 2021 18:18:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1SYl6z4JM6oqxGI/nixKvmomGJ8etB/EcKsdFgvob4o=; b=Ds91u9k9HXaMQ2DDALQDns/BuOqFDcOqUkFHTY6ls7uOCsi06glnOqZVcfr+Ggu7hF slhyAntwAVHcTipKTc4LLVaZf2yZaqWZ4BRPpaKLqWgT6mIRKfPQiVouCmoJvu/wFPpI Rqkw2K5oPvJaTipSZcbrm6auscu+0eZIawabvED5QnCcYgR1hCR+jdThOKgi8wuGwBXd vnb3Lg5/uoOxNfoncqJMoRVxZWN9WjYpCNU1bCicfFSOTkKvbzV7pxJzZ0k0l0TBTGpX Vanq/M42I6b9jFFto8nvJZePpmvonWImRckPXvnI2klKY/5qIFlakFFbAJuh/7B9pB1x 5jfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1SYl6z4JM6oqxGI/nixKvmomGJ8etB/EcKsdFgvob4o=; b=C+DFIW4l/n3S0CvDCDH63fcWaGjGm2MXRm4zxdGMgAKE56JOZnmG+gIWMmoB2Jlc1D oppi5I5OeOveB4HzQtxn/u2QRDxyt6MZV5xrFqtt2VOHPJkkRyLxDwLBpU5cqsstrwKL ZCJ/h8ZiNafAgEn2NjTArldrFM0QOuCZxYlnx0xqNqqmA3Z2srvX9Ox2f1TA43oQRrIz QXyMJzXQUxlNjmbgXLcNqiy6yCdATAqjokMc5DGl8T3lwdH+jiwCu7tcpTSzbdMrUGh6 C5dOEsAjd1HcCq4wL8KhYjiVvF8vUfz5BA4atotcdHE6szbzxJ2QCYT2UV36y/X0ueqZ zHNw== X-Gm-Message-State: AOAM530cd8lqDk3pxgSbN4fSiex1QflW2rKgl2pmdcYsqZHJdo+FYNzC EGr6PFM3wsapQkRLr2ZdE2twzMpKlowOMQ== X-Google-Smtp-Source: ABdhPJx3Al/lJr2+zmcSrN8/YStaieVJTIxoDr90uQwvTcP6iGPQJu0+JW3iwVpFkJjDZxZ9JzjjjQ== X-Received: by 2002:a63:d709:: with SMTP id d9mr28350581pgg.337.1626743898080; Mon, 19 Jul 2021 18:18:18 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.1 v5 10/15] target/i386: Implement debug_check_breakpoint Date: Mon, 19 Jul 2021 15:17:55 -1000 Message-Id: <20210720011800.483966-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210720011800.483966-1-richard.henderson@linaro.org> References: <20210720011800.483966-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::42e; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42e.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, mark.cave-ayland@ilande.co.uk, alex.bennee@linaro.org, f4bug@amsat.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1626744362482100001 Content-Type: text/plain; charset="utf-8" Return false for RF set, as we do in i386_tr_breakpoint_check. Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e --- target/i386/tcg/tcg-cpu.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/target/i386/tcg/tcg-cpu.c b/target/i386/tcg/tcg-cpu.c index e96ec9bbcc..238e3a9395 100644 --- a/target/i386/tcg/tcg-cpu.c +++ b/target/i386/tcg/tcg-cpu.c @@ -54,6 +54,17 @@ static void x86_cpu_synchronize_from_tb(CPUState *cs, cpu->env.eip =3D tb->pc - tb->cs_base; } =20 +#ifndef CONFIG_USER_ONLY +static bool x86_debug_check_breakpoint(CPUState *cs) +{ + X86CPU *cpu =3D X86_CPU(cs); + CPUX86State *env =3D &cpu->env; + + /* RF disables all architectural breakpoints. */ + return !(env->eflags & RF_MASK); +} +#endif + #include "hw/core/tcg-cpu-ops.h" =20 static const struct TCGCPUOps x86_tcg_ops =3D { @@ -66,6 +77,7 @@ static const struct TCGCPUOps x86_tcg_ops =3D { .tlb_fill =3D x86_cpu_tlb_fill, #ifndef CONFIG_USER_ONLY .debug_excp_handler =3D breakpoint_handler, + .debug_check_breakpoint =3D x86_debug_check_breakpoint, #endif /* !CONFIG_USER_ONLY */ }; =20 --=20 2.25.1