Skip to contentSkip to conversation

tools/xl: hide xenstore-features behind option

PATCH In review Juergen Gross 5 participants 8 messages Aug 15, 2025 – Aug 22, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/xl: hide xenstore-features behind option

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")
---
 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(-)
docs/man/xl.1.pod.in +4 -0
index fe38724b2b..88ccf7ad82 100644
@@ -996,6 +996,10 @@ B<OPTIONS>
 
 List host NUMA topology information
 
+=item B<-x>, B<--xenstore>
+
+Show Xenstore features available.
+
 =back
 
 =item B<top>
docs/man/xl.cfg.5.pod.in +1 -1
index f0c920b39d..acff45d308 100644
@@ -743,7 +743,7 @@ condition.
 =back
 
 The features supported by the running Xenstore instance can be retrieved
-via the B<xl info> command in dom0.
+via the B<xl info -x> command in dom0.
 
 The default value is B<0xffffffff>, meaning that all possible Xenstore
 features are visible by the guest.
tools/xl/xl_info.c +10 -4
index eb019e3ee9..d3583cbf8f 100644
@@ -353,7 +353,7 @@ static void output_xenstore_info(void)
     xs_close(xsh);
 }
 
-static void print_info(int numa)
+static void print_info(int numa, bool xs)
 {
     output_nodeinfo();
 
@@ -365,7 +365,8 @@ static void print_info(int numa)
     }
     output_xeninfo();
 
-    output_xenstore_info();
+    if (xs)
+        output_xenstore_info();
 
     maybe_printf("xend_config_format     : 4\n");
 
@@ -631,14 +632,19 @@ int main_info(int argc, char **argv)
     int opt;
     static struct option opts[] = {
         {"numa", 0, 0, 'n'},
+        {"xenstore", 0, 0, 'x'},
         COMMON_LONG_OPTS
     };
     int numa = 0;
+    bool xs = false;
 
-    SWITCH_FOREACH_OPT(opt, "n", opts, "info", 0) {
+    SWITCH_FOREACH_OPT(opt, "nx", opts, "info", 0) {
     case 'n':
         numa = 1;
         break;
+    case 'x':
+        xs = true;
+        break;
     }
 
     /*
@@ -648,7 +654,7 @@ int main_info(int argc, char **argv)
     if (numa == 0 && argc > optind)
         info_name = argv[optind];
 
-    print_info(numa);
+    print_info(numa, xs);
     return 0;
 }
 
Signature · 1 line
2.43.0
#1 lore raw

+ Release Manager

Quoted 94 lines · Juergen Gross

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")
---
  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(-)
docs/man/xl.1.pod.in +4 -0
index fe38724b2b..88ccf7ad82 100644
@@ -996,6 +996,10 @@ B<OPTIONS>
 
  List host NUMA topology information
 
+=item B<-x>, B<--xenstore>
+
+Show Xenstore features available.
+
  =back
 
  =item B<top>
docs/man/xl.cfg.5.pod.in +1 -1
index f0c920b39d..acff45d308 100644
@@ -743,7 +743,7 @@ condition.
  =back
 
  The features supported by the running Xenstore instance can be retrieved
-via the B<xl info> command in dom0.
+via the B<xl info -x> command in dom0.
 
  The default value is B<0xffffffff>, meaning that all possible Xenstore
  features are visible by the guest.
tools/xl/xl_info.c +10 -4
index eb019e3ee9..d3583cbf8f 100644
@@ -353,7 +353,7 @@ static void output_xenstore_info(void)
      xs_close(xsh);
  }
 
-static void print_info(int numa)
+static void print_info(int numa, bool xs)
  {
      output_nodeinfo();
 
@@ -365,7 +365,8 @@ static void print_info(int numa)
      }
      output_xeninfo();
 
-    output_xenstore_info();
+    if (xs)
+        output_xenstore_info();
 
      maybe_printf("xend_config_format     : 4\n");
 
@@ -631,14 +632,19 @@ int main_info(int argc, char **argv)
      int opt;
      static struct option opts[] = {
          {"numa", 0, 0, 'n'},
+        {"xenstore", 0, 0, 'x'},
          COMMON_LONG_OPTS
      };
      int numa = 0;
+    bool xs = false;
 
-    SWITCH_FOREACH_OPT(opt, "n", opts, "info", 0) {
+    SWITCH_FOREACH_OPT(opt, "nx", opts, "info", 0) {
      case 'n':
          numa = 1;
          break;
+    case 'x':
+        xs = true;
+        break;
      }
 
      /*
@@ -648,7 +654,7 @@ int main_info(int argc, char **argv)
      if (numa == 0 && argc > optind)
          info_name = argv[optind];
 
-    print_info(numa);
+    print_info(numa, xs);
      return 0;
  }
 
#2 lore raw
Quoted 1 line · Juergen Gross

+ Release Manager

While this surely doesn't hurt, my understanding is that bug fixes don't require release-acks just yet.

Jan

Quoted 96 lines · Juergen Gross
Quoted 94 lines

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")
---
  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(-)
docs/man/xl.1.pod.in +4 -0
index fe38724b2b..88ccf7ad82 100644
@@ -996,6 +996,10 @@ B<OPTIONS>
 
  List host NUMA topology information
 
+=item B<-x>, B<--xenstore>
+
+Show Xenstore features available.
+
  =back
 
  =item B<top>
docs/man/xl.cfg.5.pod.in +1 -1
index f0c920b39d..acff45d308 100644
@@ -743,7 +743,7 @@ condition.
  =back
 
  The features supported by the running Xenstore instance can be retrieved
-via the B<xl info> command in dom0.
+via the B<xl info -x> command in dom0.
 
  The default value is B<0xffffffff>, meaning that all possible Xenstore
  features are visible by the guest.
tools/xl/xl_info.c +10 -4
index eb019e3ee9..d3583cbf8f 100644
@@ -353,7 +353,7 @@ static void output_xenstore_info(void)
      xs_close(xsh);
  }
 
-static void print_info(int numa)
+static void print_info(int numa, bool xs)
  {
      output_nodeinfo();
 
@@ -365,7 +365,8 @@ static void print_info(int numa)
      }
      output_xeninfo();
 
-    output_xenstore_info();
+    if (xs)
+        output_xenstore_info();
 
      maybe_printf("xend_config_format     : 4\n");
 
@@ -631,14 +632,19 @@ int main_info(int argc, char **argv)
      int opt;
      static struct option opts[] = {
          {"numa", 0, 0, 'n'},
+        {"xenstore", 0, 0, 'x'},
          COMMON_LONG_OPTS
      };
      int numa = 0;
+    bool xs = false;
 
-    SWITCH_FOREACH_OPT(opt, "n", opts, "info", 0) {
+    SWITCH_FOREACH_OPT(opt, "nx", opts, "info", 0) {
      case 'n':
          numa = 1;
          break;
+    case 'x':
+        xs = true;
+        break;
      }
 
      /*
@@ -648,7 +654,7 @@ int main_info(int argc, char **argv)
      if (numa == 0 && argc > optind)
          info_name = argv[optind];
 
-    print_info(numa);
+    print_info(numa, xs);
      return 0;
  }
 
#3 lore raw
Quoted 4 lines · Jan Beulich
Quoted 1 line · Juergen Gross

+ Release Manager

While this surely doesn't hurt, my understanding is that bug fixes don't require release-acks just yet.

Yes, your understanding is correct.

~ Oleksii

Quoted 95 lines
Quoted 95 lines · Juergen Gross
Quoted 94 lines

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")
---
   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(-)
docs/man/xl.1.pod.in +4 -0
index fe38724b2b..88ccf7ad82 100644
@@ -996,6 +996,10 @@ B<OPTIONS>
 
   List host NUMA topology information
 
+=item B<-x>, B<--xenstore>
+
+Show Xenstore features available.
+
   =back
 
   =item B<top>
docs/man/xl.cfg.5.pod.in +1 -1
index f0c920b39d..acff45d308 100644
@@ -743,7 +743,7 @@ condition.
   =back
 
   The features supported by the running Xenstore instance can be retrieved
-via the B<xl info> command in dom0.
+via the B<xl info -x> command in dom0.
 
   The default value is B<0xffffffff>, meaning that all possible Xenstore
   features are visible by the guest.
tools/xl/xl_info.c +10 -4
index eb019e3ee9..d3583cbf8f 100644
@@ -353,7 +353,7 @@ static void output_xenstore_info(void)
       xs_close(xsh);
   }
 
-static void print_info(int numa)
+static void print_info(int numa, bool xs)
   {
       output_nodeinfo();
 
@@ -365,7 +365,8 @@ static void print_info(int numa)
       }
       output_xeninfo();
 
-    output_xenstore_info();
+    if (xs)
+        output_xenstore_info();
 
       maybe_printf("xend_config_format     : 4\n");
 
@@ -631,14 +632,19 @@ int main_info(int argc, char **argv)
       int opt;
       static struct option opts[] = {
           {"numa", 0, 0, 'n'},
+        {"xenstore", 0, 0, 'x'},
           COMMON_LONG_OPTS
       };
       int numa = 0;
+    bool xs = false;
 
-    SWITCH_FOREACH_OPT(opt, "n", opts, "info", 0) {
+    SWITCH_FOREACH_OPT(opt, "nx", opts, "info", 0) {
       case 'n':
           numa = 1;
           break;
+    case 'x':
+        xs = true;
+        break;
       }
 
       /*
@@ -648,7 +654,7 @@ int main_info(int argc, char **argv)
       if (numa == 0 && argc > optind)
           info_name = argv[optind];
 
-    print_info(numa);
+    print_info(numa, xs);
       return 0;
   }
 
#4 lore raw
In reply to Juergen Gross
Quoted 7 lines · Juergen Gross

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")

Probably ought to be Reported-by Ross Lagerwall.  He did all the hard work debugging this; I just insisted that the conversation move onto Matrix.

For the change itself, Reviewed-by: Andrew Cooper
<[email protected]>

#5 lore raw
Quoted 9 lines · Andrew Cooper
Quoted 7 lines · Juergen Gross

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")
Quoted 5 lines

Probably ought to be Reported-by Ross Lagerwall.  He did all the hard work debugging this; I just insisted that the conversation move onto Matrix.

For the change itself, Reviewed-by: Andrew Cooper
<[email protected]>

Thanks.

Should I send V2 with the "Reported-by" corrected, or can this be done when committing?

Juergen

#6 lore raw
Quoted 15 lines · Jürgen Groß
Quoted 14 lines · Andrew Cooper
Quoted 8 lines · Juergen Gross

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")

Probably ought to be Reported-by Ross Lagerwall.  He did all the hard work debugging this; I just insisted that the conversation move onto Matrix.

Quoted 7 lines
Quoted 2 lines

For the change itself, Reviewed-by: Andrew Cooper
<[email protected]>

Thanks.

Should I send V2 with the "Reported-by" corrected, or can this be done when committing?

Happy to fix on commit.

~Andrew

#7 lore raw
Quoted 19 lines · Andrew Cooper
Quoted 18 lines · Jürgen Groß
Quoted 16 lines · Andrew Cooper
Quoted 8 lines · Juergen Gross

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")

Probably ought to be Reported-by Ross Lagerwall.  He did all the hard work debugging this; I just insisted that the conversation move onto Matrix.

For the change itself, Reviewed-by: Andrew Cooper
<[email protected]>

Quoted 6 lines
Quoted 4 lines

Thanks.

Should I send V2 with the "Reported-by" corrected, or can this be done when committing?

Happy to fix on commit.

Thanks,

Signature · 1 line
Anthony PERARD