Skip to contentSkip to conversation

xen/doc: Improve Dom0-less documentation

PATCH In review Viktor Mitin 2 participants 4 messages Jul 31, 2019

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 xen/doc: Improve Dom0-less documentation

- Changed unprintable characters with %s/\%xA0/ /g So all the spaces are 0x20 now.

- Added address-cells and size-cells to configuration example. This resolves the dom0less boot issue in case of arm64.

- Added some notes about xl tools usage in case of dom0less.

---
v4 updates:
- fixed cpus <1>;
- added memory size note;
- changed some numbers to decimal;

---
 docs/features/dom0less.pandoc | 61 ++++++++++++++++++++++++-----------
 1 file changed, 42 insertions(+), 19 deletions(-)
docs/features/dom0less.pandoc +42 -19
index e076e3739e..a2c95d1fd4 100644
@@ -40,8 +40,8 @@ to boot. For example if this is the bootcmd for Xen and Dom0:
 
     bootm 0x1400000 0x9000000 0x1280000
 
-If we want to add one DomU with Image-DomU as the DomU kernel
-and ramdisk-DomU as DomU ramdisk:
+If we want to add one DomU with Image-DomU as the DomU kernel
+and ramdisk-DomU as DomU ramdisk:
 
     tftpb 0x1280000 xen.dtb
     tftpb 0x80000 xen-Image
@@ -61,27 +61,32 @@ the presence of the additional VM and its configuration. It is done via
 device tree adding a node under /chosen as follows:
 
     domU1 {
-        compatible = "xen,domain";
-        memory = <0x20000>;
-        cpus = 1;
-        vpl011;
-
-        module@2000000 {
-            compatible = "multiboot,kernel", "multiboot,module";
-            reg = <0x2000000 0xffffff>;
-            bootargs = "console=ttyAMA0";
-        };
-
-        module@30000000 {
-            compatible = "multiboot,ramdisk", "multiboot,module";
-            reg = <0x3000000 0xffffff>;
-        };
+        #address-cells = <1>;
+        #size-cells = <1>;
+        compatible = "xen,domain";
+        memory = <0 524288>;
+        cpus = <1>;
+        vpl011;
+
+        module@2000000 {
+            compatible = "multiboot,kernel", "multiboot,module";
+            reg = <0x2000000 0xffffff>;
+            bootargs = "console=ttyAMA0";
+        };
+
+        module@30000000 {
+            compatible = "multiboot,ramdisk", "multiboot,module";
+            reg = <0x3000000 0xffffff>;
+        };
     };
 
-Where memory is the memory of the VM in KBs, cpus is the number of
-cpus. module@2000000 and module@3000000 advertise where the kernel and
+Where memory is the memory of the VM in KBs, cpus is the number of
+cpus. module@2000000 and module@3000000 advertise where the kernel and
 ramdisk are in memory.
 
+Note: the size specified should exactly match the size of the Kernel/initramfs.
+Otherwise, they may be unusable in Xen (for instance if they are compressed).
+
 See docs/misc/arm/device-tree/booting.txt for more information.
 
 Limitations
@@ -111,3 +116,21 @@ limitations:
   the Xen command line. The NULL scheduler automatically assigns and
   pins vCPUs to pCPUs, but the vCPU-pCPU assignments cannot be
   configured.
+
+Notes
+-----
+
+- 'xl console' command will not attach to the domain's console in case
+  of dom0less. DomU are domains created by Xen (similar to Dom0) and
+  therefore they are all managed by Xen and some of the commands may not work.
+
+  A user is allowed to configure the key sequence to switch input.
+  Pressing the Xen "conswitch" (Ctrl-A by default) three times
+  switches input in case of dom0less mode.
+
+- 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 setup DomU name, then you will have to create the xenstore
+  node associated. By default DomU names are shown as '(null)' in the
+  xl domains list.
+

--
2.17.1

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

#1 lore raw

Hi,

Quoted 47 lines · Viktor Mitin

- Changed unprintable characters with %s/\%xA0/ /g So all the spaces are 0x20 now.

- Added address-cells and size-cells to configuration example. This resolves the dom0less boot issue in case of arm64.

- Added some notes about xl tools usage in case of dom0less.

---
v4 updates:
- fixed cpus <1>;
- added memory size note;
- changed some numbers to decimal;

---
  docs/features/dom0less.pandoc | 61 ++++++++++++++++++++++++-----------
  1 file changed, 42 insertions(+), 19 deletions(-)
docs/features/dom0less.pandoc +2 -11
index e076e3739e..a2c95d1fd4 100644
@@ -40,8 +40,8 @@ to boot. For example if this is the bootcmd for Xen and Dom0:
 
      bootm 0x1400000 0x9000000 0x1280000
 
-If we want to add one DomU with Image-DomU as the DomU kernel
-and ramdisk-DomU as DomU ramdisk:
+If we want to add one DomU with Image-DomU as the DomU kernel
+and ramdisk-DomU as DomU ramdisk:
 
      tftpb 0x1280000 xen.dtb
      tftpb 0x80000 xen-Image
@@ -61,27 +61,32 @@ the presence of the additional VM and its configuration. It is done via
  device tree adding a node under /chosen as follows:
 
      domU1 {
-        compatible = "xen,domain";
-        memory = <0x20000>;
-        cpus = 1;
-        vpl011;
-
-        module@2000000 {
-            compatible = "multiboot,kernel", "multiboot,module";
-            reg = <0x2000000 0xffffff>;
-            bootargs = "console=ttyAMA0";

docs/features/dom0less.pandoc the presence of the additional VM and its configuration. It is done via · line 67

Quoted 10 lines
docs/features/dom0less.pandoc +4 -6
-        };
-
-        module@30000000 {
-            compatible = "multiboot,ramdisk", "multiboot,module";
-            reg = <0x3000000 0xffffff>;
-        };
+        #address-cells = <1>;
+        #size-cells = <1>;
+        compatible = "xen,domain";
+        memory = <0 524288>;

For a first, the new value does not match the old one (0x20000 = 131072 in decimal).

However, this does not makes much sense to describe the memory size in decimal here and ...

docs/features/dom0less.pandoc the presence of the additional VM and its configuration. It is done via · line 73

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

... here in hexadecimal. For memory, it is fairly common to use hexadecimal.

I can switch the memory property back to hexadecimal on commit. But I would like to understand why the value has changed before doing that.

Cheers,

Signature · 6 lines
Julien Grall

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

Hi,

Hi Julien,

Quoted 72 lines · Viktor Mitin
Quoted 47 lines

- Changed unprintable characters with %s/\%xA0/ /g So all the spaces are 0x20 now.

- Added address-cells and size-cells to configuration example. This resolves the dom0less boot issue in case of arm64.

- Added some notes about xl tools usage in case of dom0less.

---
v4 updates:
- fixed cpus <1>;
- added memory size note;
- changed some numbers to decimal;

---
  docs/features/dom0less.pandoc | 61 ++++++++++++++++++++++++-----------
  1 file changed, 42 insertions(+), 19 deletions(-)
docs/features/dom0less.pandoc +2 -11
index e076e3739e..a2c95d1fd4 100644
@@ -40,8 +40,8 @@ to boot. For example if this is the bootcmd for Xen and Dom0:
 
      bootm 0x1400000 0x9000000 0x1280000
 
-If we want to add one DomU with Image-DomU as the DomU kernel
-and ramdisk-DomU as DomU ramdisk:
+If we want to add one DomU with Image-DomU as the DomU kernel
+and ramdisk-DomU as DomU ramdisk:
 
      tftpb 0x1280000 xen.dtb
      tftpb 0x80000 xen-Image
@@ -61,27 +61,32 @@ the presence of the additional VM and its configuration. It is done via
  device tree adding a node under /chosen as follows:
 
      domU1 {
-        compatible = "xen,domain";
-        memory = <0x20000>;
-        cpus = 1;
-        vpl011;
-
-        module@2000000 {
-            compatible = "multiboot,kernel", "multiboot,module";
-            reg = <0x2000000 0xffffff>;
-            bootargs = "console=ttyAMA0";

docs/features/dom0less.pandoc the presence of the additional VM and its configuration. It is done via · line 67

Quoted 10 lines
docs/features/dom0less.pandoc +4 -6
-        };
-
-        module@30000000 {
-            compatible = "multiboot,ramdisk", "multiboot,module";
-            reg = <0x3000000 0xffffff>;
-        };
+        #address-cells = <1>;
+        #size-cells = <1>;
+        compatible = "xen,domain";
+        memory = <0 524288>;

For a first, the new value does not match the old one (0x20000 = 131072 in decimal).

However, this does not makes much sense to describe the memory size in decimal here and ...

docs/features/dom0less.pandoc the presence of the additional VM and its configuration. It is done via · line 73

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

... here in hexadecimal. For memory, it is fairly common to use hexadecimal.

I can switch the memory property back to hexadecimal on commit. But I would like to understand why the value has changed before doing that.

Ok, let's keep hexadecimal.
128Mb is ok in this example, I use 512Mb for my tests, so while testing this example I changed it and didn't restore.

This should be left untouched, as you mentioned. memory = <0x0 0x20000>;

Thanks

Quoted 5 lines

Cheers,

--
Julien Grall

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

Acked-by
#3 lore raw

Hi Viktor,

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

I can switch the memory property back to hexadecimal on commit. But I would like to understand why the value has changed before doing that.

Ok, let's keep hexadecimal.
128Mb is ok in this example, I use 512Mb for my tests, so while testing this example I changed it and didn't restore.

This should be left untouched, as you mentioned. memory = <0x0 0x20000>;

I will commit it soon. Thank you for the patch.

Cheers,

Signature · 6 lines
Julien Grall

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