From patchwork Tue Jul 13 16:41:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 474689 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp4138623jao; Tue, 13 Jul 2021 09:42:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyp3RFmR0ZG1VpkDMWdF/3wH4ncQPbfgQUNKeWrs9KvwJPBBqBXZ4j9LQLXPq66XzibvzKB X-Received: by 2002:a5d:504d:: with SMTP id h13mr6949806wrt.46.1626194555997; Tue, 13 Jul 2021 09:42:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626194555; cv=none; d=google.com; s=arc-20160816; b=XWFiFTBMpf4CsBd/47GuqyyoyqTz8Ein3hyR/7TefBOPgU0id3/mrMHC75l6m+CyyU 4NWdrOs0DGfFugD5DQeSNZ/p2EOgaNW7mUC2WgYHrlqjweI3nDkqhYTcfvc9nArmAxph sw37hj3hX3dgNi5gxpAa8Vp8e4EnLx6Y0GbbWFiA4ELeBTPKvza36RB10PIlymkTTqWm 1CuAk0UoUa5i9Np0dLLAMH41wYpNBYj7FOC9Of52wNnUcuD8pEVIoWgUcFtnwVo39/cQ y0pToaVPeyl+7H2sW43o9sbXrTWoNdW40LtrmpVTOIjle6xLLxEoi1rWI7HFKzeMkqF1 6gRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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=CpJOU5mZm1ReiYCrMc7/11RGyN8K++oSudXAQV3mu7Q=; b=ueQKzBre6NcdtZglMlxLZfxB6duvqN09MQtBrNoqtm7l4Agb5hN6F/nAy41L0X/Pfs z7m0JeZCLH+5IKwF6fsgfr6ncE+K+mJNuBRFGgZayCJoN01ld3npN24NyJkhu9WMisW7 Y/gH3S+C0y3Bnv+HuAgKoV4+rS2ygVYlHOottu1CZ2Dv13cvEbrk5wGMt2pray5Eag6s U+EiYj61EBOzoEAdXXwaPGjSTM2vY4/n7u8pzL/bMeWl5Z+BxCDWZUbE70rnogSQQaAk o5LsrmcvKoIyLOnSBs7qupiXPZ1bMz9d1PlDt8SoD6ZXw33rXcH5oBMmQ/xbxRrlVBf7 3AfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hLxrnRie; 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 d23si24066658wmd.215.2021.07.13.09.42.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Jul 2021 09:42:35 -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=hLxrnRie; 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]:52246 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3LUQ-0006rD-UH for patch@linaro.org; Tue, 13 Jul 2021 12:42:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41048) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3LU9-0006oX-DX for qemu-devel@nongnu.org; Tue, 13 Jul 2021 12:42:17 -0400 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]:38463) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m3LU7-0005c8-9J for qemu-devel@nongnu.org; Tue, 13 Jul 2021 12:42:17 -0400 Received: by mail-pl1-x633.google.com with SMTP id u3so6275313plf.5 for ; Tue, 13 Jul 2021 09:42:13 -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=CpJOU5mZm1ReiYCrMc7/11RGyN8K++oSudXAQV3mu7Q=; b=hLxrnRie01rUw0Ssrf52r0Z7c7gQHYYgLUuk6O9Z+ktdE7tbWegJHrZrGrR8OtKQCQ 8DbXiy7lkDI8Tm/drJLDQGuMxr0wTtK00ms+KrogSyvXFUTQzsrlqTTeuerZxGqWxxj9 ScYgC22MzCps09HggWbUFGTbOqHRAlGeU7fxOV9MVf79le+ZYset3k3/zEjDIQCa0llf d0T8VjAL1+kVp7hDJiGK8sKLUv8YQJFvHpe7RqLQitlpR1ZQdK1BpNitzeMSI7zK/r6W ClOoydvo2XlMFPsOD71RTeqnUTby2SOTJ9nGzCykQ3YvEdR1F11PVjAATgY7tpIZZLxg 0z7g== 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=CpJOU5mZm1ReiYCrMc7/11RGyN8K++oSudXAQV3mu7Q=; b=KThmnx8gvz0357cBs1QTcOAVefSUb1wDdJc/B7vMzQwe2/3MTKQOqFYGKIJo2Qh0Zi iLaxmIYB4Hsd/bRHVf5JivyLVcMNxv9pi49PCEIX+JUUlcFZ4iYX5C60ScUTI54rBuRz En8egvaexCs39pXeA+C5X0dwjNt4qhJqsX8XJfOvWYTSmQ466AVoshQotTEmtiGne37x pzqEdUIE+DcV3D+Avkw+TPfhs8Ci84IZLCTRfgwoVJhESftLAuk5QRNtYIxqOA+u4ECs tXGvyojsDuLeVpFoqHK9JU0sL7L5ZJVSAYI2sodWS23fmJlkq34E+57jRNi+ktQAEKwa SkjA== X-Gm-Message-State: AOAM53376Ygz5LGJerFWahQxJmpr92uJLJ60WIV78mDSu564U5+eJ7+L 3eo5W+MQfB0Kea9D3dpnu1//29pHUWbmuw== X-Received: by 2002:a17:90a:4404:: with SMTP id s4mr236811pjg.218.1626194532823; Tue, 13 Jul 2021 09:42:12 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id z13sm4947865pfn.94.2021.07.13.09.42.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jul 2021 09:42:12 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 01/14] target/i386: Tidy hw_breakpoint_remove Date: Tue, 13 Jul 2021 09:41:58 -0700 Message-Id: <20210713164211.1520109-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210713164211.1520109-1-richard.henderson@linaro.org> References: <20210713164211.1520109-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::633; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x633.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: Dmitry Voronetskiy Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Dmitry Voronetskiy Since cpu_breakpoint and cpu_watchpoint are in a union, the code should access only one of them. Signed-off-by: Dmitry Voronetskiy Message-Id: <20210613180838.21349-1-davoronetskiy@gmail.com> Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson --- target/i386/tcg/sysemu/bpt_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.25.1 diff --git a/target/i386/tcg/sysemu/bpt_helper.c b/target/i386/tcg/sysemu/bpt_helper.c index 624f90b789..4d96a48a3c 100644 --- a/target/i386/tcg/sysemu/bpt_helper.c +++ b/target/i386/tcg/sysemu/bpt_helper.c @@ -109,9 +109,9 @@ static void hw_breakpoint_remove(CPUX86State *env, int index) case DR7_TYPE_DATA_WR: case DR7_TYPE_DATA_RW: - if (env->cpu_breakpoint[index]) { + if (env->cpu_watchpoint[index]) { cpu_watchpoint_remove_by_ref(cs, env->cpu_watchpoint[index]); - env->cpu_breakpoint[index] = NULL; + env->cpu_watchpoint[index] = NULL; } break;