From nobody Thu Oct 30 22:42:08 2025 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=1755268391; cv=none; d=zohomail.com; s=zohoarc; b=HoixBRZfWj+t4CQRF3kfBha6eP2LSfM9CrUgjQfJJXZH3oKU2rcPlvpiwkAFoH26ktePm4WoBbfZoxDfc720biAJe27tnoHmMnlitrBTMuy0TixkR1E2tZtRykzMRKNHL4W27t3cSso971miJtiNovE7ppq2774PPEx4u5zdHYg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1755268391; 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=KOHAGKcLsiksvIN2UqijmhF0goRfZGHcsts43BNRfMI=; b=FXVuiPblCC2BLCztz3nSI2ebmX9yWnNe+4s+w2TLnzKMV4gCPsP2nAndsSrbrzqVmE/ACRCcJQXWMk1VZY7pI1+7ceBiNxV9FO+bY7HLi9CnhvsjBjHTGXK5TwEpRvdDi/bXr/z6LIe720KnHDikBRYKFs6EYj0qCgNOpXIFxm0= 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 1755268391808319.6761731419498; Fri, 15 Aug 2025 07:33:11 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1083512.1443104 (Exim 4.92) (envelope-from ) id 1umvU7-0006Mm-FS; Fri, 15 Aug 2025 14:32:47 +0000 Received: by outflank-mailman (output) from mailman id 1083512.1443104; Fri, 15 Aug 2025 14:32: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 1umvU7-0006Mf-Bm; Fri, 15 Aug 2025 14:32:47 +0000 Received: by outflank-mailman (input) for mailman id 1083512; Fri, 15 Aug 2025 14:32:46 +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 1umvU6-0006MZ-ON for xen-devel@lists.xenproject.org; Fri, 15 Aug 2025 14:32:46 +0000 Received: from smtp-out1.suse.de (smtp-out1.suse.de [2a07:de40:b251:101:10:150:64:1]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id b238053a-79e4-11f0-b898-0df219b8e170; Fri, 15 Aug 2025 16:32:40 +0200 (CEST) Received: from imap1.dmz-prg2.suse.org (unknown [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 307342117A; Fri, 15 Aug 2025 14:32:39 +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 07A0F13876; Fri, 15 Aug 2025 14:32:39 +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 P8RvAAdFn2i2CAAAD6G6ig (envelope-from ); Fri, 15 Aug 2025 14:32:39 +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: b238053a-79e4-11f0-b898-0df219b8e170 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1755268359; 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=KOHAGKcLsiksvIN2UqijmhF0goRfZGHcsts43BNRfMI=; b=EXWXHiEBEln+uzyCBuZSJQ71sQjhvd3z1P8awJItuuhJlIDmvqOT0MljuQNwXTupA7zMwH l07nk7AxlDexDsO8cqgWOC3w0/991Ysr+lniVGo1/DdFm1MMxwm0LPpNeW4/PT6XnPQKqi jwoKUcs/fwRnOvNl2UrMvdI4QW6PJYs= Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1755268359; 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=KOHAGKcLsiksvIN2UqijmhF0goRfZGHcsts43BNRfMI=; b=EXWXHiEBEln+uzyCBuZSJQ71sQjhvd3z1P8awJItuuhJlIDmvqOT0MljuQNwXTupA7zMwH l07nk7AxlDexDsO8cqgWOC3w0/991Ysr+lniVGo1/DdFm1MMxwm0LPpNeW4/PT6XnPQKqi jwoKUcs/fwRnOvNl2UrMvdI4QW6PJYs= From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Anthony PERARD , Andrew Cooper Subject: [PATCH] tools/xl: hide xenstore-features behind option Date: Fri, 15 Aug 2025 16:32:36 +0200 Message-ID: <20250815143236.27641-1-jgross@suse.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[99.99%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-0.999]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:email,suse.com:mid,imap1.dmz-prg2.suse.org:helo]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FUZZY_RATELIMITED(0.00)[rspamd.com]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; RCPT_COUNT_THREE(0.00)[4]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO X-Spam-Score: -2.80 X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1755268393031116600 Content-Type: text/plain; charset="utf-8" In order to be able to use "xl info" before Xenstore has been started or after it has crashed, hide obtaining the available Xenstore features behind the new option "-x". Fixes: ecce7970cfe7 ("tools/xl: add available Xenstore features to xl info = output") Reported-by: Andrew Cooper Signed-off-by: Juergen Gross Acked-by: Anthony PERARD --- docs/man/xl.1.pod.in | 4 ++++ docs/man/xl.cfg.5.pod.in | 2 +- tools/xl/xl_info.c | 14 ++++++++++---- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/docs/man/xl.1.pod.in b/docs/man/xl.1.pod.in index fe38724b2b..88ccf7ad82 100644 --- a/docs/man/xl.1.pod.in +++ b/docs/man/xl.1.pod.in @@ -996,6 +996,10 @@ B =20 List host NUMA topology information =20 +=3Ditem B<-x>, B<--xenstore> + +Show Xenstore features available. + =3Dback =20 =3Ditem B diff --git a/docs/man/xl.cfg.5.pod.in b/docs/man/xl.cfg.5.pod.in index f0c920b39d..acff45d308 100644 --- a/docs/man/xl.cfg.5.pod.in +++ b/docs/man/xl.cfg.5.pod.in @@ -743,7 +743,7 @@ condition. =3Dback =20 The features supported by the running Xenstore instance can be retrieved -via the B command in dom0. +via the B command in dom0. =20 The default value is B<0xffffffff>, meaning that all possible Xenstore features are visible by the guest. diff --git a/tools/xl/xl_info.c b/tools/xl/xl_info.c index eb019e3ee9..d3583cbf8f 100644 --- a/tools/xl/xl_info.c +++ b/tools/xl/xl_info.c @@ -353,7 +353,7 @@ static void output_xenstore_info(void) xs_close(xsh); } =20 -static void print_info(int numa) +static void print_info(int numa, bool xs) { output_nodeinfo(); =20 @@ -365,7 +365,8 @@ static void print_info(int numa) } output_xeninfo(); =20 - output_xenstore_info(); + if (xs) + output_xenstore_info(); =20 maybe_printf("xend_config_format : 4\n"); =20 @@ -631,14 +632,19 @@ int main_info(int argc, char **argv) int opt; static struct option opts[] =3D { {"numa", 0, 0, 'n'}, + {"xenstore", 0, 0, 'x'}, COMMON_LONG_OPTS }; int numa =3D 0; + bool xs =3D false; =20 - SWITCH_FOREACH_OPT(opt, "n", opts, "info", 0) { + SWITCH_FOREACH_OPT(opt, "nx", opts, "info", 0) { case 'n': numa =3D 1; break; + case 'x': + xs =3D true; + break; } =20 /* @@ -648,7 +654,7 @@ int main_info(int argc, char **argv) if (numa =3D=3D 0 && argc > optind) info_name =3D argv[optind]; =20 - print_info(numa); + print_info(numa, xs); return 0; } =20 --=20 2.43.0