As mentioned before, copy the console to the communication region. Now the inmates is able to take the console definition from there, without having the need to define everything statically in mach.h
Signed-off-by: Ralf Ramsauer <[email protected]> --- hypervisor/control.c | 1 + include/jailhouse/hypercall.h | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hypervisor/control.c b/hypervisor/control.c index 1025852f..7d320841 100644 --- a/hypervisor/control.c +++ b/hypervisor/control.c @@ -481,6 +481,7 @@ static int cell_create(struct per_cpu *cpu_data, unsigned long config_address) sizeof(comm_region->signature)); comm_region->revision = COMM_REGION_ABI_REVISION; comm_region->cell_state = JAILHOUSE_CELL_SHUT_DOWN; + comm_region->console = cell->config->console; last = &root_cell; while (last->next) diff --git a/include/jailhouse/hypercall.h b/include/jailhouse/hypercall.h index 8d53be9e..c813c47e 100644 --- a/include/jailhouse/hypercall.h +++ b/include/jailhouse/hypercall.h @@ -39,6 +39,8 @@ #ifndef _JAILHOUSE_HYPERCALL_H #define _JAILHOUSE_HYPERCALL_H +#include <jailhouse/console.h> + #define JAILHOUSE_HC_DISABLE 0 #define JAILHOUSE_HC_CELL_CREATE 1 #define JAILHOUSE_HC_CELL_START 2 @@ -106,7 +108,9 @@ volatile __u32 reply_from_cell; \ /** \privatesection */ \ volatile __u32 padding; \ - /** \publicsection */ + /** \publicsection */ \ + /** Debug console that may be accessed by the inmate */ \ + struct jailhouse_console console; #include <asm/jailhouse_hypercall.h> -- 2.17.0 -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
