Skip to contentSkip to conversation

Improve Dom0-less documentation

PATCH Superseded Viktor Mitin 2 participants 5 messages Jul 8, 2019 – Jul 9, 2019

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Improve Dom0-less documentation

Updated configuration example according to arm64
and added more cases about known xl limitations.

---
 docs/features/dom0less.pandoc | 29 +++++++++++++++++++++--------
 1 file changed, 21 insertions(+), 8 deletions(-)
docs/features/dom0less.pandoc +21 -8
index e076e3739e..961813696f 100644
@@ -62,19 +62,19 @@ device tree adding a node under /chosen as follows:
 
     domU1 {
         compatible = "xen,domain";
-        memory = <0x20000>;
+        memory = <0x0 0x20000>;
         cpus = 1;
         vpl011;
 
         module@2000000 {
             compatible = "multiboot,kernel", "multiboot,module";
-            reg = <0x2000000 0xffffff>;
+            reg = <0x0 0x2000000 0x0 0xffffff>;
             bootargs = "console=ttyAMA0";
         };
 
         module@30000000 {
             compatible = "multiboot,ramdisk", "multiboot,module";
-            reg = <0x3000000 0xffffff>;
+            reg = <0x0 0x3000000 0x0 0xffffff>;
         };
     };
 
@@ -90,12 +90,25 @@ Limitations
 Domains started by Xen at boot time currently have the following
 limitations:
 
-- They cannot be properly shutdown or rebooted using xl. If one of them
-  crashes, the whole platform should be rebooted.
-
 - Some xl operations might not work as expected. xl is meant to be used
-  with domains that have been created by it. Using xl with domains
-  started by Xen at boot might not work as expected.
+  with domains that have been created by it:
+
+    -> Using xl with domains started by Xen at boot might not work
+       as expected.
+
+    -> They cannot be properly shutdown or rebooted using xl.
+       If one of them crashes, the whole platform should be rebooted.
+
+    -> 'xl console' command will not switch console input.
+       Type 'CTRL-a' three times to switch input in case of dom0less mode.
+
+    -> 'xl list' prints the list of domains.
+       However DomU names are shown as '(null)' in the list. For example:
+
+        root@dom0:~# xl list
+        Name                         ID   Mem VCPUs      State   Time(s)
+        Domain-0                      0   256     4     r-----       6.2
+        (null)                        1   256     1     -b----       1.7
 
 - The GIC version is the native version. In absence of other
   information, the GIC version exposed to the domains started by Xen at
Signature · 7 lines
2.17.1


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#1 lore raw

Hello,

Quoted 2 lines · Viktor Mitin

Updated configuration example according to arm64
and added more cases about known xl limitations.

dom0less is not an arm64 specific feature. It also works on arm32, and therefore the docs should work for both cases. However...

Quoted 12 lines
---
  docs/features/dom0less.pandoc | 29 +++++++++++++++++++++--------
  1 file changed, 21 insertions(+), 8 deletions(-)
docs/features/dom0less.pandoc +0 -0
index e076e3739e..961813696f 100644
@@ -62,19 +62,19 @@ device tree adding a node under /chosen as follows:
 

docs/features/dom0less.pandoc device tree adding a node under /chosen as follows: · line 70

Quoted 10 lines
docs/features/dom0less.pandoc +2 -2
      domU1 {
          compatible = "xen,domain";
-        memory = <0x20000>;
+        memory = <0x0 0x20000>; >           cpus = 1;
          vpl011;
 
          module@2000000 {
              compatible = "multiboot,kernel", "multiboot,module";
-            reg = <0x2000000 0xffffff>;
+            reg = <0x0 0x2000000 0x0 0xffffff>;

... nothing on arm64 impose #address-cells = 2 and #size-cells = 2. The problem here is the two properties are missing in the node domU1.

Quoted 19 lines
docs/features/dom0less.pandoc +1 -5
              bootargs = "console=ttyAMA0";
          };
 
          module@30000000 {
              compatible = "multiboot,ramdisk", "multiboot,module";
-            reg = <0x3000000 0xffffff>;
+            reg = <0x0 0x3000000 0x0 0xffffff>;
          };
      };
 
@@ -90,12 +90,25 @@ Limitations
  Domains started by Xen at boot time currently have the following
  limitations:
 
-- They cannot be properly shutdown or rebooted using xl. If one of them
-  crashes, the whole platform should be rebooted.
-
  - Some xl operations might not work as expected. xl is meant to be used
-  with domains that have been created by it. Using xl with domains

docs/features/dom0less.pandoc Limitations · line 102

Quoted 10 lines
docs/features/dom0less.pandoc +9 -1
-  started by Xen at boot might not work as expected.
+  with domains that have been created by it:
+
+    -> Using xl with domains started by Xen at boot might not work
+       as expected.
+
+    -> They cannot be properly shutdown or rebooted using xl.
+       If one of them crashes, the whole platform should be rebooted.
+
+    -> 'xl console' command will not switch console input.

'xl console' does not switch input. The command will attach to the domain's console.

But I would not view this as a restriction, they are domains created by Xen (similar to Dom0) and therefore they are all managed by Xen and some of the commands may not work.

docs/features/dom0less.pandoc Limitations · line 103

Quoted 1 line
docs/features/dom0less.pandoc +1 -0
+       Type 'CTRL-a' three times to switch input in case of dom0less mod

This is confusing to read. You will switch input to the next "domain". This could be Xen or one of the domain.

Also, a user is allowed to configure the key sequence to switch input. So it would be better to write something like: "pressing the Xen "conswitch" (Ctrl-A by default) three times"

docs/features/dom0less.pandoc Limitations · line 106

Quoted 3 lines
docs/features/dom0less.pandoc +3 -0
+
+    -> 'xl list' prints the list of domains.
+       However DomU names are shown as '(null)' in the list. For example:

This is not specific to 'xl list'. Domains created by Xen will have no name at boot. Domain-0 has a name thanks to the helper xen-init-dom0 called at boot by the initscript.

If you want to have name here, then you will have to create the xenstore node associated.

docs/features/dom0less.pandoc Limitations · line 114

Quoted 9 lines
docs/features/dom0less.pandoc +5 -0
+
+        root@dom0:~# xl list
+        Name                         ID   Mem VCPUs      State   Time(s)
+        Domain-0                      0   256     4     r-----       6.2
+        (null)                        1   256     1     -b----       1.7
 
  - The GIC version is the native version. In absence of other
    information, the GIC version exposed to the domains started by Xen at

Cheers,

Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#2 lore raw
Quoted 2 lines · Julien Grall

Hello,

Hello Julien,

Quoted 8 lines · Viktor Mitin
Quoted 2 lines

Updated configuration example according to arm64
and added more cases about known xl limitations.

dom0less is not an arm64 specific feature. It also works on arm32, and therefore the docs should work for both cases. However...

There is one issue with it, please see below.

Quoted 18 lines
Quoted 18 lines
---
  docs/features/dom0less.pandoc | 29 +++++++++++++++++++++--------
  1 file changed, 21 insertions(+), 8 deletions(-)
docs/features/dom0less.pandoc +1 -1
index e076e3739e..961813696f 100644
@@ -62,19 +62,19 @@ device tree adding a node under /chosen as follows:
 
      domU1 {
          compatible = "xen,domain";
-        memory = <0x20000>;
+        memory = <0x0 0x20000>; >           cpus = 1;
          vpl011;
 
Quoted 7 lines

docs/features/dom0less.pandoc device tree adding a node under /chosen as follows: · line 71

Quoted 4 lines
docs/features/dom0less.pandoc +1 -1
          module@2000000 {
              compatible = "multiboot,kernel", "multiboot,module";
-            reg = <0x2000000 0xffffff>;
+            reg = <0x0 0x2000000 0x0 0xffffff>;

... nothing on arm64 impose #address-cells = 2 and #size-cells = 2. The problem here is the two properties are missing in the node domU1.

The next issue was observed with arm64 (arm32 was not tested). The reg properties inside 'module' nodes are ok either with additional '0x0' or with #address-cells = 2 and #size-cells = 2.

However, the 'memory' property does not work without additional '0x0' and #address-cells = 2 and #size-cells = 2 don't affect it. The next code fails without '0x0'. This was the reason why I added '0x0' and not #address-cells = 2 and #size-cells = 2. Now it is clear that we need to use
#address-cells and #size-cells anyway, however, I'm not sure about memory property.
Should it be with extra zero anyway for both cases arm32 and arm64?

memory = <0x0 0x20000>;

    rc = dt_property_read_u64(node, "memory", &mem);
    if ( !rc )
    {
        printk("Error building DomU: cannot read \"memory\" property\n");
        return -EINVAL;
    }
Quoted 37 lines
Quoted 19 lines
docs/features/dom0less.pandoc +1 -5
              bootargs = "console=ttyAMA0";
          };
 
          module@30000000 {
              compatible = "multiboot,ramdisk", "multiboot,module";
-            reg = <0x3000000 0xffffff>;
+            reg = <0x0 0x3000000 0x0 0xffffff>;
          };
      };
 
@@ -90,12 +90,25 @@ Limitations
  Domains started by Xen at boot time currently have the following
  limitations:
 
-- They cannot be properly shutdown or rebooted using xl. If one of them
-  crashes, the whole platform should be rebooted.
-
  - Some xl operations might not work as expected. xl is meant to be used
-  with domains that have been created by it. Using xl with domains

docs/features/dom0less.pandoc Limitations · line 102

Quoted 10 lines
docs/features/dom0less.pandoc +9 -1
-  started by Xen at boot might not work as expected.
+  with domains that have been created by it:
+
+    -> Using xl with domains started by Xen at boot might not work
+       as expected.
+
+    -> They cannot be properly shutdown or rebooted using xl.
+       If one of them crashes, the whole platform should be rebooted.
+
+    -> 'xl console' command will not switch console input.

'xl console' does not switch input. The command will attach to the domain's console.

But I would not view this as a restriction, they are domains created by Xen (similar to Dom0) and therefore they are all managed by Xen and some of the commands may not work.

Quoted 9 lines

docs/features/dom0less.pandoc Limitations · line 103

Quoted 1 line
docs/features/dom0less.pandoc +1 -0
+       Type 'CTRL-a' three times to switch input in case of dom0less mod

This is confusing to read. You will switch input to the next "domain". This could be Xen or one of the domain.

Also, a user is allowed to configure the key sequence to switch input. So it would be better to write something like: "pressing the Xen "conswitch" (Ctrl-A by default) three times"

Ok, I will add new section 'Notes' with this information if no objections.

Quoted 11 lines

docs/features/dom0less.pandoc Limitations · line 106

Quoted 3 lines
docs/features/dom0less.pandoc +3 -0
+
+    -> 'xl list' prints the list of domains.
+       However DomU names are shown as '(null)' in the list. For example:

This is not specific to 'xl list'. Domains created by Xen will have no name at boot. Domain-0 has a name thanks to the helper xen-init-dom0 called at boot by the initscript.

If you want to have name here, then you will have to create the xenstore node associated.

Will put this information to notes section as well.

Quoted 6 lines
Quoted 6 lines
docs/features/dom0less.pandoc +5 -0
+
+        root@dom0:~# xl list
+        Name                         ID   Mem VCPUs      State   Time(s)
+        Domain-0                      0   256     4     r-----       6.2
+        (null)                        1   256     1     -b----       1.7
 
Quoted 8 lines

docs/features/dom0less.pandoc Limitations · line 114

Quoted 3 lines
docs/features/dom0less.pandoc +0 -0
  - The GIC version is the native version. In absence of other
    information, the GIC version exposed to the domains started by Xen at

Cheers,

--
Julien Grall

Thanks

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#3 lore raw

Hi,

Quoted 54 lines · Viktor Mitin
Quoted 2 lines · Julien Grall

Hello,

Hello Julien,

Quoted 8 lines · Viktor Mitin
Quoted 2 lines

Updated configuration example according to arm64
and added more cases about known xl limitations.

dom0less is not an arm64 specific feature. It also works on arm32, and therefore the docs should work for both cases. However...

There is one issue with it, please see below.

Quoted 18 lines
Quoted 18 lines
---
   docs/features/dom0less.pandoc | 29 +++++++++++++++++++++--------
   1 file changed, 21 insertions(+), 8 deletions(-)
docs/features/dom0less.pandoc +1 -1
index e076e3739e..961813696f 100644
@@ -62,19 +62,19 @@ device tree adding a node under /chosen as follows:
 
       domU1 {
           compatible = "xen,domain";
-        memory = <0x20000>;
+        memory = <0x0 0x20000>; >           cpus = 1;
           vpl011;
 
Quoted 7 lines

docs/features/dom0less.pandoc device tree adding a node under /chosen as follows: · line 71

Quoted 4 lines
docs/features/dom0less.pandoc +1 -1
           module@2000000 {
               compatible = "multiboot,kernel", "multiboot,module";
-            reg = <0x2000000 0xffffff>;
+            reg = <0x0 0x2000000 0x0 0xffffff>;

... nothing on arm64 impose #address-cells = 2 and #size-cells = 2. The problem here is the two properties are missing in the node domU1.

The next issue was observed with arm64 (arm32 was not tested). The reg properties inside 'module' nodes are ok either with additional '0x0' or with #address-cells = 2 and #size-cells = 2.

However, the 'memory' property does not work without additional '0x0' and #address-cells = 2 and #size-cells = 2 don't affect it. The next code fails without '0x0'. This was the reason why I added '0x0' and not #address-cells = 2 and #size-cells = 2. Now it is clear that we need to use
#address-cells and #size-cells anyway, however, I'm not sure about memory property.
Should it be with extra zero anyway for both cases arm32 and arm64?

Quoted 1 line

memory = <0x0 0x20000>;

Per the documentation (docs/misc/arm/device-tree/booting.txt):

"- memory

A 64-bit integer specifying the amount of kilobytes of RAM to allocate to the guest.
"

So memory is always a 64-bit integer and therefore is described using 2 cells.

Cheers,

Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#4 lore raw

Hi,

Quoted 62 lines · Julien Grall

Hi,

Quoted 54 lines · Viktor Mitin
Quoted 2 lines · Julien Grall

Hello,

Hello Julien,

Quoted 8 lines · Viktor Mitin
Quoted 2 lines

Updated configuration example according to arm64
and added more cases about known xl limitations.

dom0less is not an arm64 specific feature. It also works on arm32, and therefore the docs should work for both cases. However...

There is one issue with it, please see below.

Quoted 18 lines
Quoted 18 lines
---
   docs/features/dom0less.pandoc | 29 +++++++++++++++++++++--------
   1 file changed, 21 insertions(+), 8 deletions(-)
docs/features/dom0less.pandoc +1 -1
index e076e3739e..961813696f 100644
@@ -62,19 +62,19 @@ device tree adding a node under /chosen as follows:
 
       domU1 {
           compatible = "xen,domain";
-        memory = <0x20000>;
+        memory = <0x0 0x20000>; >           cpus = 1;
           vpl011;
 
Quoted 7 lines

docs/features/dom0less.pandoc device tree adding a node under /chosen as follows: · line 71

Quoted 4 lines
docs/features/dom0less.pandoc +1 -1
           module@2000000 {
               compatible = "multiboot,kernel", "multiboot,module";
-            reg = <0x2000000 0xffffff>;
+            reg = <0x0 0x2000000 0x0 0xffffff>;

... nothing on arm64 impose #address-cells = 2 and #size-cells = 2. The problem here is the two properties are missing in the node domU1.

The next issue was observed with arm64 (arm32 was not tested). The reg properties inside 'module' nodes are ok either with additional '0x0' or with #address-cells = 2 and #size-cells = 2.

However, the 'memory' property does not work without additional '0x0' and #address-cells = 2 and #size-cells = 2 don't affect it. The next code fails without '0x0'. This was the reason why I added '0x0' and not #address-cells = 2 and #size-cells = 2. Now it is clear that we need to use
#address-cells and #size-cells anyway, however, I'm not sure about memory property.
Should it be with extra zero anyway for both cases arm32 and arm64?

Quoted 1 line

memory = <0x0 0x20000>;

Per the documentation (docs/misc/arm/device-tree/booting.txt):

Quoted 8 lines

"- memory

A 64-bit integer specifying the amount of kilobytes of RAM to allocate to the guest.
"

So memory is always a 64-bit integer and therefore is described using 2 cells.

Clear. Will change memory property in example to be with extra 0x0.

Thanks

Quoted 4 lines

Cheers,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel