From nobody Wed Feb 11 05:39:13 2026 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=1746410049; cv=none; d=zohomail.com; s=zohoarc; b=esb+i7W1G2IBSUJo33YN9zro8WNlvZQUP/BtyPPNGaPHX4pHBRin3nvFRDEbJL0jlXdH1CZUtdLD2LWM+HGPIE3ncpqfR9sq6ej+luBnsDWmwNqph+vvb1n7ujbU4DYrxh3wWA5oFvSjbONVddoaOp4j2g4uSgzfSWNr/0NXuac= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1746410049; 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=Ktcl5OZ+t3GMcQQ7Jgx3PtMsJ0l/J5yPLlaHDm/4GNI=; b=bPTQ+qny5KPoPBIY4LededyRGK4Rhx+1OsLatD5uHtJWT3cWymxFEeccHpwCJlKT6+hX/OA8IAHr3gLr5aYN5uFvddoqZavpYEwjrok/pr/60O6UIua/8LxW1X5jgKNX5zBLIzVIOx4IrKMAxLrU+wR65BTP6Ad06CMOwrKTJu4= 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 1746410049344491.7403887114672; Sun, 4 May 2025 18:54:09 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uBl0k-0003ud-F8; Sun, 04 May 2025 21:52:54 -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 1uBl0f-0003ts-Mu for qemu-devel@nongnu.org; Sun, 04 May 2025 21:52:45 -0400 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uBl0U-0002UL-1a for qemu-devel@nongnu.org; Sun, 04 May 2025 21:52:45 -0400 Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-7376dd56f8fso5228123b3a.2 for ; Sun, 04 May 2025 18:52:33 -0700 (PDT) Received: from pc.. ([38.41.223.211]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b1fb3920074sm4462101a12.11.2025.05.04.18.52.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 May 2025 18:52:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1746409952; x=1747014752; 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=Ktcl5OZ+t3GMcQQ7Jgx3PtMsJ0l/J5yPLlaHDm/4GNI=; b=fyZEcTRJJ1Wa4dQQM4bMbciDicrxUNLJknwBa5Hest/YmXhr8D/Dxp//d/B+YfSt0G G0GurcRFp/94i9etOTG7HurryObbYPq/8KPzSWhi6opImpUVvsHmm1X3mWKBtZqraio+ F9aMD/eZICNqYn1IpCgswv/zyd+phDIjbSeves+7moQHO/6UCp+nfXJh066jTiX5n5Yc MXRUMCmQQUpSB9SXDU8PQo9er6xvCazpfVn6xNY8o5jn5xrzrrlvBXJSmk4RlPhDN5sG jzEstqjEjDtALVnIqyURagm2vWXJWbWttmF4wpEhQdSyb0yYgh9aoxEbie0oYcOAMw7L 1ABg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746409952; x=1747014752; 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=Ktcl5OZ+t3GMcQQ7Jgx3PtMsJ0l/J5yPLlaHDm/4GNI=; b=WUK5+IkbYHqTewbYWzXiShCiQw+xLNPqYUjwe2297C7N23re2x2k1NNmdaMcUbWBUA S2L/JOTFz2h1DdUAE48aiZsIp0cCoYi9qCpBti6h28C03axWmjW2ehrCvN3w6uOYWwrH JGmrs8vs0ksYLPWyyeI5/IEjTD5aTc6G2pn+a/w6fLkHOOH2rY9unSHkRf6nz/j0S5ex je/Z0ngEGufp/01RbUwSBHW039FymcviPUnwVz+215sDS3HV7tH63kam3jfSAy1dEG5b swN7wpoTdbkFeAwKUL8pOGhrA5QMrPpTCdXmj1xwZIQRMnQGjv1hzd8dd25xyEnOG3i+ q1Vw== X-Gm-Message-State: AOJu0YwGMK09CgDOTxEC7TfTGiX5cFfX4GUwxk2uKlF5ejSrBzZvmyTh 6VdhWbi5aRKebXQTa046sWilyaIvrGqLfqAes1krU2hen9ncGB9GY7tT5JOBU5KpD+5ncIuzB0k v04g= X-Gm-Gg: ASbGncsHMqO9Vi8/dWRPiBRljmXq05KBGh1EsKDOwgI4OYsnF7k2c0pEeNx5uLiiT1C uH/l0PzM8kf1z95Im8LCoSMAj2ipjHHdpEYt6i6QZK7o0WNbzqQyjcATqnJaYM6u7T7D50gE8KG oTXY738PobS9zepKSLqC7kjKd3Q7Uept53ihspzYbqNYplVj3YVH+5F2n5XJU/WvCSdM/M8mk9G WtzDq755zTtP+cwpHU2m7OrE+Mf/VNkN3Cahm07ZZT9EFO0oApppwT0egiuWv+YffpvJdBnGBx2 hrUJ9EdxLnmj/msrRqccolmmb3xOQa08vYXsxpejd+ywFBG2/5Y= X-Google-Smtp-Source: AGHT+IFjAqwjw9q6AkboaE4/rlYL10/n/Iij4eqi9L1FrrgnixCKqfek0vtCsT6Ha/m7WQ/8koBzRg== X-Received: by 2002:a05:6a20:9f4a:b0:1f5:80eb:8481 with SMTP id adf61e73a8af0-20e06436606mr10495461637.13.1746409952595; Sun, 04 May 2025 18:52:32 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Paolo Bonzini , qemu-arm@nongnu.org, richard.henderson@linaro.org, alex.bennee@linaro.org, kvm@vger.kernel.org, Peter Maydell , anjo@rev.ng, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Pierrick Bouvier Subject: [PATCH v5 05/48] target/arm: move kvm stubs and remove CONFIG_KVM from kvm_arm.h Date: Sun, 4 May 2025 18:51:40 -0700 Message-ID: <20250505015223.3895275-6-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250505015223.3895275-1-pierrick.bouvier@linaro.org> References: <20250505015223.3895275-1-pierrick.bouvier@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=2607:f8b0:4864:20::431; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x431.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1746410050839116600 Content-Type: text/plain; charset="utf-8" Add a forward decl for struct kvm_vcpu_init to avoid pulling all kvm headers. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/kvm_arm.h | 83 +------------------------------------------ target/arm/kvm-stub.c | 77 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+), 82 deletions(-) diff --git a/target/arm/kvm_arm.h b/target/arm/kvm_arm.h index 05c3de8cd46..7b9c7c4a148 100644 --- a/target/arm/kvm_arm.h +++ b/target/arm/kvm_arm.h @@ -94,7 +94,7 @@ void kvm_arm_cpu_post_load(ARMCPU *cpu); */ void kvm_arm_reset_vcpu(ARMCPU *cpu); =20 -#ifdef CONFIG_KVM +struct kvm_vcpu_init; /** * kvm_arm_create_scratch_host_vcpu: * @cpus_to_try: array of QEMU_KVM_ARM_TARGET_* values (terminated with @@ -221,85 +221,4 @@ int kvm_arm_set_irq(int cpu, int irqtype, int irq, int= level); =20 void kvm_arm_enable_mte(Object *cpuobj, Error **errp); =20 -#else - -/* - * It's safe to call these functions without KVM support. - * They should either do nothing or return "not supported". - */ -static inline bool kvm_arm_aarch32_supported(void) -{ - return false; -} - -static inline bool kvm_arm_pmu_supported(void) -{ - return false; -} - -static inline bool kvm_arm_sve_supported(void) -{ - return false; -} - -static inline bool kvm_arm_mte_supported(void) -{ - return false; -} - -/* - * These functions should never actually be called without KVM support. - */ -static inline void kvm_arm_set_cpu_features_from_host(ARMCPU *cpu) -{ - g_assert_not_reached(); -} - -static inline void kvm_arm_add_vcpu_properties(ARMCPU *cpu) -{ - g_assert_not_reached(); -} - -static inline int kvm_arm_get_max_vm_ipa_size(MachineState *ms, bool *fixe= d_ipa) -{ - g_assert_not_reached(); -} - -static inline int kvm_arm_vgic_probe(void) -{ - g_assert_not_reached(); -} - -static inline void kvm_arm_pmu_set_irq(ARMCPU *cpu, int irq) -{ - g_assert_not_reached(); -} - -static inline void kvm_arm_pmu_init(ARMCPU *cpu) -{ - g_assert_not_reached(); -} - -static inline void kvm_arm_pvtime_init(ARMCPU *cpu, uint64_t ipa) -{ - g_assert_not_reached(); -} - -static inline void kvm_arm_steal_time_finalize(ARMCPU *cpu, Error **errp) -{ - g_assert_not_reached(); -} - -static inline uint32_t kvm_arm_sve_get_vls(ARMCPU *cpu) -{ - g_assert_not_reached(); -} - -static inline void kvm_arm_enable_mte(Object *cpuobj, Error **errp) -{ - g_assert_not_reached(); -} - -#endif - #endif diff --git a/target/arm/kvm-stub.c b/target/arm/kvm-stub.c index 965a486b320..2b73d0598c1 100644 --- a/target/arm/kvm-stub.c +++ b/target/arm/kvm-stub.c @@ -22,3 +22,80 @@ bool write_list_to_kvmstate(ARMCPU *cpu, int level) { g_assert_not_reached(); } + +/* + * It's safe to call these functions without KVM support. + * They should either do nothing or return "not supported". + */ +bool kvm_arm_aarch32_supported(void) +{ + return false; +} + +bool kvm_arm_pmu_supported(void) +{ + return false; +} + +bool kvm_arm_sve_supported(void) +{ + return false; +} + +bool kvm_arm_mte_supported(void) +{ + return false; +} + +/* + * These functions should never actually be called without KVM support. + */ +void kvm_arm_set_cpu_features_from_host(ARMCPU *cpu) +{ + g_assert_not_reached(); +} + +void kvm_arm_add_vcpu_properties(ARMCPU *cpu) +{ + g_assert_not_reached(); +} + +int kvm_arm_get_max_vm_ipa_size(MachineState *ms, bool *fixed_ipa) +{ + g_assert_not_reached(); +} + +int kvm_arm_vgic_probe(void) +{ + g_assert_not_reached(); +} + +void kvm_arm_pmu_set_irq(ARMCPU *cpu, int irq) +{ + g_assert_not_reached(); +} + +void kvm_arm_pmu_init(ARMCPU *cpu) +{ + g_assert_not_reached(); +} + +void kvm_arm_pvtime_init(ARMCPU *cpu, uint64_t ipa) +{ + g_assert_not_reached(); +} + +void kvm_arm_steal_time_finalize(ARMCPU *cpu, Error **errp) +{ + g_assert_not_reached(); +} + +uint32_t kvm_arm_sve_get_vls(ARMCPU *cpu) +{ + g_assert_not_reached(); +} + +void kvm_arm_enable_mte(Object *cpuobj, Error **errp) +{ + g_assert_not_reached(); +} --=20 2.47.2