From nobody Mon Feb 9 19:52:49 2026 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=1691500977; cv=none; d=zohomail.com; s=zohoarc; b=heAJBKHLzju4BBhDR+vPjtu2xSrkrcluCG6EVbWlz9QlGkp1Hrg4WdpFZEMz0cZC2hrsUcjA3aDOFOwYqcHg6oNzwxB0dK8a1BNRCSToDsXTdmD2qm5hBSjK2aMz8JIcAtlN2QgQKADPjjlycLSMeg92Wayy5R84EvwS2HNh8Qc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1691500977; 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=K/AHDp091ry1sq7bDUAxHTIgZCYOG8/+0FTmesY5Vjg=; b=Q0ASD5YUvEaWHa4Vo21zDGTwnvihz3+QYeBNoptHI8rjYp07o0k8y1Dbg2ya0evYR6vz5ue9+OeOQ5jH3iJf/0zgr1Krrbcpc4IFyDWc9jarU2kptwqmkcB2qpafnjzy/nqUK+NfYN3/aVKo0QtIXcV8yC+keEiPKYuC/Ofp+zM= 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 1691500977332419.0174529150387; Tue, 8 Aug 2023 06:22:57 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.579860.908055 (Exim 4.92) (envelope-from ) id 1qTMfX-000510-Px; Tue, 08 Aug 2023 13:22:39 +0000 Received: by outflank-mailman (output) from mailman id 579860.908055; Tue, 08 Aug 2023 13:22:39 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qTMfX-00050s-Lr; Tue, 08 Aug 2023 13:22:39 +0000 Received: by outflank-mailman (input) for mailman id 579860; Tue, 08 Aug 2023 13:22:39 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qTMfX-0003ij-3a for xen-devel@lists.xenproject.org; Tue, 08 Aug 2023 13:22:39 +0000 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id a5282306-35ee-11ee-b280-6b7b168915f2; Tue, 08 Aug 2023 15:22:38 +0200 (CEST) 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-out1.suse.de (Postfix) with ESMTPS id 5B39821CC5; Tue, 8 Aug 2023 13:22:38 +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 23510139D1; Tue, 8 Aug 2023 13:22:38 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id nhv0Bp5B0mSqFAAAMHmgww (envelope-from ); Tue, 08 Aug 2023 13:22:38 +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: a5282306-35ee-11ee-b280-6b7b168915f2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1691500958; 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=K/AHDp091ry1sq7bDUAxHTIgZCYOG8/+0FTmesY5Vjg=; b=bWr3s96eU9z2EIZ5poVBpHPjBxsT1bl4L75UlatOE7GePtIEBAN/IdNR7Y4awTLjIjP2jG iPC/lSTST3X8whr7mx/habJlmb9N6ljaMNFgIMRS6QH/c4wKlPaRTZucEoVnIb4c4bEsik yCHTGz0gx/Ecv18DebFLC/hhRKbfo2A= From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Wei Liu , Anthony PERARD , Andrew Cooper Subject: [PATCH v2 3/3] tools/xl: reject bootloader=pygrub in case pygrub is disabled Date: Tue, 8 Aug 2023 15:22:19 +0200 Message-Id: <20230808132219.6422-4-jgross@suse.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230808132219.6422-1-jgross@suse.com> References: <20230808132219.6422-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1691501116937100001 Content-Type: text/plain; charset="utf-8" In case Xen has been configured with "--disable-pygrub", don't accept the domain config option "bootloader=3Dpygrub". Suggested-by: Andrew Cooper Signed-off-by: Juergen Gross Acked-by: Anthony PERARD --- V2: - new patch --- tools/xl/xl_parse.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/xl/xl_parse.c b/tools/xl/xl_parse.c index 1a5556d3bb..0e8c604bbf 100644 --- a/tools/xl/xl_parse.c +++ b/tools/xl/xl_parse.c @@ -1692,6 +1692,15 @@ void parse_config_data(const char *config_source, xlu_cfg_get_defbool(config, "acpi", &b_info->acpi, 0); =20 xlu_cfg_replace_string (config, "bootloader", &b_info->bootloader, 0); +#ifndef HAVE_PYGRUB + if (b_info->bootloader && + (!strcmp(b_info->bootloader, "pygrub") || + !strcmp(b_info->bootloader, "/usr/bin/pygrub"))) { + fprintf(stderr, "ERROR: this instance of Xen has been built withou= t support of \"pygrub\".\n"); + exit(-ERROR_FAIL); + } +#endif + switch (xlu_cfg_get_list_as_string_list(config, "bootloader_args", &b_info->bootloader_args, 1)) { case 0: --=20 2.35.3