1Boot time cpupools
2==================
3
4When BOOT_TIME_CPUPOOLS is enabled in the Xen configuration, it is possible to
5create cpupools during boot phase by specifying them in the device tree.
6ACPI is not supported for this feature.
7
8Cpupools specification nodes shall be direct childs of /chosen node.
9Each cpupool node contains the following properties:
10
11- compatible (mandatory)
12
13    Must always include the compatiblity string: "xen,cpupool".
14
15- cpupool-cpus (mandatory)
16
17    Must be a list of device tree phandle to nodes describing cpus (e.g. having
18    device_type = "cpu"), it can't be empty.
19
20- cpupool-sched (optional)
21
22    Must be a string having the name of a Xen scheduler. Check the sched=<...>
23    boot argument for allowed values [1]. When this property is omitted, the Xen
24    default scheduler will be used.
25
26
27Constraints
28===========
29
30If no cpupools are specified, all cpus will be assigned to one cpupool
31implicitly created (Pool-0).
32
33If cpupools node are specified, but not every cpu brought up by Xen is assigned,
34all the not assigned cpu will be assigned to an additional cpupool.
35
36If a cpu is assigned to a cpupool, but it's not brought up correctly, Xen will
37stop.
38
39The boot cpu must be assigned to Pool-0, so the cpupool containing that core
40will become Pool-0 automatically.
41
42
43Examples
44========
45
46A system having two types of core, the following device tree specification will
47instruct Xen to have two cpupools:
48
49- The cpupool described by node cpupool_a will have 4 cpus assigned.
50- The cpupool described by node cpupool_b will have 2 cpus assigned.
51
52The following example can work only if hmp-unsafe=1 is passed to Xen boot
53arguments, otherwise not all cores will be brought up by Xen and the cpupool
54creation process will stop Xen.
55
56
57a72_1: cpu@0 {
58        compatible = "arm,cortex-a72";
59        reg = <0x0 0x0>;
60        device_type = "cpu";
61        [...]
62};
63
64a72_2: cpu@1 {
65        compatible = "arm,cortex-a72";
66        reg = <0x0 0x1>;
67        device_type = "cpu";
68        [...]
69};
70
71a53_1: cpu@100 {
72        compatible = "arm,cortex-a53";
73        reg = <0x0 0x100>;
74        device_type = "cpu";
75        [...]
76};
77
78a53_2: cpu@101 {
79        compatible = "arm,cortex-a53";
80        reg = <0x0 0x101>;
81        device_type = "cpu";
82        [...]
83};
84
85a53_3: cpu@102 {
86        compatible = "arm,cortex-a53";
87        reg = <0x0 0x102>;
88        device_type = "cpu";
89        [...]
90};
91
92a53_4: cpu@103 {
93        compatible = "arm,cortex-a53";
94        reg = <0x0 0x103>;
95        device_type = "cpu";
96        [...]
97};
98
99chosen {
100
101    cpupool_a {
102        compatible = "xen,cpupool";
103        cpupool-cpus = <&a53_1 &a53_2 &a53_3 &a53_4>;
104    };
105    cpupool_b {
106        compatible = "xen,cpupool";
107        cpupool-cpus = <&a72_1 &a72_2>;
108        cpupool-sched = "credit2";
109    };
110
111    [...]
112
113};
114
115
116A system having the cpupools specification below will instruct Xen to have three
117cpupools:
118
119- The cpupool described by node cpupool_a will have 2 cpus assigned.
120- The cpupool described by node cpupool_b will have 2 cpus assigned.
121- An additional cpupool will be created, having 2 cpus assigned (created by Xen
122  with all the unassigned cpus a53_3 and a53_4).
123
124chosen {
125
126    cpupool_a {
127        compatible = "xen,cpupool";
128        cpupool-cpus = <&a53_1 &a53_2>;
129    };
130    cpupool_b {
131        compatible = "xen,cpupool";
132        cpupool-cpus = <&a72_1 &a72_2>;
133        cpupool-sched = "null";
134    };
135
136    [...]
137
138};
139
140[1] docs/misc/xen-command-line.pandoc
141