From patchwork Tue May 13 17:39:11 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 889620 Delivered-To: patch@linaro.org Received: by 2002:adf:fd8a:0:b0:3a1:f579:ae88 with SMTP id d10csp2232395wrr; Tue, 13 May 2025 10:46:17 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXJbbuQAB9iFFJDh29hLIVpIWLECAqNZIZ3kJQXFeh6P42d7iYidHWQOLjrjeSghukE6qj4IQ==@linaro.org X-Google-Smtp-Source: AGHT+IEkXhThqpu3f4bDg4SrLUP92Yp53fYDQ/ZV4c74bYCMSCbkfqtgaepZZ+/nf9tvo5KvdL4b X-Received: by 2002:a05:622a:1b14:b0:494:95ad:2c07 with SMTP id d75a77b69052e-49495d1fd21mr4761851cf.40.1747158377197; Tue, 13 May 2025 10:46:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747158377; cv=none; d=google.com; s=arc-20240605; b=IxVt1It1Po+nm0xupW2mGWAvzfjYlrF+w+15Pf6Qrh2jrjhBfaM9hSDQ2hbKEk/z0m 1boEjmqPDPeAnOVrX8lOPYWBfn23MFxR65htJYkkzDIMQPocL9FvYW08T7CMDKzgBUla /dVJ1ybEL8dQf5CRKCCVMmgpQG4TIjcF8Uet5VTXTlPNc2hrTKE6voSgleT+Db9Qa/Qe YnLYAIM45wDzo6GvCUfbwnMcc3lG1QlWp9iAO9HjkzrwuFiqN9pjgVf9sZKE/SkC0I1R YKOJiGfA5tvzklLQFeePRgXw2CA4X6P6TLuToATgErpPw6hAZ1bi8z1q5W3yGHIlxTFB lywg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=mls/xaRakChhSn59tI4YzwbCahfEzZs0aBlZvGQ3N1E=; fh=oAG6HIcuSPumOYs2ef0NYEkSLIm7D6VhhjfDQzOYEY4=; b=D6sQ7DvLzfPryNvu8mKzKZu7r1awKppUa+pPdzu+TpY/S7O1+Id1bYOFzEYAI88W0H iMfpCyJx3nnZbjeLbpuBRBKrBwpywdTNZn5ejNF/uDBAM7Cg1Rmd8gDOvU0Pwh9rJJo/ Ud+F9sbnrkdacMFdbGMzeBptrkzwWJa5YbpI7xl9MjvWS/DePhVY/MYQqdcQmBoI9QkQ mKQSHdYLhIBRWeE3YPDbw9+oGDIvBIgAoZklalFxPYSMnsZxYapeuDbVq1pE/DIcChHr sDuSnLSKIjro8wb/s3kzIINIxJtB901+e8ysdMg+0KmBj4CloigmzmKId8HKvbHEqAes 8rOQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Lr4UIpBf; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7cd00f67fb8si1097132785a.161.2025.05.13.10.46.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 May 2025 10:46:17 -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=Lr4UIpBf; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uEtfo-0003KX-90; Tue, 13 May 2025 13:44:12 -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 1uEtbV-00088d-H5 for qemu-devel@nongnu.org; Tue, 13 May 2025 13:39:46 -0400 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 1uEtbS-00038B-Nm for qemu-devel@nongnu.org; Tue, 13 May 2025 13:39:44 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-43ede096d73so41382405e9.2 for ; Tue, 13 May 2025 10:39:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1747157981; x=1747762781; 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=mls/xaRakChhSn59tI4YzwbCahfEzZs0aBlZvGQ3N1E=; b=Lr4UIpBfcoSGYEy/IuAM349MHuzZMPtzraAaZ6CgNADoKHDhcovPQst9vKJ91Jf9sf c+xFNyfnJ0BWSQz18XoWykgOJjs2ej+Lho5bw+tYiNmebm4HXIJZgpHeEBIbLyFXSct/ W8vGGxXL9jpC17+p4JS0ezqRzUWXemPpsMQCn02cStEi82lBJelWyjQwXcRzOqBt0kc0 HUiIZ1/iERJ4l9tIJqvYzNP5o3PQ3DkAxikIveR0e8vFBWoV49jEUZKbr+7229mg10+S PppF1zigb4fo0ppNPxrN1PhlW4rpUPuXSLCukZRUJdWbAgQ4tR0KhqywyrdotL18df5F Fouw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747157981; x=1747762781; 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=mls/xaRakChhSn59tI4YzwbCahfEzZs0aBlZvGQ3N1E=; b=JVbvIVMLUP7XJWT3lNJvIeVkNzzEKY5CydzlH9ApO4vaVPA8UQu5xSjF9mhLZr/ttG ZsqERzlXxKq/wiisruxYKNQwH0Mgzt5Eyv5C19221hvqYN1QCO50VfL2caX350yLRDur 6ElboMw5LyFwHLLHw/oBewbRG+X8UwYJJ2GYU0j2aVeFAYCr5C5oQuzzO1+q2Y2IgbSf 7lDjgXRJdqCzNkcZHAQHr+CKIZmrPqi0V/oYHrush5+cEDEvIAuW3E+WfrHaSJ1yS9cH UBHPFmm17AZJfEAoWnumzDukZ+bMX5GpZlu1pGKwvXOXV0dBrRSqDmfCOFqiricvCnvS xl6g== X-Gm-Message-State: AOJu0Yz6NQNhaLnqwkhPyQ54vq7mRGEIxyt4Nc79IzZ85G1Zfnwa9V+u BVMvZPJJSc8y2PUgwpKLb3KKxZG+ORy9i5qQdycmH5hRlZjnQ6nM8QiqY0Ky4Mteh5X8C/+rffF loNU= X-Gm-Gg: ASbGnctv+CozIOKvqXwG5F8BGQ5+FjYWJPlK6RFR9EV8syQbwkNhH5VkXEJqloqos4Q 6IPYSrqL/qFU521Z91uqRJD88ZGEO3J2HS96tE3ZyJcZGZ7oklmmyHXIcZB6ptJzpa7yY1JkEga 41kEHEMGryN4DGmWGJCMxbFlRFweQeTtwPWsSRPa4o8ECP1te4l4DKFi6FqNqfArOYfWP+OvqFf jf/fdqMRTfqAu99V1YxBGImeeTSEyzRaYwNgB9EZaIB3/XLL8nHL+d+O8eSVQoe9z+iTvTv8eAh XRQMgr+ZtNPBt01h4JdQUBDSvnbw7dX3NHwJZvuiBM5Ll2wsXyWpExAFUkCDRDvgjv5EOl2Oso/ kNYz9s5u472BluBr2fL/6Kx4zTWyg X-Received: by 2002:a05:600c:35ca:b0:43d:abd:ad1c with SMTP id 5b1f17b1804b1-442f20b94f5mr2043955e9.6.1747157980897; Tue, 13 May 2025 10:39:40 -0700 (PDT) Received: from localhost.localdomain (110.8.30.213.rev.vodafone.pt. [213.30.8.110]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-442d67ed1bcsm173195565e9.18.2025.05.13.10.39.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 13 May 2025 10:39:39 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , qemu-arm@nongnu.org, Richard Henderson , Pierrick Bouvier , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= Subject: [PATCH 02/19] target/arm/hvf_arm: Avoid using poisoned CONFIG_HVF definition Date: Tue, 13 May 2025 18:39:11 +0100 Message-ID: <20250513173928.77376-3-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250513173928.77376-1-philmd@linaro.org> References: <20250513173928.77376-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@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 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 In order to allow non-target specific code to include "hvf_arm.h", define the stubs in hvf-stub.c. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier --- MAINTAINERS | 1 + target/arm/hvf_arm.h | 16 ---------------- target/arm/hvf-stub.c | 20 ++++++++++++++++++++ target/arm/meson.build | 1 + 4 files changed, 22 insertions(+), 16 deletions(-) create mode 100644 target/arm/hvf-stub.c diff --git a/MAINTAINERS b/MAINTAINERS index 6dacd6d004d..7431f88b5d9 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -509,6 +509,7 @@ Apple Silicon HVF CPUs M: Alexander Graf S: Maintained F: target/arm/hvf/ +F: target/arm/hvf-stub.c X86 HVF CPUs M: Cameron Esfahani diff --git a/target/arm/hvf_arm.h b/target/arm/hvf_arm.h index 26c717b3826..7a44e092620 100644 --- a/target/arm/hvf_arm.h +++ b/target/arm/hvf_arm.h @@ -22,23 +22,7 @@ void hvf_arm_init_debug(void); void hvf_arm_set_cpu_features_from_host(ARMCPU *cpu); -#ifdef CONFIG_HVF - uint32_t hvf_arm_get_default_ipa_bit_size(void); uint32_t hvf_arm_get_max_ipa_bit_size(void); -#else - -static inline uint32_t hvf_arm_get_default_ipa_bit_size(void) -{ - return 0; -} - -static inline uint32_t hvf_arm_get_max_ipa_bit_size(void) -{ - return 0; -} - -#endif - #endif diff --git a/target/arm/hvf-stub.c b/target/arm/hvf-stub.c new file mode 100644 index 00000000000..ff137267a03 --- /dev/null +++ b/target/arm/hvf-stub.c @@ -0,0 +1,20 @@ +/* + * QEMU Hypervisor.framework (HVF) stubs for ARM + * + * Copyright (c) Linaro + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "hvf_arm.h" + +uint32_t hvf_arm_get_default_ipa_bit_size(void) +{ + g_assert_not_reached(); +} + +uint32_t hvf_arm_get_max_ipa_bit_size(void) +{ + g_assert_not_reached(); +} diff --git a/target/arm/meson.build b/target/arm/meson.build index e568dfb706a..2747f4b404c 100644 --- a/target/arm/meson.build +++ b/target/arm/meson.build @@ -32,6 +32,7 @@ arm_common_system_ss.add(files('cpu.c'), capstone) arm_common_system_ss.add(when: 'TARGET_AARCH64', if_false: files( 'cpu32-stubs.c')) arm_common_system_ss.add(when: 'CONFIG_KVM', if_false: files('kvm-stub.c')) +arm_common_system_ss.add(when: 'CONFIG_HVF', if_false: files('hvf-stub.c')) arm_common_system_ss.add(files( 'arch_dump.c', 'arm-powerctl.c',