Append a field to the x86-specific part of the communication region to
inform non-root cells about the number of CPUs they can expect to show
up during boot.
We can generalize this when ARM has a need as well, but it's more likely
that it will use device trees instead (which are underdeveloped on x86).
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
: generic part, see above : (lower address)
+------------------------------+
| PM Timer Address (16 bit) |
+ +------------------------------+
+ | Number of CPUs (16 bit) |
+------------------------------+ - higher address
int arch_cell_create(struct cell *cell)
{
+ unsigned int cpu;
int err;
err = vcpu_cell_init(cell);
cell->comm_page.comm_region.pm_timer_address =
system_config->platform_info.x86.pm_timer_address;
+ cell->comm_page.comm_region.num_cpus = 0;
+ for_each_cpu(cpu, cell->cpu_set)
+ cell->comm_page.comm_region.num_cpus++;
return 0;
COMM_REGION_GENERIC_HEADER;
__u16 pm_timer_address;
+ __u16 num_cpus;
};
static inline __u32 jailhouse_call(__u32 num)