diff --git a/so3/Kbuild b/so3/Kbuild index fcea8718a..ada451f71 100644 --- a/so3/Kbuild +++ b/so3/Kbuild @@ -6,8 +6,8 @@ syscall-files = include/generated/syscall_table.h.in syscall-files += include/generated/syscall_number.h -syscall-script = scripts/syscall_gen.sh -syscall-src = syscall.tbl arch/$(SRCARCH)/syscall.h.in +syscall-script = $(srctree)/scripts/syscall_gen.sh +syscall-src = $(srctree)/syscall.tbl $(srctree)/arch/$(SRCARCH)/syscall.h.in quiet_cmd_syscall_gen = GEN $@ cmd_syscall_gen = $(syscall-script) $(syscall-src) $(syscall-files) diff --git a/so3/arch/arm64/exception.S b/so3/arch/arm64/exception.S index 0e4a30133..114010d43 100644 --- a/so3/arch/arm64/exception.S +++ b/so3/arch/arm64/exception.S @@ -564,6 +564,7 @@ el01_sync_handler: mov x0, sp bl trap_handle +#ifdef CONFIG_IPC_SIGNAL // Check if sigreturn has been called. In this case, we // clean the stack frame which has been used to manage the user handler. cmp x8, #SYSCALL_rt_sigreturn @@ -571,6 +572,7 @@ el01_sync_handler: // Reset the stack frame by removing the one issued from sigreturn add sp, sp, #S_FRAME_SIZE +#endif // Entry point for new user threads ret_from_fork: diff --git a/so3/avz/kernel/injector.c b/so3/avz/kernel/injector.c index ffd5207b6..f8bb7b7f0 100644 --- a/so3/avz/kernel/injector.c +++ b/so3/avz/kernel/injector.c @@ -87,6 +87,10 @@ void inject_capsule(avz_hyp_t *args) /* At the beginning, the capsule is stopped */ domME->avz_shared->dom_desc.u.ME.state = ME_state_stopped; + /* Store slotID & capsuleID */ + domME->avz_shared->dom_desc.u.ME.slotID = slotID; + domME->avz_shared->dom_desc.u.ME.capsuleID = args->u.avz_inject_capsule_args.capsuleID; + /* Set the size of this ME in its own descriptor with the dom_context size */ domME->avz_shared->dom_desc.u.ME.size = memslot[slotID].size; diff --git a/so3/avz/kernel/setup.c b/so3/avz/kernel/setup.c index 86d7f87e7..cf7c6eaba 100644 --- a/so3/avz/kernel/setup.c +++ b/so3/avz/kernel/setup.c @@ -78,7 +78,7 @@ void avz_start(void) lprintk("Copyright (c) 2014-2025 REDS Institute, HEIG-VD, Yverdon-les-Bains\n"); lprintk("Version %s\n", SO3_KERNEL_VERSION); - LOG_INFO("\n\nNow bootstraping the hypervisor kernel ..."); + LOG_INFO("\n\nNow bootstraping the hypervisor kernel ...\n"); /* Memory manager subsystem initialization */ memory_init(); diff --git a/so3/include/log.h b/so3/include/log.h index 71f846d03..e6003c45d 100644 --- a/so3/include/log.h +++ b/so3/include/log.h @@ -20,7 +20,7 @@ #include -#ifdef CONFIG_SOO +#ifdef CONFIG_VLOGS_FRONTEND #include #include #endif diff --git a/so3/kernel/main.c b/so3/kernel/main.c index 1bf429d99..02e68a409 100644 --- a/so3/kernel/main.c +++ b/so3/kernel/main.c @@ -78,7 +78,7 @@ void *rest_init(void *dummy) kernel_thread(app_thread_main, "main_kernel", NULL, 0); - thread_exit(NULL); + thread_exit(0); #elif defined(CONFIG_PROC_ENV) diff --git a/so3/soo/drivers/vlogsfront/vlogs.c b/so3/soo/drivers/vlogsfront/vlogs.c index e79bd4f4d..4f59247be 100644 --- a/so3/soo/drivers/vlogsfront/vlogs.c +++ b/so3/soo/drivers/vlogsfront/vlogs.c @@ -246,7 +246,7 @@ static int vlogs_cwrite(int fd, const void *buffer, int count) { static char msg[1024]; - sprintf(msg, "[ME:%d] %s", get_ME_desc()->slotID, buffer); + sprintf(msg, "[ME:%d] %s", get_ME_desc()->capsuleID, buffer); vlogs_write((char *) msg); diff --git a/so3/soo/include/soo/uapi/soo.h b/so3/soo/include/soo/uapi/soo.h index ed3da353d..8564ead45 100644 --- a/so3/soo/include/soo/uapi/soo.h +++ b/so3/soo/include/soo/uapi/soo.h @@ -175,6 +175,7 @@ extern atomic_t dc_incoming_domID[DC_EVENT_MAX]; */ typedef struct { unsigned int slotID; + unsigned int capsuleID; uint64_t spid; ME_state_t state; @@ -266,6 +267,7 @@ extern volatile avz_shared_t *avz_shared; typedef struct agency_ioctl_args { void *buffer; /* IN/OUT */ int slotID; + int capsuleID; long value; /* IN/OUT */ } agency_ioctl_args_t; @@ -304,6 +306,7 @@ typedef struct agency_ioctl_args { typedef struct { void *itb_paddr; int slotID; + int capsuleID; } avz_inject_capsule_t; /* AVZ_START_CAPSULE */