From patchwork Tue Mar 28 17:31:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 667870 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d08:0:0:0:0:0 with SMTP id z8csp1799439wrt; Tue, 28 Mar 2023 10:32:51 -0700 (PDT) X-Google-Smtp-Source: AKy350b67+KuS9zzIvAVWGDXzUju09S/rAVsMG6A3bJrDCahXzSyy8JhdeNrlsTBZzZ12r/I1T24 X-Received: by 2002:a05:6214:d83:b0:5b6:eef9:b8f7 with SMTP id e3-20020a0562140d8300b005b6eef9b8f7mr24217581qve.6.1680024771055; Tue, 28 Mar 2023 10:32:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680024771; cv=none; d=google.com; s=arc-20160816; b=uGisKgMDSqLRWvDkIPEXcG5GKCDlFisRRcLgTC4k+b7nX3tiAzVlFsA+6u5YotX8DW fVAj0m6siosbkutc6srWhi8HNKd9Jc0p36GtXC3qu/DElXDYvEVyOwcU0VOITXRd+j1x 25bRPJAMDZwNLrQ1A+smFkM5tL1WlZlh8siMXxSQqSRMn9SsJHCCB32sxSwSioa3XJnY Rc6sF+sZgXA5B0r1ltCc+LJPeajuXCwfOwB1ED2/6t4WllHIjsx3PsQCNkzkSA8kx5AH MWSG8cjZogf95ukwHf+GCSy0CHAbQ7kAxCYbrwz+62mBvuWe9yVbDY4P29sZ9Z+zeGil E0ng== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=uAtXz3+z83jZ4XKxVvQOajUrR6GL+K0tj/4mml7wKes=; b=0lQknUYojFshjQQSEepmLRooOcp4Xqn+jWyWfu925WWMhqf7zMHtiWAwCAabKVJqqM u1pE9kYoiLsiQyS27sJ4dcm0hipAnc+WhYbb5bJvo2z/PWEmYCgK4PTkzX9xAouOVSPk /8D+e/rTLxRmFkkX4Ob6yN4r77fTI4Dq0W/7T9l3GSGAUxBHxFWgydaAo+qPhE/vniu9 KhabojNafFJEdAYNK1dS7CFZomeQJ9XVEK8TaVcQED/809c4lpYg4KzGMECYkfP1yEqi BsJIIfWAfeXtBQxiA8zRl/5T8XINo8MwG8wGxyGBB+O0OMbxao1I+obKYxKGiQrjt9Ad kWPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PMct70HW; 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 v2-20020a05620a440200b0074699678d4asi15279905qkp.32.2023.03.28.10.32.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 28 Mar 2023 10:32:51 -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=PMct70HW; 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 1phDAP-0004bC-Ph; Tue, 28 Mar 2023 13:31:29 -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 1phDAL-0004Zk-7J for qemu-devel@nongnu.org; Tue, 28 Mar 2023 13:31:28 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1phDAI-0003Lc-Uv for qemu-devel@nongnu.org; Tue, 28 Mar 2023 13:31:24 -0400 Received: by mail-wr1-x435.google.com with SMTP id j24so13079834wrd.0 for ; Tue, 28 Mar 2023 10:31:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680024680; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=uAtXz3+z83jZ4XKxVvQOajUrR6GL+K0tj/4mml7wKes=; b=PMct70HWgBQSS8kPLkhk431pJ6oAQfReDZqw80n9NAlZF7OUqS5mrRxS0GnwL+u9Ar yDm2iJXKJF3/7z+HcT7TQsAsNczStWGo3hvm1ChBjCqp3NGIn/4RneXXD80OM5s5C+Ij KuG0UK0Kqj3vZNKjkQ0wGN8/G+itFD52lISzJEaEu/oXp80gR5r0nX5ft8YMmLaLo2LH dgnI1V0N/WmmnQCX0nroDrWTi2Uc6eaohp+eFkrm/d1sctxsfxoo0kUPqdPWuHyM+yzk 5az0v9Lq78P/+QQuLr3b1ob1Dk6TugtlfBANBoKzIEvbd2213SUWsAaIC4njYEw1OxqQ zqFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680024680; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=uAtXz3+z83jZ4XKxVvQOajUrR6GL+K0tj/4mml7wKes=; b=iSxcIPlrbarJUj75V0iGAZ/iwf47C6K6mDhuVLEAndQMIFXKxNQWpA2qPYL7HK3qiM 721QRWPyNeH1kf7a53CUB74UQgtPWG0vInSGW1fnXYHvhyQ7wExAyWAXiWUmW13FAJ/t vMjAsWHynpMeqj/3EVWeRAb2smoA/URKN8U+F1hNw4RVeWErVD/M07ph0SbnerzK4jIN mKZQp/NmoJCE0FSmLdg+kDjLH4P8h+1bQQ1zJIWEGY5+vU2Ulk18K9S9DgyB6FphxSnO d4gZqMpo6OHGNzyw8Hb5dtMs0I4gd2EwQaQjprBe5ucbzunTx+DkDHN6pvLZWigpse3l nx2g== X-Gm-Message-State: AAQBX9frhQfVN/wXl5oDnwBu9rQHubBGPYbQtval/XCNv60+0gl6ZFhx Qwuf2Pe/0jzKsUv1TxrqsxhXiaFK14HPWhg6Lt0= X-Received: by 2002:a5d:4848:0:b0:2ce:a9e9:490b with SMTP id n8-20020a5d4848000000b002cea9e9490bmr12156949wrs.31.1680024680638; Tue, 28 Mar 2023 10:31:20 -0700 (PDT) Received: from localhost.localdomain ([176.187.210.212]) by smtp.gmail.com with ESMTPSA id z8-20020adfec88000000b002c5691f13eesm28014319wrn.50.2023.03.28.10.31.18 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 Mar 2023 10:31:20 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Halil Pasic , David Gibson , Daniel Henrique Barboza , qemu-ppc@nongnu.org, Yanan Wang , David Hildenbrand , Christian Borntraeger , Eduardo Habkost , Paolo Bonzini , Marcel Apfelbaum , Greg Kurz , kvm@vger.kernel.org, Ilya Leoshkevich , Peter Maydell , Fabiano Rosas , =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , Richard Henderson , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?C?= =?utf-8?q?=C3=A9dric_Le_Goater?= Subject: [PATCH-for-8.0 v2 0/3] softmmu: Restore use of CPU watchpoint for non-TCG accelerators Date: Tue, 28 Mar 2023 19:31:14 +0200 Message-Id: <20230328173117.15226-1-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=philmd@linaro.org; helo=mail-wr1-x435.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=unavailable 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 Commit 2609ec2868 ("softmmu: Extract watchpoint API from physmem.c") restricted CPU watchpoints to TCG accelerator. This is wrong, as other accelerators such KVM do use watchpoints. Revert (partially) this commit. Since v1: - Include "hw/core/tcg-cpu-ops.h" where cpu_check_watchpoint() and cpu_watchpoint_address_matches() are called. Philippe Mathieu-Daudé (3): softmmu: Restrict cpu_check_watchpoint / address_matches to TCG accel softmmu/watchpoint: Add missing 'qemu/error-report.h' include softmmu: Restore use of CPU watchpoint for all accelerators include/hw/core/cpu.h | 39 +------------------------------ include/hw/core/tcg-cpu-ops.h | 43 +++++++++++++++++++++++++++++++++++ softmmu/watchpoint.c | 5 ++++ target/arm/tcg/mte_helper.c | 1 + target/arm/tcg/sve_helper.c | 1 + target/s390x/tcg/mem_helper.c | 1 + softmmu/meson.build | 2 +- 7 files changed, 53 insertions(+), 39 deletions(-)