From nobody Wed Nov 27 06:48:06 2024 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=1700714671; cv=none; d=zohomail.com; s=zohoarc; b=JmZt+sir9lbi8CBzK3JyVyC0kGdpFe12ZU0ye0eQEKv0Y0Pe3n2vT/sZL8BvWBd95TvYg0a+dpQUouJ+wnz85CCbibhL24/vCzSnMd4/5s5y82XQsu/tOF3E/jLpZc8mU0p65K8P3RjsUUwoRj83A79lQu5DkCYKhsWvvMMmYt0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1700714671; h=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=j7rKkgtczML1NQeakIsfiyCwMRWbdPg9sIsXXpiAu1I=; b=Dh6vsOyVity6zGO05R/y3f0U0L/9Bz9dBY7+72NybY9//JbyoSsQBQgaIyg1fTJ/TMJcFsePlgEYW6DZEOOc3SJvKlQ2GFuZxwhBdWgSt5Yj/u92Ujep4YosVPfdtZ3cFGm1Ak2d06LFilkBbusKmBSuQNixRVn2YVm3d62tDhc= 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 1700714671081666.7165135596288; Wed, 22 Nov 2023 20:44:31 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r61Y4-0006Nx-Kp; Wed, 22 Nov 2023 23:42:46 -0500 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 1r61Xr-0006Ld-2Q for qemu-devel@nongnu.org; Wed, 22 Nov 2023 23:42:31 -0500 Received: from mail-oa1-x2b.google.com ([2001:4860:4864:20::2b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r61Xo-00065p-6c for qemu-devel@nongnu.org; Wed, 22 Nov 2023 23:42:30 -0500 Received: by mail-oa1-x2b.google.com with SMTP id 586e51a60fabf-1f937a7b8aaso326081fac.0 for ; Wed, 22 Nov 2023 20:42:27 -0800 (PST) Received: from stoup.. ([187.217.227.247]) by smtp.gmail.com with ESMTPSA id i7-20020a056808030700b003b8347de3c2sm73888oie.19.2023.11.22.20.42.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 20:42:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700714546; x=1701319346; 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=j7rKkgtczML1NQeakIsfiyCwMRWbdPg9sIsXXpiAu1I=; b=JzqWrOQuRz/RP8kncI5n7BjiX+ETLw7ampPShW0MlwkWZ2pvHiqcTjbd7oVNZQLexu UM5mIN4M6TdjXzXF4X0Uy1qYH6deAYLMhssdlM8VH930E1W8fJcHMk15AjyjIAcy0n+4 M9l6a2AM8JCG26hte7iUD1vsOIYrSY9hDRA0VR/YxpT5VgMCk01M5sezzW8k9ot8GHIl G6tOTn/WsceUXR8nVr13KxAbQG3QKsturgPAR1rbmYhJgrH02V8aZTT8jlHn/Hr2p7r8 r3suwswTb0ESk4xVzOy+kaSt/cHfgvKLfXDYLulesAkILo7YpfRYgU4GIa+j+0M49Q4B DxIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700714546; x=1701319346; 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=j7rKkgtczML1NQeakIsfiyCwMRWbdPg9sIsXXpiAu1I=; b=RyMKcZVbPeAjXCS9WzTII7dd2G3d8kR9Y6MnsQ48W/MUVhG4knCpxngocQP5x8GTdt Og6E9rX7rC2wBlbMI98XAM2uraaBimK+F6wdb1cMRwODXPqxk537L0gqZ/tA1qMfcfIp zz8Mh8XI95xAgY742tzKBm4sEmKpAbYmJNopBGIRzUvnvyzreIRSKv5aRdcUQCaPW0oK QnygTmPY53S2Lh/EFZI5Tz6EidWkZ1wrKJWJ0PvBiaHexmyTVEYPy2opTLYyqhBAPQBs yOlzq2/QYTII5ZSpmps/4QwcTQT2hbbMB7W07ikokgzD7h9TvJkkrGhriTGNQdAz7KJS bNqA== X-Gm-Message-State: AOJu0YwDwHPYgwb2ZmTlzhPaS2wyMJxE7bz0PG0HcbH2kcm1LHFvJ8sJ HcQXJfz2z/9IBCVOfKvNuI0yRa/mkZbj3h8+Wc+MRFRG X-Google-Smtp-Source: AGHT+IHg0x5GkEl7UVmPeyHHAKsLTLniSXxiAEFFx26NgIMhI+4zs3277ze/+YFNzlByWhf/oI51fg== X-Received: by 2002:a05:6870:44d2:b0:1f5:ef2a:9dee with SMTP id t18-20020a05687044d200b001f5ef2a9deemr6246529oai.37.1700714546373; Wed, 22 Nov 2023 20:42:26 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH 05/21] target/arm/kvm: Move kvm_arm_copy_hw_debug_data and unexport Date: Wed, 22 Nov 2023 22:42:03 -0600 Message-Id: <20231123044219.896776-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231123044219.896776-1-richard.henderson@linaro.org> References: <20231123044219.896776-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=2001:4860:4864:20::2b; envelope-from=richard.henderson@linaro.org; helo=mail-oa1-x2b.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: 1700714671882100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Gavin Shan Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/kvm_arm.h | 10 ---------- target/arm/kvm.c | 24 ++++++++++++++++++++++++ target/arm/kvm64.c | 17 ----------------- 3 files changed, 24 insertions(+), 27 deletions(-) diff --git a/target/arm/kvm_arm.h b/target/arm/kvm_arm.h index bb284a47de..207b7f21b0 100644 --- a/target/arm/kvm_arm.h +++ b/target/arm/kvm_arm.h @@ -462,14 +462,4 @@ bool kvm_arm_handle_debug(CPUState *cs, struct kvm_deb= ug_exit_arch *debug_exit); */ bool kvm_arm_hw_debug_active(CPUState *cs); =20 -/** - * kvm_arm_copy_hw_debug_data: - * @ptr: kvm_guest_debug_arch structure - * - * Copy the architecture specific debug registers into the - * kvm_guest_debug ioctl structure. - */ -struct kvm_guest_debug_arch; -void kvm_arm_copy_hw_debug_data(struct kvm_guest_debug_arch *ptr); - #endif diff --git a/target/arm/kvm.c b/target/arm/kvm.c index 696bc63e86..2898e680fc 100644 --- a/target/arm/kvm.c +++ b/target/arm/kvm.c @@ -1021,6 +1021,30 @@ int kvm_arch_process_async_events(CPUState *cs) return 0; } =20 +/** + * kvm_arm_copy_hw_debug_data: + * @ptr: kvm_guest_debug_arch structure + * + * Copy the architecture specific debug registers into the + * kvm_guest_debug ioctl structure. + */ +static void kvm_arm_copy_hw_debug_data(struct kvm_guest_debug_arch *ptr) +{ + int i; + memset(ptr, 0, sizeof(struct kvm_guest_debug_arch)); + + for (i =3D 0; i < max_hw_wps; i++) { + HWWatchpoint *wp =3D get_hw_wp(i); + ptr->dbg_wcr[i] =3D wp->wcr; + ptr->dbg_wvr[i] =3D wp->wvr; + } + for (i =3D 0; i < max_hw_bps; i++) { + HWBreakpoint *bp =3D get_hw_bp(i); + ptr->dbg_bcr[i] =3D bp->bcr; + ptr->dbg_bvr[i] =3D bp->bvr; + } +} + void kvm_arch_update_guest_debug(CPUState *cs, struct kvm_guest_debug *dbg) { if (kvm_sw_breakpoints_active(cs)) { diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c index 7d937e2539..ac3120adaf 100644 --- a/target/arm/kvm64.c +++ b/target/arm/kvm64.c @@ -73,23 +73,6 @@ void kvm_arch_remove_all_hw_breakpoints(void) } } =20 -void kvm_arm_copy_hw_debug_data(struct kvm_guest_debug_arch *ptr) -{ - int i; - memset(ptr, 0, sizeof(struct kvm_guest_debug_arch)); - - for (i =3D 0; i < max_hw_wps; i++) { - HWWatchpoint *wp =3D get_hw_wp(i); - ptr->dbg_wcr[i] =3D wp->wcr; - ptr->dbg_wvr[i] =3D wp->wvr; - } - for (i =3D 0; i < max_hw_bps; i++) { - HWBreakpoint *bp =3D get_hw_bp(i); - ptr->dbg_bcr[i] =3D bp->bcr; - ptr->dbg_bvr[i] =3D bp->bvr; - } -} - bool kvm_arm_hw_debug_active(CPUState *cs) { return ((cur_hw_wps > 0) || (cur_hw_bps > 0)); --=20 2.34.1