From nobody Sat Nov 15 15:29:49 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1751381307; cv=none; d=zohomail.com; s=zohoarc; b=ljYroEuMwpP9UE4P6qdJCWSkzRBhngk6Ox4yEzccO5yvXM60tHTFWEzGAujsxVqGmaTVd7LY295bvZksFfUG35GK2PRAdj+I42QyTuR2HpRBSu8nHH/XJS34JPZ3PF4xIW4Bb1buPvpA0cPgnbVouAYEdoYpaV4BToOCdmJCReM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1751381307; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=KZVwfUaPu+BzW1eaAwnv15woF4igMTOdkeJWF9UPUpQ=; b=KasAjR5x8/RoC3zXpxn9fvjqX3L07aOndEj0IDqcoMN2RpdAvf1va5i5H3P78hWeic30t0upASpAfHdFhDaAQwZ8ouwDLo9PUSWmfRfqseIamg4Kyj1kZiBj4ly1hCS7FxtM8nkCkMKE8L5gZcDHJmwM+gUjjGVTNYYamw2CpSc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1751381306854522.8227656260159; Tue, 1 Jul 2025 07:48:26 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uWcCy-0002RD-Ln; Tue, 01 Jul 2025 10:43:41 -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 1uWcCY-0001kt-Eg for qemu-devel@nongnu.org; Tue, 01 Jul 2025 10:43:16 -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 1uWcCR-00073O-1T for qemu-devel@nongnu.org; Tue, 01 Jul 2025 10:43:14 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-3a54700a46eso3061104f8f.1 for ; Tue, 01 Jul 2025 07:43:03 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a892e52c2esm13637518f8f.53.2025.07.01.07.43.00 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 01 Jul 2025 07:43:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1751380982; x=1751985782; darn=nongnu.org; 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=KZVwfUaPu+BzW1eaAwnv15woF4igMTOdkeJWF9UPUpQ=; b=sj5tnHS+yyF4VrRbkEk68E7wW3RymwEo1WhS207Afoi+J86jhwCnvCQUIcV4o6Q06h YZb9Cbgm6SuY/QA/7oyMfD7CkBgaHv9Q+07ok2haIV+Pd/JzsLWaJdlzfwy6fzMBQ3OV UxPyztzghnChiNemeqdSFfHqhodwrEMHxxz3iBy2w9CyB4ASUOu3shYSXQ6mN485OXdU ZhK5JbTCqUcGafe/kEQWkcpkn2gNJrmUWF9OT5qO9l2m2cYYTZomK1xjJm22rSu57BQP MHtGkOXx75nwZ3vUVvn+o1UlFK1NpBXDxx+gBINGLeJqDtwJcF20H8+Zb2yjR/pzIJPy jBoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751380982; x=1751985782; 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=KZVwfUaPu+BzW1eaAwnv15woF4igMTOdkeJWF9UPUpQ=; b=Pu/IGxlf3UNwv+9KwUc9xYIvpgitQ9WSmQUMH1T7XSCpEAFmhY5l79lRfHXwHmbdyK JO6Fm4Nt0CnEadl1DWfieYxQ5XAiPxB0DVdUwhlyh7g+syo31lWRj4rz2CHE6KIe8MSc YGWhyX6AwxUh914SWEeae36paPMVef+QUzKWyWjdDJJ+HncIA+qumBVbUHSs8vXzyVyT cdt87Jmse2uiCemk3WvfrqI8Yszfakdom74h9EqTrCKtUe/WtEfByB3IigLg4xSAUsGr iGVDYfat2ef/H7u731p55olfdP6S4kDIRSNabagAOhnugzrqO6qxuJPAoEcrKmmXhHtZ MD1A== X-Gm-Message-State: AOJu0YwhcQSLxH/CvgI/PjRaxT78qx05y/DoF2IrkbNQ3CuJy9mfLp0o qY4X+foKWmDQ4hCcKg+GNOErpu4dfDG3IZ/RTI3lfCaZVdnKBc2vCoFazBCMtAUCkfk6R7HWQFF PJQCv X-Gm-Gg: ASbGncuThPesSbdpKsuiEa133c6ao/CJ2Ais/A6z2bWOLIZICE/q6+08PzYLmT5eGRh NVWhqtl54WLJDb48/ocA/wkjbn9LnfWPACQHCLpMwjUsW7DK0IWwOtyNCNfDo8zZzmk+Z4YiDy7 P9Jv138CJ7p3waWifPzoeGGbKSajGMw7dRZzeoUGP7vH4SSqMRctQA9xuF3Cx1vuAhmPkgqVPuy PfSLb7qgo5TYGuG8KBiV6x/yBJEFJZzqaCKu/5bu4RJWochaer6R4igACeMcjueFxpG5DiBB1Z7 iCPLAFCgL5e7fWvbCRxcVXhK7PrUdgeRMLc4ns9XC7LosBIAP2BSscxFgBmkR4TBpaXlJ25QP8w ZtvaKG1suK7ZsUn1S+q3zcIXbvWBFmGtmJ2i2 X-Google-Smtp-Source: AGHT+IFgQw0afPbX8ExizgihQzU0li8a6NF/2DsckfF/vBjg0FRNBFO1B5K6Mcgi31L53K79mmcJlg== X-Received: by 2002:a05:6000:41fa:b0:3a4:fc52:f5d4 with SMTP id ffacd0b85a97d-3a90b6dfbb5mr16443651f8f.47.1751380981636; Tue, 01 Jul 2025 07:43:01 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pierrick Bouvier , Julian Armistead , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v3 30/68] accel/hvf: Move per-cpu method declarations to hvf-accel-ops.c Date: Tue, 1 Jul 2025 16:39:38 +0200 Message-ID: <20250701144017.43487-31-philmd@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250701144017.43487-1-philmd@linaro.org> References: <20250701144017.43487-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=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_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1751381313723116600 hvf-all.c aims to contain the generic accel methods (TYPE_ACCEL), while hvf-accel-ops.c the per-vcpu methods (TYPE_ACCEL_OPS). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- accel/hvf/hvf-accel-ops.c | 29 +++++++++++++++++++++++++++++ accel/hvf/hvf-all.c | 29 ----------------------------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/accel/hvf/hvf-accel-ops.c b/accel/hvf/hvf-accel-ops.c index 8876a026120..8242a78c0c0 100644 --- a/accel/hvf/hvf-accel-ops.c +++ b/accel/hvf/hvf-accel-ops.c @@ -50,6 +50,7 @@ #include "qemu/osdep.h" #include "qemu/error-report.h" #include "qemu/main-loop.h" +#include "qemu/queue.h" #include "system/address-spaces.h" #include "gdbstub/enums.h" #include "hw/boards.h" @@ -486,6 +487,34 @@ static void hvf_start_vcpu_thread(CPUState *cpu) cpu, QEMU_THREAD_JOINABLE); } =20 +struct hvf_sw_breakpoint *hvf_find_sw_breakpoint(CPUState *cpu, vaddr pc) +{ + struct hvf_sw_breakpoint *bp; + + QTAILQ_FOREACH(bp, &hvf_state->hvf_sw_breakpoints, entry) { + if (bp->pc =3D=3D pc) { + return bp; + } + } + return NULL; +} + +int hvf_sw_breakpoints_active(CPUState *cpu) +{ + return !QTAILQ_EMPTY(&hvf_state->hvf_sw_breakpoints); +} + +static void do_hvf_update_guest_debug(CPUState *cpu, run_on_cpu_data arg) +{ + hvf_arch_update_guest_debug(cpu); +} + +int hvf_update_guest_debug(CPUState *cpu) +{ + run_on_cpu(cpu, do_hvf_update_guest_debug, RUN_ON_CPU_NULL); + return 0; +} + static int hvf_insert_breakpoint(CPUState *cpu, int type, vaddr addr, vadd= r len) { struct hvf_sw_breakpoint *bp; diff --git a/accel/hvf/hvf-all.c b/accel/hvf/hvf-all.c index 8c387fda24d..481d7dece57 100644 --- a/accel/hvf/hvf-all.c +++ b/accel/hvf/hvf-all.c @@ -12,7 +12,6 @@ #include "qemu/error-report.h" #include "system/hvf.h" #include "system/hvf_int.h" -#include "hw/core/cpu.h" =20 const char *hvf_return_string(hv_return_t ret) { @@ -41,31 +40,3 @@ void assert_hvf_ok_impl(hv_return_t ret, const char *fil= e, unsigned int line, =20 abort(); } - -struct hvf_sw_breakpoint *hvf_find_sw_breakpoint(CPUState *cpu, vaddr pc) -{ - struct hvf_sw_breakpoint *bp; - - QTAILQ_FOREACH(bp, &hvf_state->hvf_sw_breakpoints, entry) { - if (bp->pc =3D=3D pc) { - return bp; - } - } - return NULL; -} - -int hvf_sw_breakpoints_active(CPUState *cpu) -{ - return !QTAILQ_EMPTY(&hvf_state->hvf_sw_breakpoints); -} - -static void do_hvf_update_guest_debug(CPUState *cpu, run_on_cpu_data arg) -{ - hvf_arch_update_guest_debug(cpu); -} - -int hvf_update_guest_debug(CPUState *cpu) -{ - run_on_cpu(cpu, do_hvf_update_guest_debug, RUN_ON_CPU_NULL); - return 0; -} --=20 2.49.0