From patchwork Fri May 30 12:49:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 893330 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e0d:0:b0:3a4:ee3f:8f15 with SMTP id p13csp1013506wrt; Fri, 30 May 2025 05:50:44 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVsaCtVkDwp9IEJKAz3tHYjIGJmGBxcd6qiia6ZCos9t7Kej4svv5Ynj0YqzbQYQYcC/kSMzQ==@linaro.org X-Google-Smtp-Source: AGHT+IF9hRuAhJEHK4N4MLqRHkcC+rFhtzPmtKZCyKcU8EVu/iWFdnVhmy6vSgSmmiu8qQNXnGth X-Received: by 2002:a05:620a:1a25:b0:7c5:e2a0:4e64 with SMTP id af79cd13be357-7d0a204e930mr528089485a.51.1748609444659; Fri, 30 May 2025 05:50:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1748609444; cv=none; d=google.com; s=arc-20240605; b=gV2uhM6hq+yQhOlJvOyJ5+5hWXnnIhDS7wW6+kME8LL3blkFeMaheU8pGX30T07/3V /wk3MetUbC8xpyWcAXq2Z4AVAHHr9XyBfTVFn8MOsVg/4PKu6QhjAWgmqxvLjI5TYDc7 eAathIWdxkWFFjkG+K6tmWsND/XVpxbCRXv4ktRjUJg5UsgC2kF0tQ2uKHc1CQUunRwh fR3MttHWvsOi51aL6K3wH4AzKaiKjxH8XC8Lh91Qei+9tY6hGy3sdDL5/puXoW8ZW/Z4 KdxISvGWoeI6/v+Dp9mggfk4KZDz9L9TQXleiyKqVQsatqQS1AU10vxIApp5IGjmh1YB LMRg== 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:to:from :dkim-signature; bh=hjPafosfBtpp6OfR6vWfKqeDiH1uNVyM2/xwKvCmH7s=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=lRo2uWE+Q1CTciSVF71LAwyFCdqMgXOPhYMc782G6EQsJJt55zwDP+iZuU/OS9Osnl INm8c8z8jkYqv2HycoNFpvenUWsH2ZWaiL60MNtGkOu2sQorOcWtfDktAG1zkHzMAUZ7 phek48jfaqTy8+hDv1HoDEwYufktNjcwFwY4RKK2DQfeeG013XHn3OkdM5VWizLaVGxY gZjmaz8R75MdYSCniktr0PjkIEOxvmppSUAjT5LpmOmE9IdSgy9/cDNjmOqnrd85tPSj GQhaJizAmnff47b0K5wVFyCDSZvU+u32OYR3aC6vBJqXUPSBxGlbgsbjsTU5tlkyPjzn a4xw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QuOdu0Yc; 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-7d09a3070ffsi377026685a.583.2025.05.30.05.50.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 30 May 2025 05:50:44 -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=QuOdu0Yc; 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 1uKzBf-00023d-Lm; Fri, 30 May 2025 08:50:15 -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 1uKzBb-000213-QH for qemu-devel@nongnu.org; Fri, 30 May 2025 08:50:11 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uKzBY-0001pi-W5 for qemu-devel@nongnu.org; Fri, 30 May 2025 08:50:11 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-45024721cbdso15402885e9.2 for ; Fri, 30 May 2025 05:50:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1748609406; x=1749214206; 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=hjPafosfBtpp6OfR6vWfKqeDiH1uNVyM2/xwKvCmH7s=; b=QuOdu0YcXrU22Dd/g8HJDX+cyKwqsRnuvkzC/AKdpfoWcb7W7dOUvcXENVnMCW+tZS FuIz27m/VwVFH6HDRLsQL1L8sQ4xJFe/e45GRexRWpla9mhvdHucVw+RDAH4H9xrSKi8 CCKdXVkF+IbphnSDjYNM0zANePaAipo/Kba7fjVe6j0LthcYWwI+vT8YTWrmx/MfauM6 Gmz+1ety+lf6u6UJrHcRFSsv7vBII0zJUUgtQvmvMzcsZHGPx45O928WjNRpnApFy1ue fd42KKZgg+Mh2kC0aWjb+LF5WRY+HTbJ2AGbAHwLSAP18mrO1Vcpev6IwFDOA4pTSQYZ bfTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748609406; x=1749214206; 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=hjPafosfBtpp6OfR6vWfKqeDiH1uNVyM2/xwKvCmH7s=; b=FHjhlZOWqiqXVJ2NT69oYCMt/Z8iaeRbU9e0J60A7ErEYYPaP+UNCRqNAtEmdNYDcC rNQsmdYjd2d7vtGKUhjSyx+eFuHMWNr8lOvMq0UWzDPog3yEi6C65Lxe4ePoDGDhn8RW hB+ST5Lv4Gn2IdpOs3N4PFzqsSQwU8uPzC57smLtkQus3MIzMDdYFHSJff1kSnOUkG5i dyO7qG0XLjUlqOqZn5GjxMbBdDyfwz655+zNqfXJszftyAN0EorLwDY/FRWedP8uKS32 I3GlszjD4jy0itqVEnhUJhm7brctPMsVQnJ9pTYph8nRDJkF30xwP1hCfhxDEcboSjzn 6dNQ== X-Gm-Message-State: AOJu0Yyh6jR1vu1fB8sq4+UUWp5EiipYYj5YclBkv69tTnTv15P5VmE6 qQYbDGLiVLSh5YPkPiT9P5b6YcS0MzIon9tCf+h5pCgSnd56ROpxOE3lLIqEm4LMBFkTxXtQjLV I92ZJ X-Gm-Gg: ASbGncugbjUMqhYMgg1Nd3hmY0Ty9cfqpeYN0ClbtXrNXtDpVFGyGEZoU1R8N1sVgEy XQmaNFCJ5GQ71/HHPHyL09HKOs6H0/idlUVJrg/3Paer5p6S9yjZyW/YtD+Rg4Sil3rui1pv+KD km3SB8NQ9i6Kc7jvVCd0PC2QGSPw8elNnHg/fyXmDnpw6iWzlDOXVQeBNDTnFEzOgLirb31Qgcn Feq/bFgXxeOHNgV+/0mif425uMlFlMYIWi5a74Y2TiQcvpWTWPhEB279Ir//6Hz3OWWn6Bsu5wR mdprJxLCGChmtSr8l/JXD8Q8CUIwk6BHK45cdy62GijviYQ3DsP6eTKumKc5NrR4D6RP X-Received: by 2002:a05:600c:4fcb:b0:43d:4686:5cfb with SMTP id 5b1f17b1804b1-450d658f66amr31883255e9.27.1748609405862; Fri, 30 May 2025 05:50:05 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-450d7fb7dafsm17235195e9.25.2025.05.30.05.50.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 May 2025 05:50:05 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 06/15] target/arm/hvf_arm: Avoid using poisoned CONFIG_HVF definition Date: Fri, 30 May 2025 13:49:43 +0100 Message-ID: <20250530124953.383687-7-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250530124953.383687-1-peter.maydell@linaro.org> References: <20250530124953.383687-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32b.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 From: Philippe Mathieu-Daudé 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 Reviewed-by: Richard Henderson Message-id: 20250513173928.77376-3-philmd@linaro.org Signed-off-by: Peter Maydell --- 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 8e68333623e..973254fae79 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -510,6 +510,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',