From nobody Sat Sep 26 20:02:31 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1790023843; cv=none; d=zohomail.com; s=zohoarc; b=LFIxXOiSzlRlOWFWMKub5H5IM+CIF9jDtD0zP0o0yW9do6wxRV/J7quE+Xdn+klMRKRXHtozy2re3v4ahLfoLLX2nOYk22/Wv/kOUcVSHnHUh8Wt+/WiadhX9/ntYi8qN/NBLmPoq6qYsPwyMtoO+p54q7vmhVI1ZSrKwtwQgQg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1790023843; 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:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=vwFC8I/8VuqY8PXZs2vVtFUGpU274BL7KknFDb/LHZo=; b=nLgcYrxcsgC2bJ+ceLp4uJ9q/97sYLxDAOUexuoEa4P5PmFuK1eLJdlnxDBO7EoyYmr2qjB3QNF7jpACYy04HpYYB+CUPF8ndJAldv0Y/cA6I5LFaHiBG55ywyN3x09+SrBY0HOoHE/6+IbE1vDsLWNB19sczt2VdW9vdM5jUxs= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1790023843380215.80697147269711; Mon, 21 Sep 2026 13:50:43 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1x8kxz-00060p-1q; Mon, 21 Sep 2026 16:50:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1x8kxh-0005qR-MP for qemu-devel@nongnu.org; Mon, 21 Sep 2026 16:50:09 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1x8kxf-0001vS-Lr for qemu-devel@nongnu.org; Mon, 21 Sep 2026 16:50:05 -0400 Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 68LKf1QV1613805 for ; Mon, 21 Sep 2026 20:50:02 GMT Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4gu0rj357j-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 21 Sep 2026 20:50:02 +0000 (GMT) Received: by mail-pf1-f198.google.com with SMTP id d2e1a72fcca58-8632fdf67dfso313853b3a.1 for ; Mon, 21 Sep 2026 13:50:02 -0700 (PDT) Received: from localhost.localdomain (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-87bf5781b4esm51692b3a.3.2026.09.21.13.50.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Sep 2026 13:50:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=vwFC8I/8Vuq Y8PXZs2vVtFUGpU274BL7KknFDb/LHZo=; b=Xp3sMY9jGYGpJNH0c7BPaXO15cI t1pEm8rMJLdp4pcwLIHdLlHYJ3XNchJvs2qw9jP1Dr7sAt9zqzjfbVaTDG2TnydJ mbJ7TV5avWps0gaWfMxnkpsdHU4nBwfXkkgaI+T1ZVMYp1kwPQNuHuwMlCm99b5j 1JG0mplIJXEd1szbDhZQ3BSGHXNxxuiZkXyETrsJfgIXkxuibURL0USk2uNEOby2 RDy62JU5qHGZzmf+R/QaxNX4rz3i6RlY7RId1bstR7HhR9N7CN3WlFm+jD8kv/Ho bzFt4EKAFkCS28fTo9eQ9U8a0U8tA0xAlw7FSZZe2YAUMjxw7HkCNl94zqg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1790023801; x=1790628601; 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:content-type; bh=vwFC8I/8VuqY8PXZs2vVtFUGpU274BL7KknFDb/LHZo=; b=Gysygxj+vIVeZLBMbMbY16mQTkEqoB0QfzipK7uH3KScfPc80TDhlHJvdLOf3pWYEz fKdq1R9wJln4P+LupEIBf/XHpccvS+bU1l7myTHxiaJMXBiPVzFTBMI92s1deqfF4PpQ 6f4vxIyJHSMlxK3HlIka0pdBg7cP9WmhkRBYlq3X9jdpGNw1lQyqbWeECJrE8Gt2Iif/ 0QQUqbM6rmHVY/CjJQfCfXPEefbMmEgu2rENFFnWfGgR9WP8W0OiWyh8Iin1egf0MYvi GMTO8PK6B5jX76ONiKbdKV+VsGsThHeKNz2lUcpaOJ+ueVSuIT9p9n2ctV1NTqCP6r9N JCOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790023801; x=1790628601; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=vwFC8I/8VuqY8PXZs2vVtFUGpU274BL7KknFDb/LHZo=; b=UtDbUNl6vNYK0zIEo3vp9yH6oPMKQNRQRVPpAiSblNablKZHv9KrUL2SH/sFBRbjAR og0KN0Qg6ze3C99PZomfoeIfktVQr41TrXwFgM4mNLHGhtOw7KJJHs4+GqVN8Ny60gQt JgnOhyqs1JfXX7lT7mOig/LqYyRUPVyHHgtdPx7WAG72sU/hyFIy6FChWUSASYEWTzQ9 8ILnSvboIIkCYLqThnNkw8V3cPexpZhNgZ59X3x51/4SIDgtJPrUdHZRd6cEBdkt6ybC fpozbmGJnrwIhAJ0dZVfX4WYKuF/7pDyPh9X/kDhenBO56Pvjb8faCyq/biS3xpp969i cdwA== X-Gm-Message-State: AFuF++n+Jva31SKMMRqyFBo/GbjntCo4sIeQzqq042tWzwBTSuC0gbq6 LbqRRKM+dTzJmTJTNJvWs8gaxnJCLkQWTXgK2+xwCx+SSvo9sRFONeh6wiZGumCXWo7CkxT6BVT K7F1FVd7JDMBsdztwx/Q6+NYvg8teVxO4TPn+Lrrl0n1whvs5uV6Nx0A2VgYudA9wuA== X-Gm-Gg: AYBFou0kjYs27VKQMCcTzQ/WiQH+bfXvRG3bmtpJI4TdBCO1EQ2Jc4Fbrco9/VLUkm5 RREh3QmLIK2jCW8Uou7yJIB0tp9prgzvT3C75bfRN5EzRN5/iD2m9X69n7XKjyeIQRvLsJnLUIF /RAhR3bQfkyWrvsC3GATbDkmdT8Md9HEuv/yn+LK+UNZW/pOg7eCdptgrtKqLDOieLWa7YRDB5E tWOar2zDYIKQhpf2ukytvdrPucQCeCwFUOOLrGzT5o6jD8dniMONz1SODF7UZ33GbZzJPWX+nHk OpHnBceydBotHJ2qNUZ702nL/fJ+9y0ncvdcwnKhoyUv39IeTlkI34uwZFwYOzbpTcCJxlpM8pQ e/p1GZPtadA4R4Cs0xMPqsZM3zl7K84eZn8CWm2v2JKHp21XpyOK1fHIieAdNpw== X-Received: by 2002:a05:6a00:4b0d:b0:85f:1941:a9eb with SMTP id d2e1a72fcca58-87bbfb6c53bmr605336b3a.11.1790023801274; Mon, 21 Sep 2026 13:50:01 -0700 (PDT) X-Received: by 2002:a05:6a00:4b0d:b0:85f:1941:a9eb with SMTP id d2e1a72fcca58-87bbfb6c53bmr605319b3a.11.1790023800767; Mon, 21 Sep 2026 13:50:00 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland , Markus Armbruster , Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 1/2] hw/xen: use stub_ss for xen_stubs Date: Mon, 21 Sep 2026 20:49:53 +0000 Message-ID: <20260921204954.50529-2-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260921204954.50529-1-pierrick.bouvier@oss.qualcomm.com> References: <20260921204954.50529-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Info: AW1haW4tMjYwOTIxMDMwNSBTYWx0ZWRfX4V5R/u2tosa2 aA4axywXnBQEZtSpNuYDs5rSIhRe+iSawvjhe8fJgdKSzp4Kr8AVkFRhHobITKNpqGRByphC9dE 8/ogrtIJvu2qAmPDDTix5yJIQbcNIVA= X-Authority-Analysis: v=2.4 cv=AsR7T+9P c=1 sm=1 tr=0 ts=6ab1987a cx=c_pps a=m5Vt/hrsBiPMCU0y4gIsQw==:117 a=iLqgmErQAxjCjdq5jj1Aqg==:17 a=VdqzKS8jKosA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=EUspDBNiAAAA:8 a=WoShrNVHzPVctHG6VJEA:9 a=IoOABgeZipijB_acs4fv:22 X-Proofpoint-GUID: _kotO-sk-pzAiFtRMTynzdqqU0j2JFcb X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwOTIxMDMwNSBTYWx0ZWRfX7B46SoORzYml ELomWgnkf0Wed/f6ckPx4gg0n4K+zoCYSR5ATFWMGlraYQPrsA4qU/3wIRxh55NMrp0hlf0u36C mOB6FUechKwKPP1aWpNnSj45di8WPZJgEnexif2J5+mGCTBCrA0ojZFzHPNe2qVlpvDm4DHl8dM J2+YfPAluJxQwjxRSlPap5/BwvwHhfRQixhWLTBUnSvBfHWxnvGn0bQVA8q/Bqak1FOtOmzzM/v WouDmifMTIMwdIPN2NLRktNMbDGWlcYYv1+MXrrKfIYCU8IXZnvHw2agFMFvCSVkCyAIE16ywtl +c7uviubYN57mieiKY4XxmBCwg0iUX2tngd6GZoIJZcRveZYTUP6vOu56MXIdgPQeZR+cmXp1lu d0n6hMPW7ezchp5nIzgwfGPnbRD1xrUUAbui8WxOk0srxXLJSWVKW2kQ8P7Mfz5Ow+/J0vKtc4B TrnZetnLsSIbaljK48A== X-Proofpoint-ORIG-GUID: _kotO-sk-pzAiFtRMTynzdqqU0j2JFcb X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-09-21_06,2026-09-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 spamscore=0 malwarescore=0 suspectscore=0 clxscore=1015 impostorscore=0 adultscore=0 lowpriorityscore=0 phishscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2609040000 definitions=main-2609210305 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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: qemu development 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 @qualcomm.com) X-ZM-MESSAGEID: 1790023845358158500 Content-Type: text/plain; charset="utf-8" Solves these link errors on aarch64 hosts when linking arm and aarch64 targets: /usr/bin/ld: libsystem.a.p/hw_xen_xen_stubs.c.o: in function `xen_hvm_modif= ied_memory': /qemu/build/../hw/xen/xen_stubs.c:17: multiple definition of `xen_hvm_modif= ied_memory'; libsystem_arm.a.p/hw_arm_xen-stubs.c.o:/qemu/build/../hw/arm/x= en-stubs.c:25: first defined here /usr/bin/ld: libsystem.a.p/hw_xen_xen_stubs.c.o: in function `xen_ram_alloc= ': /qemu/build/../hw/xen/xen_stubs.c:23: multiple definition of `xen_ram_alloc= '; libsystem.a.p/hw_xen_xen-hvm-common.c.o:/qemu/build/../hw/xen/xen-hvm-co= mmon.c:39: first defined here /usr/bin/ld: libsystem.a.p/hw_xen_xen_stubs.c.o: in function `xen_mr_is_mem= ory': /qemu/build/../hw/xen/xen_stubs.c:28: multiple definition of `xen_mr_is_mem= ory'; libsystem.a.p/hw_xen_xen-hvm-common.c.o:/qemu/build/../hw/xen/xen-hvm= -common.c:27: first defined here /usr/bin/ld: libsystem.a.p/hw_xen_xen_stubs.c.o: in function `xen_map_cache= _enabled': /qemu/build/../hw/xen/xen_stubs.c:34: multiple definition of `xen_map_cache= _enabled'; libsystem.a.p/hw_xen_xen-mapcache.c.o:/qemu/build/../hw/xen/xen-= mapcache.c:86: first defined here /usr/bin/ld: libsystem.a.p/hw_xen_xen_stubs.c.o: in function `xen_invalidat= e_map_cache_entry': /qemu/build/../hw/xen/xen_stubs.c:38: multiple definition of `xen_invalidat= e_map_cache_entry'; libsystem.a.p/hw_xen_xen-mapcache.c.o:/qemu/build/../hw= /xen/xen-mapcache.c:664: first defined here /usr/bin/ld: libsystem.a.p/hw_xen_xen_stubs.c.o: in function `xen_ram_addr_= from_mapcache': /qemu/build/../hw/xen/xen_stubs.c:43: multiple definition of `xen_ram_addr_= from_mapcache'; libsystem.a.p/hw_xen_xen-mapcache.c.o:/qemu/build/../hw/xen= /xen-mapcache.c:538: first defined here /usr/bin/ld: libsystem.a.p/hw_xen_xen_stubs.c.o: in function `xen_map_cache= ': /qemu/build/../hw/xen/xen_stubs.c:54: multiple definition of `xen_map_cache= '; libsystem.a.p/hw_xen_xen-mapcache.c.o:/qemu/build/../hw/xen/xen-mapcache= .c:468: first defined here Signed-off-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/xen/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xen/meson.build b/hw/xen/meson.build index dcd2b7e1df3..62767a5ea21 100644 --- a/hw/xen/meson.build +++ b/hw/xen/meson.build @@ -29,4 +29,4 @@ else endif =20 system_ss.add_all(when: ['CONFIG_XEN', xen], if_true: xen_common_ss) -system_ss.add(when: ['CONFIG_XEN', xen], if_false: files('xen_stubs.c')) +stub_ss.add(files('xen_stubs.c')) --=20 2.43.0 From nobody Sat Sep 26 20:02:31 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1790023823; cv=none; d=zohomail.com; s=zohoarc; b=jvWeUaJZHnNQNXUMQebRFBlFkRXzVojDkZ2nvlJzf9rB1aV/HHbDQxpHwumt4EYmHzTHiPc8G5EFeidvatMrd6kuUOAO78NvvMVAamEV6is7H6A6ycu1s1Dhy2kKG8RYEYlocj5ORI1H+OlAEEXFIknDZ8nsrhVFcEs1fIm+eYE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1790023823; 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:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=lB6Qm4no18l6gfbNW6QXiJW1644NvQW57Yxf2lJBiSo=; b=Xghn4WZnI8dsOYbOlayuk3x1EG66gpn9/GGq9TkkRsa+5m+N7uw3BDJ2vHCwjq+9BmBGadEl944coIpf409YLNbrhyNLejbop1Mrkyske9CPJijRDBKQWzXs/iBDaNImY0fx7LMy9U6/c8r2x04IVvbqIA9fPD3xSGBDfMGvXew= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1790023823665300.73982098999716; Mon, 21 Sep 2026 13:50:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1x8kxr-0005ub-S1; Mon, 21 Sep 2026 16:50:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1x8kxi-0005qX-VJ for qemu-devel@nongnu.org; Mon, 21 Sep 2026 16:50:09 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1x8kxg-00025Z-EU for qemu-devel@nongnu.org; Mon, 21 Sep 2026 16:50:06 -0400 Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 68LKf2qK2546651 for ; Mon, 21 Sep 2026 20:50:03 GMT Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4gu011bbcj-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 21 Sep 2026 20:50:03 +0000 (GMT) Received: by mail-pf1-f198.google.com with SMTP id d2e1a72fcca58-85602449126so6966108b3a.0 for ; Mon, 21 Sep 2026 13:50:03 -0700 (PDT) Received: from localhost.localdomain (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-87bf5781b4esm51692b3a.3.2026.09.21.13.50.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Sep 2026 13:50:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=lB6Qm4no18l 6gfbNW6QXiJW1644NvQW57Yxf2lJBiSo=; b=jPPrn6bQQvJ1rUlMwWp9oRTW62N He0IZnAq8st7GFFai4Da5ePVwbXFlBYZAvh51IO5jbyszmklyVDcpAlyzKPJfmp8 2rVIlcYz2W+zdbeeVk1VXVddV4xIdRBut79yDYF74UgoksBBrBThLgigXUYNxzeM p5GSbIUzH+dZ/d3qHUJa5cYCSWETizWSq64cNAsiubi9adB1a9e9mafkbfjBCwQx 8dzb/WrQUmjOvXmyBs9d1yVbCR9R7+2ziY6V4ziEubo2OVnKiSAiL60ksdvt3reF jBrtYBpVNxGAsiMIkp38niUV+I029Rd2dCHz/1YtWdQdvSt8QKbB12X7R3g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1790023802; x=1790628602; 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:content-type; bh=lB6Qm4no18l6gfbNW6QXiJW1644NvQW57Yxf2lJBiSo=; b=WuDq1/0lYHMXJfqqzVZRGZmQMfM+vDoOB+0GNmqCkMada8gyijVGRcE9/f6sGFirCg PdJQc8SSUj/ayCEO+zzQNAtKUZZZS9dDCGh4hR/aF+PrPCiQU7cF4hK9TJ0nE8GLO4Ex IT/TV1ctDcmO3sciTOqcZBzP9aJL6kLXqG2bLc6C43k+serp0rTgBLwmCRkOARrmBTEr Vb6Vp0FdBkwjExfD3hE/bunnhotmc0JB2Fbw52g90VFpY4riLpPpVOZJH6/EtfV1neVM 7QQ/RM1PYug0rnEZ6Ge/hLt1vpT+kZp/KCSDFbAwBZXjSt8BeGOLc8dVMIYXZllj61Nd /0KA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790023802; x=1790628602; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=lB6Qm4no18l6gfbNW6QXiJW1644NvQW57Yxf2lJBiSo=; b=ZI4fGc8fbSV6rCgvQNOrHeK60+XQAxT43psxfzcvKMQJJQ2iXA/v0l+VRB4wcBhMrm Cb/cHAJ8zNllqf8+uqOY7MMtcrumETRmi54S8KH/KyIF+3Z+djx/eAtz3NgXMaIA6Kgx omrY7xeUcMJ22l68IxzwceabHnzBz9sAijdR5TKF3WAIXKofrl3OzZu1vH3kWgEEwt0u VdGRmp+KKvl+/U1nVmvO6b9bBfA7or56N03Arl/uuwyELzSd3/cdeiO0K8g91JKYVV/p cnAVyhcYWcv3kt+GE7EOAxcfrIfaQ57vqnECd0wMgFSZs6uPvNlBYWg5LjiAecVlu6ga Znkw== X-Gm-Message-State: AFuF++mh/jMoS9bFa17sWYepNedkf8jWtcfj6O5I72651VJEXJLzNkX0 30fagIqFSD+phhA8yDOLwNOkk//zHLA7kVOhprZmhG2Lng9Qx2Wm+64h0Q8/pq5qS5bYbGMxv3p E2elQxVhiBdQesJJlnDfcFAtMMsJsG7Q8iUawPcKTNPc0cVUiFQJtP3qFis/o/GOh5w== X-Gm-Gg: AYBFou0N7aVr5Vc7xcNBorBjkwIgu/YWWsJj2LO8jGmdgTyI3+Ev2zZAUf0u+JwNM5b 8zqAyKOMXOwPkN71IODFVocRx9PWZPUJnFCdsz/Wi1FksYej5TA4NH9/40gs7+/3NspgnzPdMDg 59ReCxVY191bu70uWfkeezPT9zcwnS6T+ge77gp4dT1Cqsh7OsP4bMQieNpW8DoDe7Kvw2iJCJL eeYJePc8JycN8rGRJ6uUPDX8JoBVF1rbKoRSTmZyds6rg+3H/3Q0eVjxZ4LKBkShwQUG8DnK9hl YpOos/GseGv7BQmHgxq3ATjvzU56BcraqmbybX65lrOtzOYB46o8fVWPMv02mt3t/CVPWRPrywg bnX82Qq2I7klOlTdI1RwTjmH5eTy2Azqzv9jDbuSRSIJHwQ3k5J5mptIki0XH+A== X-Received: by 2002:a05:6a00:1c8d:b0:848:6f5c:a327 with SMTP id d2e1a72fcca58-874dcef0843mr16372586b3a.15.1790023801997; Mon, 21 Sep 2026 13:50:01 -0700 (PDT) X-Received: by 2002:a05:6a00:1c8d:b0:848:6f5c:a327 with SMTP id d2e1a72fcca58-874dcef0843mr16372561b3a.15.1790023801407; Mon, 21 Sep 2026 13:50:01 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland , Markus Armbruster , Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 2/2] target-info: add multi-target test binary Date: Mon, 21 Sep 2026 20:49:54 +0000 Message-ID: <20260921204954.50529-3-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260921204954.50529-1-pierrick.bouvier@oss.qualcomm.com> References: <20260921204954.50529-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: 8BcpAwVLJkxfMPP8LxE3o2nLfFBPg91g X-Authority-Analysis: v=2.4 cv=dPczC+Zb c=1 sm=1 tr=0 ts=6ab1987b cx=c_pps a=m5Vt/hrsBiPMCU0y4gIsQw==:117 a=iLqgmErQAxjCjdq5jj1Aqg==:17 a=VdqzKS8jKosA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=EUspDBNiAAAA:8 a=vWpnfD-RLob1JoR1014A:9 a=IoOABgeZipijB_acs4fv:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwOTIxMDMwNSBTYWx0ZWRfX1IVkhT/hNO2N /0OHaWXPDU2rr4v7MeV4121f6fwHmvEGKI9uju7GbSBXBKYMezqv/11rQFkSmez0bMtAZeU/Cv+ lzj8V53X46IFSzG/jeWv16qz1lpO9I0Q7n2MZ4PhETkF04jhauVkF0HjVzPJktZBsNRNDsn/Nq8 C3eEQ+UQr0bEn0NqayF1e4QBUjsJ3MxKh6xjK3BcIq/HRulUn88rmZTkvnKe0898YXpyAgBf7Vn fN+2Sa7/8gMwofFltTedHtKyaz+u5VdBUhgI9zF3Aw+DdP/hJxXjhZO6W11F5MXtwPwJv136Jcu /AThkghOCswh8fuTic3BRdn8qdQMLRI0ElBVXxyuQPsy6gwwAooIL4O+x3QErhgctr5TQEV95jR 3bjQCffs9ZczUJ7THf+SFMLYfjgccIyVu/idnbGEiHuqRC3Ja6EXG0Oj1UpE5DZeMDfh7EtESsO nI924N2/sVeLzcf9V1Q== X-Proofpoint-Spam-Info: AW1haW4tMjYwOTIxMDMwNSBTYWx0ZWRfXwLNTxSEk1X6g AFLqRNrEOxoHQFhLbCld3WJADaU8BrKXPtt7vVKGHeIq6IWp8K9Yu/IxoE9PxqU91UzrFIUSlMY d+ZEwnqCDCsbNLFTbhQw00N1QSgnlOg= X-Proofpoint-ORIG-GUID: 8BcpAwVLJkxfMPP8LxE3o2nLfFBPg91g X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-09-21_06,2026-09-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 malwarescore=0 phishscore=0 lowpriorityscore=0 priorityscore=1501 bulkscore=0 clxscore=1015 adultscore=0 spamscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2609040000 definitions=main-2609210305 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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: qemu development 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 @qualcomm.com) X-ZM-MESSAGEID: 1790023825716158500 Content-Type: text/plain; charset="utf-8" Now we are able to link multiple targets together, we want to make sure no build regression is introduced. For this, add a new unit test linking compatible targets. In addition, we check QOM types can be initialized, ensuring uniqueness among all targets. For now, supported targets are: - arm-softmmu - aarch64-softmmu - microblaze-softmmu Signed-off-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- MAINTAINERS | 1 + include/qemu/target-info-qom.h | 1 + meson.build | 23 +++++++++++++++ target-info-qom.c | 5 ++++ tests/unit/meson.build | 12 ++++++++ tests/unit/test-multi-target.c | 53 ++++++++++++++++++++++++++++++++++ 6 files changed, 95 insertions(+) create mode 100644 tests/unit/test-multi-target.c diff --git a/MAINTAINERS b/MAINTAINERS index 6be9c5725b9..62e048d1824 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2146,6 +2146,7 @@ S: Supported F: include/qemu/target-info*.h F: target-info*.c F: configs/targets/*.c +F: tests/unit/test-multi-targets.c =20 Xtensa Machines --------------- diff --git a/include/qemu/target-info-qom.h b/include/qemu/target-info-qom.h index 91be415ed33..8b6e1ece969 100644 --- a/include/qemu/target-info-qom.h +++ b/include/qemu/target-info-qom.h @@ -26,5 +26,6 @@ typedef struct TargetInfoQomClass { OBJECT_DECLARE_TYPE(TargetInfoQom, TargetInfoQomClass, TARGET_INFO) =20 void target_info_qom_set_target(void); +void target_info_qom_set_target_info(const TargetInfo *ti); =20 #endif /* QEMU_TARGET_INFO_QOM_H */ diff --git a/meson.build b/meson.build index cfac634cf13..cae1591cd28 100644 --- a/meson.build +++ b/meson.build @@ -4259,6 +4259,15 @@ if host_os =3D=3D 'darwin' endif =20 traceable =3D [] +multi_target_libs =3D [] +multi_target_deps =3D [] +multi_target_crates =3D [] +multi_target_supported_targets =3D [ + 'aarch64-softmmu', + 'arm-softmmu', + 'microblaze-softmmu', +] + emulators =3D {} foreach target : target_dirs config_target =3D config_target_mak[target] @@ -4414,6 +4423,12 @@ foreach target : target_dirs build_by_default: false) =20 if target.endswith('-softmmu') + if target in multi_target_supported_targets + multi_target_libs +=3D lib + multi_target_deps +=3D arch_deps + multi_target_deps +=3D target_stubs + multi_target_crates +=3D main_rs + endif execs =3D [{ 'name': 'qemu-system-' + target_name, 'win_subsystem': 'console', @@ -4497,6 +4512,14 @@ endforeach =20 # Other build targets =20 +multi_target_objects =3D [] +foreach lib: multi_target_libs + multi_target_objects +=3D lib.extract_all_objects(recursive: true) +endforeach + +multi_target_link_args =3D emulator_link_args +multi_target_link_args +=3D enable_modules ? ['@block.syms', '@qemu.syms']= : [] + if get_option('plugins') install_headers('include/plugins/qemu-plugin.h') if host_os =3D=3D 'windows' diff --git a/target-info-qom.c b/target-info-qom.c index 6965e4d1169..3ae1627b8fb 100644 --- a/target-info-qom.c +++ b/target-info-qom.c @@ -53,3 +53,8 @@ void target_info_qom_set_target(void) =20 target_info_ptr =3D TARGET_INFO_CLASS(targets->data)->target_info; } + +void target_info_qom_set_target_info(const TargetInfo *ti) +{ + target_info_ptr =3D ti; +} diff --git a/tests/unit/meson.build b/tests/unit/meson.build index e47bc7225ab..d17435c1877 100644 --- a/tests/unit/meson.build +++ b/tests/unit/meson.build @@ -215,3 +215,15 @@ foreach test_name, extra: tests suite: ['unit'] + (slow_tests.has_key(test_name) ? ['slow'] : [])) endforeach + +# Multi targets test +if multi_target_objects !=3D [] + test('test-multi-target', + executable('test-multi-target', + sources: [multi_target_crates, files('test-multi-target.= c')], + dependencies: multi_target_deps, + objects: multi_target_objects, + link_depends: [block_syms, qemu_syms], + link_args: multi_target_link_args), + suite: ['unit']) +endif diff --git a/tests/unit/test-multi-target.c b/tests/unit/test-multi-target.c new file mode 100644 index 00000000000..89b55bb1632 --- /dev/null +++ b/tests/unit/test-multi-target.c @@ -0,0 +1,53 @@ +/* + * Test for multiple targets + * + * Ensures targets compatible can be linked together. + * Also that each QOM type is unique among them and can be initialized. + * + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. + * + * Author: + * Pierrick Bouvier + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "qemu/module.h" +#include "qemu/target-info.h" +#include "qemu/target-info-qom.h" +#include "qom/object.h" + +#ifdef CONFIG_SDL +/* + * SDL insists on wrapping the main() function with its own implementation= on + * some platforms; it does so via a macro that renames our main function, = so + * must be #included here even with no SDL code called from this f= ile. + */ +#include +#endif + +/* stub for system/main.c */ +int (*qemu_main)(void); + +static void test_qom_types_are_unique(void) +{ + module_call_init(MODULE_INIT_TARGET_INFO); + g_autoptr(GSList) targets =3D object_class_get_list(TYPE_TARGET_INFO, = false); + g_assert(targets); + const TargetInfo *first_ti =3D TARGET_INFO_CLASS(targets->data)->targe= t_info; + target_info_qom_set_target_info(first_ti); + + /* register all types */ + module_call_init(MODULE_INIT_QOM); + /* trigger type_initialize for all types */ + object_class_get_list("", false); +} + +int main(int argc, char **argv) +{ + g_test_init(&argc, &argv, NULL); + g_test_add_func("/multi-targets/qom-types-are-unique", + test_qom_types_are_unique); + return g_test_run(); +} --=20 2.43.0