From patchwork Wed Aug 23 20:22:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 716114 Delivered-To: patch@linaro.org Received: by 2002:adf:f747:0:b0:317:ecd7:513f with SMTP id z7csp1002688wrp; Wed, 23 Aug 2023 13:27:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFlHywei+pxTSkJXz3ICZrmG0hEx72GioydW5rFlzTHg4kyw9LhEGoZnHyvmuzbOvjM2hKe X-Received: by 2002:a05:620a:2698:b0:76c:e566:2dab with SMTP id c24-20020a05620a269800b0076ce5662dabmr15412606qkp.33.1692822421120; Wed, 23 Aug 2023 13:27:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692822421; cv=none; d=google.com; s=arc-20160816; b=vn7dCv/xasyD1ePtY3VuoclcIB5vxADMgAp294lxyMslpi+fjxDfXEctsPrvofXjcm LZDA+EqNHXusvIpfYTCs0e2rlQOOvj4lcRq0w0YRzgiUv7nd7Iur8IY9GHMbbitXdM+I JUo6Qcp6SmtIv9Th4D19FG3Eat+2/ewCQgyPSYuBZopiY1P+7dATr8eX5B2ZcPd80q6r RBw/o5Itsd118sLVbEeR+UXTv1+oQWOnzYdPPG16dC/7mcvl5xxVISk2vwEWy87JxS6b aE6hNr2ADYGbdoqeYS5fcZHxDVJgwNvxMHLreDQC62skaa7KYV6Z9+4q0k44GiBB/S5I cD7Q== 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=7loHC2CVphFZ2VQ7U0c6/4a/FgpsUAqIthrt73VkroA=; fh=i53HmQH8ogkFLEAGHKavbm8W6+9/FINwiyX11eWiycE=; b=tw+3Z+o6cBBaV5n+zf8gskshi/IqH4sMzT4uSijwoQP2XSxGySW5vzX6nftSIO1snn nR7xGQteAUQA5XIR5yXOmZIyHnQLLss+wJgQVtpbqXC6Ocdr5VTj3daxXmgKmjRXemLG SPz/CfIKtKlEztKVMVbaewtTzNhsnn/Wx6a7fmLoaarwvgOTUhU153U+nzvDaBT6rcN0 GLyr840bP51I2g+j68Yorpd++Sf1Nn+MLHg3nwZgQo63ir2n8ZIofarwVP7vVHw9i6Ip i6D4kKxQVSHOijxuJJ/28hPqDIheDFOrMBFzqBown7/Ux4hLSE5ed0urS6BRY8ikS48K cfxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cYZgAoji; 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 x29-20020a05620a0b5d00b00768064b6b5bsi501049qkg.755.2023.08.23.13.27.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Aug 2023 13:27:01 -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=cYZgAoji; 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 1qYuOh-0000Hs-EO; Wed, 23 Aug 2023 16:24:11 -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 1qYuOb-0008RG-8p for qemu-devel@nongnu.org; Wed, 23 Aug 2023 16:24:05 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qYuOV-0005TU-HU for qemu-devel@nongnu.org; Wed, 23 Aug 2023 16:24:03 -0400 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-1c0bae4da38so1811355ad.0 for ; Wed, 23 Aug 2023 13:23:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692822210; x=1693427010; 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=7loHC2CVphFZ2VQ7U0c6/4a/FgpsUAqIthrt73VkroA=; b=cYZgAojiow4xVWv/z2SVJh+VLAZOSqqFfQ1VjrL98S57l3b9h9VW7krFosgfwjPx0o MPF5CxUAoj6A3B6YQZga3i2UJrZE3Tahb7KkrxsEUyZDsSdwBHSt18AYFy0RHYNOY3J1 UB7A+z6tXni0BcHeWO80lX492dntN29F2Vuhg0R7EoqG2PGVyjzsOULf3YnW0LZJBIX0 Z78VadbZGz8Ugdd34ZRW/QvV/dRUBDQEs+YMFEG0kiYejfVj+dZ1drDDKGNf58KP1Hws +KZqbTXH8VKn1LmkLNd0zlOoZU37FiIKwHvSioAfoXcy2Vjeda9MpFm3jmV/CHBvTo3O arzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692822210; x=1693427010; 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=7loHC2CVphFZ2VQ7U0c6/4a/FgpsUAqIthrt73VkroA=; b=Sf7nK5C8JZLUqkKLFWMYtBioYaIXTXYYq/vXryxrtDIHFlvmlu6IFpBwRS9gLSMJBa ChMHIbt5sE4i6w32HfZRa2g9c1umY9xnzuybCFdBL/YMSBGdQ0L0+6EDJraYJ30Koyje QUkhmChzHPJl5O+ns/WJaCn+P3GIWyzw/fyoJcr3CiDicroyj0mrlQpm55tKxuy0ZC8B HjallWT6d951E9SSJFSmai2EhL9If1Y9zhRw3mNZytzW3nsfQ+5PU06fskpIlab1hnG3 bseSAZfQD/AMIRYvhPhkMaCkabZ9VOr7WklZTb7hdtuqt/SQfOZ0Ru6xLsOtvf7oiF4G 6uKA== X-Gm-Message-State: AOJu0Yz0+bbxElijuoErzazeic83MPjd48scHnfcTUjBV7K3gPURe/7G eZ+PJvyMes+DW8eangC606bAW+X2QhTlQ5cMwAI= X-Received: by 2002:a17:902:64cf:b0:1bc:17ab:8d68 with SMTP id y15-20020a17090264cf00b001bc17ab8d68mr16449996pli.16.1692822210001; Wed, 23 Aug 2023 13:23:30 -0700 (PDT) Received: from stoup.. ([2602:47:d483:7301:72f0:1ea7:85d2:141e]) by smtp.gmail.com with ESMTPSA id iz22-20020a170902ef9600b001b9da42cd7dsm11418641plb.279.2023.08.23.13.23.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Aug 2023 13:23:29 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Anton Johansson Subject: [PULL 02/48] accel/hvf: Widen pc/saved_insn for hvf_sw_breakpoint Date: Wed, 23 Aug 2023 13:22:40 -0700 Message-Id: <20230823202326.1353645-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230823202326.1353645-1-richard.henderson@linaro.org> References: <20230823202326.1353645-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62c.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 From: Anton Johansson via Widens the pc and saved_insn fields of hvf_sw_breakpoint from target_ulong to vaddr. Other hvf_* functions accessing hvf_sw_breakpoint are also widened to match. Signed-off-by: Anton Johansson Reviewed-by: Richard Henderson Message-Id: <20230807155706.9580-3-anjo@rev.ng> Signed-off-by: Richard Henderson --- include/sysemu/hvf.h | 6 +++--- accel/hvf/hvf-accel-ops.c | 4 ++-- accel/hvf/hvf-all.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/sysemu/hvf.h b/include/sysemu/hvf.h index 70549b9158..4cbae87ced 100644 --- a/include/sysemu/hvf.h +++ b/include/sysemu/hvf.h @@ -39,14 +39,14 @@ DECLARE_INSTANCE_CHECKER(HVFState, HVF_STATE, #ifdef NEED_CPU_H struct hvf_sw_breakpoint { - target_ulong pc; - target_ulong saved_insn; + vaddr pc; + vaddr saved_insn; int use_count; QTAILQ_ENTRY(hvf_sw_breakpoint) entry; }; struct hvf_sw_breakpoint *hvf_find_sw_breakpoint(CPUState *cpu, - target_ulong pc); + vaddr pc); int hvf_sw_breakpoints_active(CPUState *cpu); int hvf_arch_insert_sw_breakpoint(CPUState *cpu, struct hvf_sw_breakpoint *bp); diff --git a/accel/hvf/hvf-accel-ops.c b/accel/hvf/hvf-accel-ops.c index a44cf1c144..3c94c79747 100644 --- a/accel/hvf/hvf-accel-ops.c +++ b/accel/hvf/hvf-accel-ops.c @@ -474,7 +474,7 @@ static void hvf_start_vcpu_thread(CPUState *cpu) cpu, QEMU_THREAD_JOINABLE); } -static int hvf_insert_breakpoint(CPUState *cpu, int type, hwaddr addr, hwaddr len) +static int hvf_insert_breakpoint(CPUState *cpu, int type, vaddr addr, vaddr len) { struct hvf_sw_breakpoint *bp; int err; @@ -512,7 +512,7 @@ static int hvf_insert_breakpoint(CPUState *cpu, int type, hwaddr addr, hwaddr le return 0; } -static int hvf_remove_breakpoint(CPUState *cpu, int type, hwaddr addr, hwaddr len) +static int hvf_remove_breakpoint(CPUState *cpu, int type, vaddr addr, vaddr len) { struct hvf_sw_breakpoint *bp; int err; diff --git a/accel/hvf/hvf-all.c b/accel/hvf/hvf-all.c index 4920787af6..db05b81be5 100644 --- a/accel/hvf/hvf-all.c +++ b/accel/hvf/hvf-all.c @@ -51,7 +51,7 @@ void assert_hvf_ok(hv_return_t ret) abort(); } -struct hvf_sw_breakpoint *hvf_find_sw_breakpoint(CPUState *cpu, target_ulong pc) +struct hvf_sw_breakpoint *hvf_find_sw_breakpoint(CPUState *cpu, vaddr pc) { struct hvf_sw_breakpoint *bp;