From nobody Fri Nov 29 17:41:17 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=1633357199; cv=none; d=zohomail.com; s=zohoarc; b=fPxO9Zxqol/i8RmUYLZ7xNG89RPlu9D6AmwbwLtqsuW8oUZqLwjHUtSiW/d4vTPKf8nd4q1habbrNPidt1uU2djmGjHpd6joYA39xzqbnAMRvc+qr5/OcGQTHfFh3Bb0fxxOazUe01234yclaNUMiMfT5pIZL/c5ugE6pV12La0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1633357199; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=fH3DuqnGZJpT+DNy0zo8NCI7OWmYxQHUzvQItaNzehQ=; b=YT1iWaWjjy9IHZ5kiXTelmQZvuJHADZWkF0Z+kjI+xSGIv2LcpLst2nFMAslIyrhLNQ7iDUmEIDv9OnGnw/b1Zrndgkx/k4FTfAKbn3rygxRm48Nxta20+MoGCvBza9+VE2cfU5YjbkRwkPC9ubxiR58bKtRrLdikQU0zeQoZ8Q= 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 163335719985950.62624638947739; Mon, 4 Oct 2021 07:19:59 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.201542.356111 (Exim 4.92) (envelope-from ) id 1mXOol-0007xz-Cq; Mon, 04 Oct 2021 14:19:47 +0000 Received: by outflank-mailman (output) from mailman id 201542.356111; Mon, 04 Oct 2021 14:19:47 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mXOol-0007xq-9Z; Mon, 04 Oct 2021 14:19:47 +0000 Received: by outflank-mailman (input) for mailman id 201542; Mon, 04 Oct 2021 14:19:45 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mXOoj-0007UW-R5 for xen-devel@lists.xenproject.org; Mon, 04 Oct 2021 14:19:45 +0000 Received: from smtp-out2.suse.de (unknown [195.135.220.29]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id eb28ed18-8dd0-44f3-b308-9b2cd0eaf583; Mon, 04 Oct 2021 14:19:29 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 90F1820208; Mon, 4 Oct 2021 14:19:28 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 679A913AEF; Mon, 4 Oct 2021 14:19:28 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id gL4rGHANW2EjcAAAMHmgww (envelope-from ); Mon, 04 Oct 2021 14:19:28 +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: eb28ed18-8dd0-44f3-b308-9b2cd0eaf583 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1633357168; 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: in-reply-to:in-reply-to:references:references; bh=fH3DuqnGZJpT+DNy0zo8NCI7OWmYxQHUzvQItaNzehQ=; b=KNCxsc5Tvfa4QZzFM/Ijgv0HbzzfqF41gbC0lJPL8exwmbYrfbyQcKFCbChlwsQOHOmfre xity+WYdsZ2I0ZHUooPKjABuxS2xDWDPpygv/CWaILHvinmf1E1DXb1s4Ocwpfji83wJQ4 0koLcmspZmP2bLr067oGSw342JTVEEY= From: Juergen Gross To: minios-devel@lists.xenproject.org, xen-devel@lists.xenproject.org Cc: samuel.thibault@ens-lyon.org, wl@xen.org, Juergen Gross Subject: [PATCH 1/2] mini-os: fix testbuilds regarding CONFIG_XC Date: Mon, 4 Oct 2021 16:19:23 +0200 Message-Id: <20211004141924.7088-2-jgross@suse.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20211004141924.7088-1-jgross@suse.com> References: <20211004141924.7088-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1633357202122100001 Content-Type: text/plain; charset="utf-8" CONFIG_GC is requiring external support, so disable it in testbuilds. The only reason this is working right now is its usage being inside a HAVE_LIBC section. Make that more obvious by making the default setting of CONFIG_XC depending on libc being available. Signed-off-by: Juergen Gross Reviewed-by: Samuel Thibault --- Config.mk | 3 ++- arch/x86/testbuild/all-yes | 3 ++- arch/x86/testbuild/newxen-yes | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Config.mk b/Config.mk index 15311ef..8f4cea9 100644 --- a/Config.mk +++ b/Config.mk @@ -62,6 +62,7 @@ MINIOS_COMPILE_ARCH ?=3D $(shell uname -m | sed -e s/i= .86/x86_32/ \ MINIOS_TARGET_ARCH ?=3D $(MINIOS_COMPILE_ARCH) endif =20 +stubdom ?=3D n libc =3D $(stubdom) =20 XEN_INTERFACE_VERSION ?=3D 0x00030205 @@ -179,7 +180,6 @@ CONFIG-y +=3D CONFIG_FBFRONT CONFIG-y +=3D CONFIG_KBDFRONT CONFIG-y +=3D CONFIG_CONSFRONT CONFIG-y +=3D CONFIG_XENBUS -CONFIG-y +=3D CONFIG_XC CONFIG-n +=3D CONFIG_QEMU_XS_ARGS CONFIG-n +=3D CONFIG_TEST CONFIG-n +=3D CONFIG_PCIFRONT @@ -195,6 +195,7 @@ CONFIG-y +=3D CONFIG_PARAVIRT else CONFIG-n +=3D CONFIG_PARAVIRT endif +CONFIG-$(libc) +=3D CONFIG_XC CONFIG-$(lwip) +=3D CONFIG_LWIP =20 $(foreach i,$(CONFIG-y),$(eval $(i) ?=3D y)) diff --git a/arch/x86/testbuild/all-yes b/arch/x86/testbuild/all-yes index 8732e69..5464342 100644 --- a/arch/x86/testbuild/all-yes +++ b/arch/x86/testbuild/all-yes @@ -13,7 +13,8 @@ CONFIG_FBFRONT =3D y CONFIG_KBDFRONT =3D y CONFIG_CONSFRONT =3D y CONFIG_XENBUS =3D y -CONFIG_XC =3D y +# XC is special: it needs support from outside +CONFIG_XC =3D n # LWIP is special: it needs support from outside CONFIG_LWIP =3D n CONFIG_BALLOON =3D y diff --git a/arch/x86/testbuild/newxen-yes b/arch/x86/testbuild/newxen-yes index 9c30c00..2a3ed2e 100644 --- a/arch/x86/testbuild/newxen-yes +++ b/arch/x86/testbuild/newxen-yes @@ -13,7 +13,8 @@ CONFIG_FBFRONT =3D y CONFIG_KBDFRONT =3D y CONFIG_CONSFRONT =3D y CONFIG_XENBUS =3D y -CONFIG_XC =3D y +# XC is special: it needs support from outside +CONFIG_XC =3D n # LWIP is special: it needs support from outside CONFIG_LWIP =3D n CONFIG_BALLOON =3D y --=20 2.26.2 From nobody Fri Nov 29 17:41:17 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=1633357204; cv=none; d=zohomail.com; s=zohoarc; b=VdQzAJImx7QzJT0c5T9oybz3YqpdJuLz1TQhpvdjeORQ4teihHo9FLgslRnReawr70bHWPtmK5z4ltMeYjiUwb/qYRnw1/AChJ0DGcImbSB8N10YB7OK/962+yOx5Nceao8ZrcNdxYIXPI+PmdIOSScHNRRObQj7VTyYNI+qcmA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1633357204; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=y5GfRa8P1HM/l2d/V3JUY7JMhDq7I4DxXT7aS9qRvTY=; b=g5oVP7GPHq5o549KyuCRJQSssWfggj/Tqh5AdfkHAI8iGih2pkew3zT9H/zHicfhB9uu7lCqYayWZ8u174c08oo0XFSMaR4J6iHbDucXCqh6pTFybxB7NfvdnZA7j6MEXDjTjihw7U+f8JrcBtFmZ5Qx3A+BvO/7A4JMN+e649E= 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 1633357204797752.0002678830193; Mon, 4 Oct 2021 07:20:04 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.201543.356122 (Exim 4.92) (envelope-from ) id 1mXOoq-0008MK-Lf; Mon, 04 Oct 2021 14:19:52 +0000 Received: by outflank-mailman (output) from mailman id 201543.356122; Mon, 04 Oct 2021 14:19:52 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mXOoq-0008M8-IJ; Mon, 04 Oct 2021 14:19:52 +0000 Received: by outflank-mailman (input) for mailman id 201543; Mon, 04 Oct 2021 14:19:50 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mXOoo-0007UW-R6 for xen-devel@lists.xenproject.org; Mon, 04 Oct 2021 14:19:50 +0000 Received: from smtp-out2.suse.de (unknown [195.135.220.29]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id fea165a3-9fc8-4659-87e8-c3c3207b87ac; Mon, 04 Oct 2021 14:19:29 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id C11A320209; Mon, 4 Oct 2021 14:19:28 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 9662E13342; Mon, 4 Oct 2021 14:19:28 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id EBd+I3ANW2EjcAAAMHmgww (envelope-from ); Mon, 04 Oct 2021 14:19:28 +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: fea165a3-9fc8-4659-87e8-c3c3207b87ac DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1633357168; 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: in-reply-to:in-reply-to:references:references; bh=y5GfRa8P1HM/l2d/V3JUY7JMhDq7I4DxXT7aS9qRvTY=; b=W3eGR43ESS6dXdxEmY4LcCwF28K5utJUzvDFY9+A42Rt0U0pJy4aIE9Nv4P9mofsPdFDIQ hDOODF0d5Xk/l616m8UcyenxTdkMgfsiG7AnBveF/a3k/m2M/qMaWZJlS53ozqHhiqYgTv s2GzF6oqJniMQaDs8QGYmfaUngdCF3Y= From: Juergen Gross To: minios-devel@lists.xenproject.org, xen-devel@lists.xenproject.org Cc: samuel.thibault@ens-lyon.org, wl@xen.org, Juergen Gross Subject: [PATCH 2/2] mini-os: add config options for xen libraries Date: Mon, 4 Oct 2021 16:19:24 +0200 Message-Id: <20211004141924.7088-3-jgross@suse.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20211004141924.7088-1-jgross@suse.com> References: <20211004141924.7088-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1633357206672100001 Content-Type: text/plain; charset="utf-8" Today close hooks into libxenctrl, libxenevtchn and libxengnttab are under the CONFIG_XC umbrella. In order to support Mini-OS builds using stable Xen libraries only, add CONFIG_LIBXENCTRL, CONFIG_LIBXENEVTCHN and CONFIG_LIBXENGNTTAB config options. In case CONFIG_XC was specified in the Mini-OS config explicitly, set the three new variables to the specified value. Signed-off-by: Juergen Gross Reviewed-by: Samuel Thibault --- Config.mk | 7 ++++++- arch/x86/testbuild/all-no | 4 +++- arch/x86/testbuild/all-yes | 9 +++++---- arch/x86/testbuild/newxen-yes | 9 +++++---- lib/sys.c | 8 ++++++-- 5 files changed, 25 insertions(+), 12 deletions(-) diff --git a/Config.mk b/Config.mk index 8f4cea9..5e66089 100644 --- a/Config.mk +++ b/Config.mk @@ -195,7 +195,12 @@ CONFIG-y +=3D CONFIG_PARAVIRT else CONFIG-n +=3D CONFIG_PARAVIRT endif -CONFIG-$(libc) +=3D CONFIG_XC +# Support legacy CONFIG_XC value +CONFIG_XC ?=3D $(libc) +CONFIG-$(CONFIG_XC) +=3D CONFIG_LIBXENCTRL +CONFIG-$(CONFIG_XC) +=3D CONFIG_LIBXENEVTCHN +CONFIG-$(CONFIG_XC) +=3D CONFIG_LIBXENGNTTAB + CONFIG-$(lwip) +=3D CONFIG_LWIP =20 $(foreach i,$(CONFIG-y),$(eval $(i) ?=3D y)) diff --git a/arch/x86/testbuild/all-no b/arch/x86/testbuild/all-no index 1c50bba..7972ecd 100644 --- a/arch/x86/testbuild/all-no +++ b/arch/x86/testbuild/all-no @@ -13,7 +13,9 @@ CONFIG_FBFRONT =3D n CONFIG_KBDFRONT =3D n CONFIG_CONSFRONT =3D n CONFIG_XENBUS =3D n -CONFIG_XC =3D n +CONFIG_LIBXENCTRL =3D n +CONFIG_LIBXENEVTCHN =3D n +CONFIG_LIBXENGNTTAB =3D n CONFIG_LWIP =3D n CONFIG_BALLOON =3D n CONFIG_USE_XEN_CONSOLE =3D n diff --git a/arch/x86/testbuild/all-yes b/arch/x86/testbuild/all-yes index 5464342..bc8eea5 100644 --- a/arch/x86/testbuild/all-yes +++ b/arch/x86/testbuild/all-yes @@ -13,9 +13,10 @@ CONFIG_FBFRONT =3D y CONFIG_KBDFRONT =3D y CONFIG_CONSFRONT =3D y CONFIG_XENBUS =3D y -# XC is special: it needs support from outside -CONFIG_XC =3D n -# LWIP is special: it needs support from outside -CONFIG_LWIP =3D n CONFIG_BALLOON =3D y CONFIG_USE_XEN_CONSOLE =3D y +# The following are special: they need support from outside +CONFIG_LIBXENCTRL =3D n +CONFIG_LIBXENEVTCHN =3D n +CONFIG_LIBXENGNTTAB =3D n +CONFIG_LWIP =3D n diff --git a/arch/x86/testbuild/newxen-yes b/arch/x86/testbuild/newxen-yes index 2a3ed2e..f72123b 100644 --- a/arch/x86/testbuild/newxen-yes +++ b/arch/x86/testbuild/newxen-yes @@ -13,10 +13,11 @@ CONFIG_FBFRONT =3D y CONFIG_KBDFRONT =3D y CONFIG_CONSFRONT =3D y CONFIG_XENBUS =3D y -# XC is special: it needs support from outside -CONFIG_XC =3D n -# LWIP is special: it needs support from outside -CONFIG_LWIP =3D n CONFIG_BALLOON =3D y CONFIG_USE_XEN_CONSOLE =3D y XEN_INTERFACE_VERSION=3D__XEN_LATEST_INTERFACE_VERSION__ +# The following are special: they need support from outside +CONFIG_LIBXENCTRL =3D n +CONFIG_LIBXENEVTCHN =3D n +CONFIG_LIBXENGNTTAB =3D n +CONFIG_LWIP =3D n diff --git a/lib/sys.c b/lib/sys.c index c6a7b9f..e8d5eb2 100644 --- a/lib/sys.c +++ b/lib/sys.c @@ -437,13 +437,17 @@ int close(int fd) return res; } #endif -#ifdef CONFIG_XC +#ifdef CONFIG_LIBXENCTRL case FTYPE_XC: minios_interface_close_fd(fd); return 0; +#endif +#ifdef CONFIG_LIBXENEVTCHN case FTYPE_EVTCHN: minios_evtchn_close_fd(fd); return 0; +#endif +#ifdef CONFIG_LIBXENGNTTAB case FTYPE_GNTMAP: minios_gnttab_close_fd(fd); return 0; @@ -1373,7 +1377,7 @@ void *mmap(void *start, size_t length, int prot, int = flags, int fd, off_t offset =20 if (fd =3D=3D -1) return map_zero(n, 1); -#ifdef CONFIG_XC +#ifdef CONFIG_LIBXENCTRL else if (files[fd].type =3D=3D FTYPE_XC) { unsigned long zero =3D 0; return map_frames_ex(&zero, n, 0, 0, 1, DOMID_SELF, NULL, 0); --=20 2.26.2