From nobody Sun Dec 22 11:04:01 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1728559221; cv=none; d=zohomail.com; s=zohoarc; b=goBuRernJSY/oOTAFWXhRZJHt2hQchBACw2WaHPwAsUY7MJzCshHFqIU3jRR5LUu+i9G93n+esMn+sbOMYAJhOcEwjaNXnhBGbt8w/4RE5lkVhBXVH2iZtfKXE2zleDNE/tGAp1IlEjxKiBThO4sCOn6god9wMxw1KoursKifY8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1728559221; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=nEIq7GwYUVCTUGK0lDr/JTYVABBl7q7jjnz8jp44RBA=; b=O7QU8DOT8uX9DGBINlRuR7v33uIQj76gc3rwPzd+M/KfIStUmteNu/rtXUKGK2aSp0ybBPITxDaO7TAbxoGBOkDhwSOxPbmb75NCkHVRWi8jn0xvfGMsjHRa2UW9xtksMk1+jKYTeyxueRa9+MyWMoR2N7Hflfh8BjpLZHNKdWU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1728559221251695.0839143773359; Thu, 10 Oct 2024 04:20:21 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.816016.1230188 (Exim 4.92) (envelope-from ) id 1syrCz-0007vC-6l; Thu, 10 Oct 2024 11:19:53 +0000 Received: by outflank-mailman (output) from mailman id 816016.1230188; Thu, 10 Oct 2024 11:19:53 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1syrCz-0007v5-2V; Thu, 10 Oct 2024 11:19:53 +0000 Received: by outflank-mailman (input) for mailman id 816016; Thu, 10 Oct 2024 11:19:51 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1syrCx-0007ux-FW for xen-devel@lists.xenproject.org; Thu, 10 Oct 2024 11:19:51 +0000 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 8ff27684-86f9-11ef-99a2-01e77a169b0f; Thu, 10 Oct 2024 13:19:49 +0200 (CEST) Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 9A60121D7E; Thu, 10 Oct 2024 11:19:48 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 6FFAD13A6E; Thu, 10 Oct 2024 11:19:48 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id DdvcGVS4B2eIKgAAD6G6ig (envelope-from ); Thu, 10 Oct 2024 11:19:48 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 8ff27684-86f9-11ef-99a2-01e77a169b0f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1728559188; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=nEIq7GwYUVCTUGK0lDr/JTYVABBl7q7jjnz8jp44RBA=; b=dulR21QjCezK2FALVTbUtmxUdiwTWHiuaif1kFtSTcxD1HMBBmW6qnBkPxSNCcaR3Q05jR WXzcamY3ZHZvhWtrngwQQHwSzo2/I5IYVmMjn0jHEugr2ZgQHpIOgi9NTa7g9sHKQSHeUW o4liODM5e7RFxGRB3GX1UMG5vxfzWfo= Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.com header.s=susede1 header.b=dulR21Qj DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1728559188; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=nEIq7GwYUVCTUGK0lDr/JTYVABBl7q7jjnz8jp44RBA=; b=dulR21QjCezK2FALVTbUtmxUdiwTWHiuaif1kFtSTcxD1HMBBmW6qnBkPxSNCcaR3Q05jR WXzcamY3ZHZvhWtrngwQQHwSzo2/I5IYVmMjn0jHEugr2ZgQHpIOgi9NTa7g9sHKQSHeUW o4liODM5e7RFxGRB3GX1UMG5vxfzWfo= From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Samuel Thibault , Anthony PERARD Subject: [PATCH v2] stubdom: add fine grained library config items to Mini-OS configs Date: Thu, 10 Oct 2024 13:19:46 +0200 Message-ID: <20241010111946.22173-1-jgross@suse.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 9A60121D7E X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.com:s=susede1]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; TO_DN_SOME(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:email,suse.com:dkim,suse.com:mid,imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; DKIM_TRACE(0.00)[suse.com:+] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1728559222576116600 Content-Type: text/plain; charset="utf-8" Today Mini-OS can only be configured to use all or none Xen library. In order to prepare a more fine grained configuration scheme, add per library config items to the Mini-OS config files. As some libraries pull in others, the config files need to be extended at build time to reflect those indirect library uses. Signed-off-by: Juergen Gross Reviewed-by: Anthony PERARD --- V2: - rename BUILD_config to GEN_CONFIG (Anthony PERARD) - rename generated config files to *.gen.cfg (Anthony PERARD) - don't write config data to file in make macro (Anthony PERARD) - remove no longer needed $(CURDIR)/ from prerequisites (Anthony PERARD) --- stubdom/.gitignore | 1 + stubdom/Makefile | 49 ++++++++++++++++++++++++++++++++++------------ 2 files changed, 38 insertions(+), 12 deletions(-) diff --git a/stubdom/.gitignore b/stubdom/.gitignore index 10e2547a22..23350446b9 100644 --- a/stubdom/.gitignore +++ b/stubdom/.gitignore @@ -1,3 +1,4 @@ +*.gen.cfg /*.tar.gz /*-minios-config.mk /autom4te.cache/ diff --git a/stubdom/Makefile b/stubdom/Makefile index f8c31fd35d..6ed4253b25 100644 --- a/stubdom/Makefile +++ b/stubdom/Makefile @@ -342,6 +342,14 @@ endef =20 $(foreach lib,$(STUB_LIBS),$(eval $(call BUILD_lib,$(lib)))) =20 +define GEN_config + (cat $< && \ + for i in $(sort $(APP_LIBS) $(call xenlibs-dependencies,$(APP_LIBS))); do= \ + u=3D`echo $$i | tr a-z A-Z`; \ + echo "CONFIG_LIBXEN$$u=3Dy"; \ + done) +endef + xenstore/stamp: $(XEN_ROOT)/tools/xenstored/Makefile.common $(do_links) =20 @@ -375,8 +383,12 @@ $(TARGETS_MINIOS): mini-os-%: # ioemu ####### =20 -ioemu-minios-config.mk: $(CURDIR)/ioemu-minios.cfg - MINIOS_CONFIG=3D"$<" CONFIG_FILE=3D"$(CURDIR)/$@" $(MAKE) DESTDIR=3D -C $= (MINI_OS) config +ioemu-minios.gen.cfg: APP_LIBS =3D evtchn gnttab ctrl guest +ioemu-minios.gen.cfg: ioemu-minios.cfg Makefile + $(GEN_config) >$@ + +ioemu-minios-config.mk: ioemu-minios.gen.cfg + MINIOS_CONFIG=3D"$(CURDIR)/$<" CONFIG_FILE=3D"$(CURDIR)/$@" $(MAKE) DESTD= IR=3D -C $(MINI_OS) config =20 .PHONY: ioemu ioemu: cross-zlib cross-libpci libxenguest ioemu-minios-config.mk @@ -437,8 +449,12 @@ grub-upstream: grub-$(GRUB_VERSION).tar.gz patch -d $@ -p1 < $$i || exit 1; \ done =20 -grub-$(XEN_TARGET_ARCH)-minios-config.mk: $(CURDIR)/grub/minios.cfg - MINIOS_CONFIG=3D"$<" CONFIG_FILE=3D"$(CURDIR)/$@" $(MAKE) DESTDIR=3D -C $= (MINI_OS) config +grub/minios.gen.cfg: APP_LIBS =3D guest ctrl toollog +grub/minios.gen.cfg: grub/minios.cfg Makefile + $(GEN_config) >$@ + +grub-$(XEN_TARGET_ARCH)-minios-config.mk: grub/minios.gen.cfg + MINIOS_CONFIG=3D"$(CURDIR)/$<" CONFIG_FILE=3D"$(CURDIR)/$@" $(MAKE) DESTD= IR=3D -C $(MINI_OS) config =20 .PHONY: grub grub: cross-polarssl grub-upstream $(CROSS_ROOT) grub-$(XEN_TARGET_ARCH)-m= inios-config.mk @@ -449,8 +465,12 @@ grub: cross-polarssl grub-upstream $(CROSS_ROOT) grub-= $(XEN_TARGET_ARCH)-minios- # xenstore ########## =20 -xenstore-minios-config.mk: $(CURDIR)/xenstore-minios.cfg - MINIOS_CONFIG=3D"$<" CONFIG_FILE=3D"$(CURDIR)/$@" $(MAKE) DESTDIR=3D -C $= (MINI_OS) config +xenstore-minios.gen.cfg: APP_LIBS =3D gnttab evtchn toollog ctrl +xenstore-minios.gen.cfg: xenstore-minios.cfg Makefile + $(GEN_config) >$@ + +xenstore-minios-config.mk: xenstore-minios.gen.cfg + MINIOS_CONFIG=3D"$(CURDIR)/$<" CONFIG_FILE=3D"$(CURDIR)/$@" $(MAKE) DESTD= IR=3D -C $(MINI_OS) config =20 .PHONY: xenstore xenstore: $(CROSS_ROOT) xenstore-minios-config.mk @@ -460,8 +480,12 @@ xenstore: $(CROSS_ROOT) xenstore-minios-config.mk # xenstorepvh ############# =20 -xenstorepvh-minios-config.mk: $(CURDIR)/xenstorepvh-minios.cfg - MINIOS_CONFIG=3D"$<" CONFIG_FILE=3D"$(CURDIR)/$@" $(MAKE) DESTDIR=3D -C $= (MINI_OS) config +xenstorepvh-minios.gen.cfg: APP_LIBS =3D gnttab evtchn toollog ctrl +xenstorepvh-minios.gen.cfg: xenstorepvh-minios.cfg Makefile + $(GEN_config) >$@ + +xenstorepvh-minios-config.mk: xenstorepvh-minios.gen.cfg + MINIOS_CONFIG=3D"$(CURDIR)/$<" CONFIG_FILE=3D"$(CURDIR)/$@" $(MAKE) DESTD= IR=3D -C $(MINI_OS) config =20 .PHONY: xenstorepvh xenstorepvh: $(CROSS_ROOT) xenstorepvh-minios-config.mk @@ -474,7 +498,7 @@ xenstorepvh: $(CROSS_ROOT) xenstorepvh-minios-config.mk .PHONY: ioemu-stubdom ioemu-stubdom: APP_OBJS=3D$(CURDIR)/ioemu/i386-stubdom/qemu.a $(CURDIR)/io= emu/i386-stubdom/libqemu.a $(CURDIR)/ioemu/libqemu_common.a ioemu-stubdom: mini-os-$(XEN_TARGET_ARCH)-ioemu lwip-$(XEN_TARGET_ARCH) li= bxenguest ioemu - DEF_CPPFLAGS=3D"$(TARGET_CPPFLAGS)" DEF_CFLAGS=3D"$(TARGET_CFLAGS)" DEF_L= DFLAGS=3D"$(TARGET_LDFLAGS)" MINIOS_CONFIG=3D"$(CURDIR)/ioemu-minios.cfg" $= (MAKE) DESTDIR=3D -C $(MINI_OS) OBJ_DIR=3D$(CURDIR)/$< LWIPDIR=3D$(CURDIR)/= lwip-$(XEN_TARGET_ARCH) APP_OBJS=3D"$(APP_OBJS)" + DEF_CPPFLAGS=3D"$(TARGET_CPPFLAGS)" DEF_CFLAGS=3D"$(TARGET_CFLAGS)" DEF_L= DFLAGS=3D"$(TARGET_LDFLAGS)" MINIOS_CONFIG=3D"$(CURDIR)/ioemu-minios.gen.cf= g" $(MAKE) DESTDIR=3D -C $(MINI_OS) OBJ_DIR=3D$(CURDIR)/$< LWIPDIR=3D$(CURD= IR)/lwip-$(XEN_TARGET_ARCH) APP_OBJS=3D"$(APP_OBJS)" =20 .PHONY: c-stubdom c-stubdom: mini-os-$(XEN_TARGET_ARCH)-c lwip-$(XEN_TARGET_ARCH) libxengues= t c @@ -490,7 +514,7 @@ vtpmmgr-stubdom: mini-os-$(XEN_TARGET_ARCH)-vtpmmgr vtp= mmgr =20 .PHONY: pv-grub pv-grub: mini-os-$(XEN_TARGET_ARCH)-grub libxenguest grub - DEF_CPPFLAGS=3D"$(TARGET_CPPFLAGS)" DEF_CFLAGS=3D"$(TARGET_CFLAGS)" DEF_L= DFLAGS=3D"$(TARGET_LDFLAGS)" MINIOS_CONFIG=3D"$(CURDIR)/grub/minios.cfg" $(= MAKE) DESTDIR=3D -C $(MINI_OS) OBJ_DIR=3D$(CURDIR)/$< APP_OBJS=3D$(CURDIR)/= grub-$(XEN_TARGET_ARCH)/main.a + DEF_CPPFLAGS=3D"$(TARGET_CPPFLAGS)" DEF_CFLAGS=3D"$(TARGET_CFLAGS)" DEF_L= DFLAGS=3D"$(TARGET_LDFLAGS)" MINIOS_CONFIG=3D"$(CURDIR)/grub/minios.gen.cfg= " $(MAKE) DESTDIR=3D -C $(MINI_OS) OBJ_DIR=3D$(CURDIR)/$< APP_OBJS=3D$(CURD= IR)/grub-$(XEN_TARGET_ARCH)/main.a =20 .PHONY: pv-grub-if-enabled ifneq ($(filter grub,$(STUBDOM_TARGETS)),) @@ -501,11 +525,11 @@ endif =20 .PHONY: xenstore-stubdom xenstore-stubdom: mini-os-$(XEN_TARGET_ARCH)-xenstore libxenguest xenstore - DEF_CPPFLAGS=3D"$(TARGET_CPPFLAGS)" DEF_CFLAGS=3D"$(TARGET_CFLAGS)" DEF_L= DFLAGS=3D"$(TARGET_LDFLAGS)" MINIOS_CONFIG=3D"$(CURDIR)/xenstore-minios.cfg= " $(MAKE) DESTDIR=3D -C $(MINI_OS) OBJ_DIR=3D$(CURDIR)/$< APP_OBJS=3D$(CURD= IR)/xenstore/xenstored.a + DEF_CPPFLAGS=3D"$(TARGET_CPPFLAGS)" DEF_CFLAGS=3D"$(TARGET_CFLAGS)" DEF_L= DFLAGS=3D"$(TARGET_LDFLAGS)" MINIOS_CONFIG=3D"$(CURDIR)/xenstore-minios.gen= .cfg" $(MAKE) DESTDIR=3D -C $(MINI_OS) OBJ_DIR=3D$(CURDIR)/$< APP_OBJS=3D$(= CURDIR)/xenstore/xenstored.a =20 .PHONY: xenstorepvh-stubdom xenstorepvh-stubdom: mini-os-$(XEN_TARGET_ARCH)-xenstorepvh libxenguest xe= nstorepvh - DEF_CPPFLAGS=3D"$(TARGET_CPPFLAGS)" DEF_CFLAGS=3D"$(TARGET_CFLAGS)" DEF_L= DFLAGS=3D"$(TARGET_LDFLAGS)" MINIOS_CONFIG=3D"$(CURDIR)/xenstorepvh-minios.= cfg" $(MAKE) DESTDIR=3D -C $(MINI_OS) OBJ_DIR=3D$(CURDIR)/$< APP_OBJS=3D$(C= URDIR)/xenstorepvh/xenstored.a + DEF_CPPFLAGS=3D"$(TARGET_CPPFLAGS)" DEF_CFLAGS=3D"$(TARGET_CFLAGS)" DEF_L= DFLAGS=3D"$(TARGET_LDFLAGS)" MINIOS_CONFIG=3D"$(CURDIR)/xenstorepvh-minios.= gen.cfg" $(MAKE) DESTDIR=3D -C $(MINI_OS) OBJ_DIR=3D$(CURDIR)/$< APP_OBJS= =3D$(CURDIR)/xenstorepvh/xenstored.a =20 ######### # install @@ -607,6 +631,7 @@ clean: rm -fr grub-$(XEN_TARGET_ARCH) rm -f $(STUBDOMPATH) rm -f *-minios-config.mk + rm -f *.gen.cfg rm -fr pkg-config -[ ! -d ioemu ] || $(MAKE) DESTDIR=3D -C ioemu clean -[ ! -d xenstore ] || $(MAKE) -f $(CURDIR)/xenlibs.mk -C xenstore clean --=20 2.43.0