From nobody Thu Oct 16 04:42:46 2025 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=1745351129; cv=none; d=zohomail.com; s=zohoarc; b=DtDotHFi809nAVWsDQi6nJ9tDK9r+mLjRs+u7QYMG8N18XIL3i8Q6RT2w28ycFb2oXKTPRC1uYfzVOzsHATORmhBPtCSGc0prZOF74/VC0vzU2lE4zXkSvXxsjaJuyxc5vThFJ5I9IaGSQFIoKCpA+v/gTL6U1MOggDxur9z5rA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745351129; 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=uUDSMb2yaWobcfq2T8zvFcLGEMZI8wXQ4enYzV4I/Bs=; b=Xb7sToCcKnQGVJSJnsbgjaM4UFaBm3NfvQTq97Wif4VvdbVHRuJpqyVCozI4La8sofO0qhP1DOihkETPGj77GubbGyM23TSF5GNvGZoU7o9usSPmpEETvUfLMMc4ZjzV3myL8Vom77oc9+xbFqQRg/yxCxotEZJTJZME82jCnOk= 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 1745351129189863.3868507020836; Tue, 22 Apr 2025 12:45:29 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7JIZ-0002XU-1Q; Tue, 22 Apr 2025 15:28:51 -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 1u7JII-0002Ss-LV for qemu-devel@nongnu.org; Tue, 22 Apr 2025 15:28:34 -0400 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7JIG-0006B0-JD for qemu-devel@nongnu.org; Tue, 22 Apr 2025 15:28:34 -0400 Received: by mail-pj1-x1030.google.com with SMTP id 98e67ed59e1d1-308702998fbso5010833a91.1 for ; Tue, 22 Apr 2025 12:28:29 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3087df21278sm9146865a91.29.2025.04.22.12.28.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Apr 2025 12:28:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745350109; x=1745954909; 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=uUDSMb2yaWobcfq2T8zvFcLGEMZI8wXQ4enYzV4I/Bs=; b=euiKftqLZ07t+NtkP7Pdx55QJIBNhO+sEkBy/+23LiidypbkTIkqmAIpDBLyI+5G++ xhCXH1I0GwKqRUKGYpzSFPTtCE82bQIIcR8H+fJnMih19rkn9hmVCjWxSqCZ5z6Tg0qV 9KpQ8rDsCZV/e36uO7m351V/VOM5FCZdW/sx8QIboLdBf2oXP3c2WOp/NjbNvwwE8XW2 B6ABFOn4iFVoayq/06+kQJabXBHS9DmCei+GmMuXzBfNorfG85kBnGeA3xJ5B2dWJD17 Y8C8zXJ5+u/gFG8RpRPTgmdY7vWUS41uyLZbZVhTRFfRNWHtP4wEcexFZ4aVQUqQibd0 BacQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745350109; x=1745954909; 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=uUDSMb2yaWobcfq2T8zvFcLGEMZI8wXQ4enYzV4I/Bs=; b=OQgYyfx1ep2EWKF4LwFH83+fvgAltiCERt+9uUOMFyM2QTLgrhBfQ9ZYLxXMrs/9UU t853bUIL/Df05Fnpjouu+1tANGQRArUQ4EZpNaPLVc+lEiaIAM4m/al1lfjQf+1Gstj1 c1sT5rUJj8sA/lhV2bJY1yMSuj74mvg/kQWnODZB8D6jkFgAvkws/ePZ89Xgi0vXmWhU YcyBuSsHoe2PPqI/zakzd5BTSYV9BEYg8Ovyhoz1P87W9CS80HU1vLmnrcCl53dDB15a s/dlCYKVaJALUsNGLq2kyCUMw57nLJVYU7f6zBbimTo8d4lxlwJO/A+zfXN9yCK+f95w FTFw== X-Gm-Message-State: AOJu0Yz86GFfffI3Dr05xQYHTugjmCMAdO4YBleQ3vTtpn1lPQdB3I6I kmGQjx+Sh3mr8uIfv1259EzisQlC/AORuq4mfLcECmoZcut1dkFzmJUkl/GgtP4hTOKA9477ylg 7 X-Gm-Gg: ASbGnctejfkR8m8Xuu46Qpo4JbZq6XGdl0WIEih2q1HNSueId0AgTg4GjeSKn0os0tl +O9PD5umgXJjHpfNRaX9n3gfgHXhk4HAzCtBtGo2IzuddXK8X80SMwEoBVLtLKEJ4rJ832vfJCH mWQIkekA8vJs7MJlzGYkiMJeiNQ125j668IC9OtWg4ZhhcgKKUITr6hzCY4kGQ12JE9DaFgwlzc UNBN2BB6wlrupjIrSYss67wV/3BCnrS6IhZ6HKBuxVWOXGNCM3yb+k8u5yZUM6SkJlrr/L0x0Cj MhBSWu22mc/Nf+HiiAHV9W1Y1Z2uDmfIcptapl4i/XMJ6jrw4DvL0qlEHwJExU0gYmpdGGINJ1P aZ+c4VgXDtQ== X-Google-Smtp-Source: AGHT+IHz/426LNDuiMCmZd7RnzHi3ly1ulePkGLgfWOAzIdRbXwRVIXJLXMQDzMDWRr8OFTFCDCGSA== X-Received: by 2002:a17:90b:58ec:b0:2ee:8e75:4aeb with SMTP id 98e67ed59e1d1-3087bb69d13mr27495369a91.17.1745350108650; Tue, 22 Apr 2025 12:28:28 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Anthony PERARD Subject: [PATCH 012/147] hw/xen: add stubs for various functions Date: Tue, 22 Apr 2025 12:26:01 -0700 Message-ID: <20250422192819.302784-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250422192819.302784-1-richard.henderson@linaro.org> References: <20250422192819.302784-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=2607:f8b0:4864:20::1030; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1030.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: 1745351131691019100 Content-Type: text/plain; charset="utf-8" From: Pierrick Bouvier Those symbols are used by system/physmem.c, and are called only if xen_enabled() (which happens only if CONFIG_XEN is set and xen is available). So we can crash the stubs in case those are called, as they are linked only when CONFIG_XEN is not set. Acked-by: Richard Henderson Reviewed-by: Anthony PERARD Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250317183417.285700-13-pierrick.bouvier@linaro.org> --- hw/xen/xen_stubs.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++ hw/xen/meson.build | 3 +++ 2 files changed, 54 insertions(+) create mode 100644 hw/xen/xen_stubs.c diff --git a/hw/xen/xen_stubs.c b/hw/xen/xen_stubs.c new file mode 100644 index 0000000000..5e565df392 --- /dev/null +++ b/hw/xen/xen_stubs.c @@ -0,0 +1,51 @@ +/* + * Various stubs for xen functions + * + * Those functions are used only if xen_enabled(). This file is linked onl= y if + * CONFIG_XEN is not set, so they should never be called. + * + * Copyright (c) 2025 Linaro, Ltd. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "system/xen.h" +#include "system/xen-mapcache.h" + +void xen_hvm_modified_memory(ram_addr_t start, ram_addr_t length) +{ + g_assert_not_reached(); +} + +void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size, + struct MemoryRegion *mr, Error **errp) +{ + g_assert_not_reached(); +} + +bool xen_mr_is_memory(MemoryRegion *mr) +{ + g_assert_not_reached(); +} + +void xen_invalidate_map_cache_entry(uint8_t *buffer) +{ + g_assert_not_reached(); +} + +ram_addr_t xen_ram_addr_from_mapcache(void *ptr) +{ + g_assert_not_reached(); +} + +uint8_t *xen_map_cache(MemoryRegion *mr, + hwaddr phys_addr, + hwaddr size, + ram_addr_t ram_addr_offset, + uint8_t lock, + bool dma, + bool is_write) +{ + g_assert_not_reached(); +} diff --git a/hw/xen/meson.build b/hw/xen/meson.build index 4a486e3673..a1850e7698 100644 --- a/hw/xen/meson.build +++ b/hw/xen/meson.build @@ -9,6 +9,9 @@ system_ss.add(when: ['CONFIG_XEN_BUS'], if_true: files( =20 system_ss.add(when: ['CONFIG_XEN', xen], if_true: files( 'xen-operations.c', +), +if_false: files( + 'xen_stubs.c', )) =20 xen_specific_ss =3D ss.source_set() --=20 2.43.0