From patchwork Tue Dec 19 19:12:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 755954 Delivered-To: patch@linaro.org Received: by 2002:adf:b181:0:b0:336:6142:bf13 with SMTP id q1csp1601517wra; Tue, 19 Dec 2023 11:16:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IGkMjKsG2hhz5jkEkOgRhphd4rLi7Ip6i0Y8bfX1hj0HzPHkuiQSbYVce8xuSs0iKnoH5TE X-Received: by 2002:ac8:7d4a:0:b0:41c:c3ad:922d with SMTP id h10-20020ac87d4a000000b0041cc3ad922dmr26910047qtb.52.1703013413763; Tue, 19 Dec 2023 11:16:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703013413; cv=none; d=google.com; s=arc-20160816; b=X2xONDLeFRpd4us9bAqUVJK5PSlTWJuSmh0o08WSJN8vt8k6IjPDRZUhFfePOQwlw8 IfnK9Q4ySsyvaIL+4u0HkSjaeC3Nh2jgjZ+AUVnEEnK6zh2Qoh0ugMaDF9PsipdYFHCB 6gKrnjypSPBczD9eZOdCleaPlRz4F4PMI3hd7VGTQkdXr63/2JVZhQXdaguRgpg0K+zL ArkcTJLcIlix39CpvHTS+iprr23FC9GCSoty0iziuMhv7pn5zd0vwGB0zLbB/GIZAFuT SBb7txn3fHI5bG9OcEtZ4oGb5axC6cKQkRP+ZtyOzfhTpYIujJQ14bHJcZPAgafendFA bsdA== 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:to:from :dkim-signature; bh=Jvn/OVUOD0Xhju1C/N/gil1Qe6DSfBId9X5CN10lS/s=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=t3MFBOsADIZXUhpzBqa7r2UAaRPLZ6KSMQdHQ9/g+1qsyWyLBnscXDzMbR9iDBQUWH wn6jwL1hHz+io0pdxAZcBu0w6pM7gCuI39PAOMVvyyyFUp4WaPP0TpycdGMzytNjB/El W2qz33/ZHAnxsG0MWVHPAViSyC8sz3/+XTEs2+k1Bc7+fOBjtn09gb4fxjQYXOrn6r3/ lWjIHBziwSf01eeaIGT4L+DTtd7CVdk0Ywbqrbd8SNtI9SMjXeg4kImYkRO7PQx45zIR RisvKAvW4j5RM4HvUHwTuM1mULh79VwKxLUZlJCXQOc1nLE021g6kxmkYOMDWTDtN3Ek 6GdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Sc/pNbIj"; 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 bl7-20020a05622a244700b004239785d19fsi29191556qtb.702.2023.12.19.11.16.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Dec 2023 11:16:53 -0800 (PST) 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="Sc/pNbIj"; 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 1rFfWm-0001kv-IM; Tue, 19 Dec 2023 14:13:16 -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 1rFfWl-0001k3-0f for qemu-devel@nongnu.org; Tue, 19 Dec 2023 14:13:15 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rFfWi-0001lO-DP for qemu-devel@nongnu.org; Tue, 19 Dec 2023 14:13:14 -0500 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-40c38de1ee4so49389915e9.0 for ; Tue, 19 Dec 2023 11:13:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703013191; x=1703617991; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Jvn/OVUOD0Xhju1C/N/gil1Qe6DSfBId9X5CN10lS/s=; b=Sc/pNbIjAshxj3GnUIibJq3AjMHU1XUw0EbN/9/UGk4MV5pzYO5uwIjLOFc+qX+D1H R+fOHWWR5RE+sef3NiHPx0mLBU9tlNF/n/5ED/G6AZOPr9q6j4I08jEw+DJ9IB9kNTrO KYLwd6AsP4fU8m9NF27ehr9x5yJUip1rhdQOfSVNDYmRHtXMD3uuW7dZskuNx4kHHlmW xiIY4ArwsUtMdEuFJRgd17XiUszMgnwQ8AGGErs/+GsfdjX7KIb9PWCmtqsa2kROWNnh kGNsDlXsyDcYHjb0fAzVswxDZ4ptIUfsO1XgnwXktY8Sz+rqU/ft1z5w/kgdohoQduk3 i+ZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703013191; x=1703617991; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Jvn/OVUOD0Xhju1C/N/gil1Qe6DSfBId9X5CN10lS/s=; b=HSrcweyrx9dWlKJmSyqLJrwFPkOdovgIHKyt5zBAZoW2n3KyOHQIaw7xFOt/8lNr2L Ld77AYmQN79gRw1uIWbDHOojTJyFAUBG6Mt0vMcLamErl9WNhv41rmWCdsJwWcJ/GpIQ IgOTpDX+g37LfF8evp6KDBMh68C/ZgZLvAFuWjduLkg9uIOf9MJyNu789fCOF/yxzgN2 MmkbiOLcvrqlQn6z0HwAmdhF6jdMcRu30we6+soXwV50vL/KNjAF1xJQKImrfBoRe+ZH F1Ajjrj3GCcqRKh0F7C7rapt80t5R79qytLJCvEvUGLaUVGvXM0Jcw/1bve41s/qkX2B ZPYg== X-Gm-Message-State: AOJu0YxLff97PXP6R5j5dm4Pj/waFnh26JuYYD97MpSsCell2Ifba0/c DGUBoAc8gXNDBvE6xRX/JSo3UtmSxaJQpxCX7DQ= X-Received: by 2002:a05:600c:4714:b0:40c:6593:6290 with SMTP id v20-20020a05600c471400b0040c65936290mr4603904wmo.19.1703013190929; Tue, 19 Dec 2023 11:13:10 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id f5-20020a5d5685000000b0033657376b62sm12007754wrv.105.2023.12.19.11.13.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 11:13:10 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 03/43] target/arm/kvm: Merge kvm_arm_init_debug into kvm_arch_init Date: Tue, 19 Dec 2023 19:12:27 +0000 Message-Id: <20231219191307.2895919-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231219191307.2895919-1-peter.maydell@linaro.org> References: <20231219191307.2895919-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x332.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, T_SCC_BODY_TEXT_LINE=-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Richard Henderson Signed-off-by: Richard Henderson Reviewed-by: Gavin Shan Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- target/arm/kvm_arm.h | 8 -------- target/arm/kvm.c | 8 +++++++- target/arm/kvm64.c | 12 ------------ 3 files changed, 7 insertions(+), 21 deletions(-) diff --git a/target/arm/kvm_arm.h b/target/arm/kvm_arm.h index 051a0da41c4..fe6d824a52c 100644 --- a/target/arm/kvm_arm.h +++ b/target/arm/kvm_arm.h @@ -18,14 +18,6 @@ #define KVM_ARM_VGIC_V2 (1 << 0) #define KVM_ARM_VGIC_V3 (1 << 1) -/** - * kvm_arm_init_debug() - initialize guest debug capabilities - * @s: KVMState - * - * Should be called only once before using guest debug capabilities. - */ -void kvm_arm_init_debug(KVMState *s); - /** * kvm_arm_vcpu_init: * @cs: CPUState diff --git a/target/arm/kvm.c b/target/arm/kvm.c index 7903e2ddde1..b4836da6b25 100644 --- a/target/arm/kvm.c +++ b/target/arm/kvm.c @@ -308,7 +308,13 @@ int kvm_arch_init(MachineState *ms, KVMState *s) } } - kvm_arm_init_debug(s); + max_hw_wps = kvm_check_extension(s, KVM_CAP_GUEST_DEBUG_HW_WPS); + hw_watchpoints = g_array_sized_new(true, true, + sizeof(HWWatchpoint), max_hw_wps); + + max_hw_bps = kvm_check_extension(s, KVM_CAP_GUEST_DEBUG_HW_BPS); + hw_breakpoints = g_array_sized_new(true, true, + sizeof(HWBreakpoint), max_hw_bps); return ret; } diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c index b8bb25a1eaa..40f459b7862 100644 --- a/target/arm/kvm64.c +++ b/target/arm/kvm64.c @@ -33,18 +33,6 @@ #include "hw/acpi/ghes.h" -void kvm_arm_init_debug(KVMState *s) -{ - max_hw_wps = kvm_check_extension(s, KVM_CAP_GUEST_DEBUG_HW_WPS); - hw_watchpoints = g_array_sized_new(true, true, - sizeof(HWWatchpoint), max_hw_wps); - - max_hw_bps = kvm_check_extension(s, KVM_CAP_GUEST_DEBUG_HW_BPS); - hw_breakpoints = g_array_sized_new(true, true, - sizeof(HWBreakpoint), max_hw_bps); - return; -} - int kvm_arch_insert_hw_breakpoint(vaddr addr, vaddr len, int type) { switch (type) {