Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions so3/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions so3/arch/arm64/exception.S
Original file line number Diff line number Diff line change
Expand Up @@ -564,13 +564,15 @@ 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
bne ret_from_fork

// 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:
Expand Down
2 changes: 1 addition & 1 deletion so3/avz/include/avz/domain.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ extern int construct_agency(struct domain *d);

#ifdef CONFIG_SOO
extern int construct_ME(struct domain *d);
ME_state_t get_ME_state(unsigned int ME_slotID);
ME_state_t avz_get_ME_state(unsigned int ME_slotID);
#endif /* CONFIG_SOO */

void do_domctl(domctl_t *args);
Expand Down
6 changes: 3 additions & 3 deletions so3/avz/include/avz/gnttab.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
*
*/

#ifndef GNTTAB_H
#define GNTTAB_H
#ifndef AVZ_GNTTAB_H
#define AVZ_GNTTAB_H

#include <list.h>

Expand All @@ -41,4 +41,4 @@ void gnttab_init(struct domain *d);
void do_gnttab(gnttab_op_t *args);
addr_t map_vbstore_pfn(int target_domid, int pfn);

#endif /* GNTTAB_H */
#endif /* AVZ_GNTTAB_H */
2 changes: 1 addition & 1 deletion so3/avz/include/avz/soo.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
void soo_activity_init(void);
void shutdown_ME(unsigned int ME_slotID);

ME_state_t get_ME_state(uint32_t ME_slotID);
ME_state_t avz_get_ME_state(uint32_t ME_slotID);
void set_ME_state(uint32_t slotID, ME_state_t state);

#endif /* SOO_H */
6 changes: 3 additions & 3 deletions so3/avz/kernel/hypercalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
* If the ME does not exist anymore (for example, following a KILL_ME),
* the state is set to ME_state_dead.
*/
ME_state_t get_ME_state(unsigned int ME_slotID)
ME_state_t avz_get_ME_state(unsigned int ME_slotID)
{
if (domains[ME_slotID] == NULL)
return ME_state_dead;
Expand All @@ -72,7 +72,7 @@ void shutdown_ME(unsigned int ME_slotID)

vcpu_pause(dom);

DBG("Destroy evtchn if necessary - state: %d\n", get_ME_state(ME_slotID));
DBG("Destroy evtchn if necessary - state: %d\n", avz_get_ME_state(ME_slotID));
evtchn_destroy(dom);

DBG("Wiping domain area...\n");
Expand Down Expand Up @@ -193,7 +193,7 @@ void do_avz_hypercall(void *__args)
break;

case AVZ_GET_ME_STATE:
args->u.avz_me_state_args.state = get_ME_state(args->u.avz_me_state_args.slotID);
args->u.avz_me_state_args.state = avz_get_ME_state(args->u.avz_me_state_args.slotID);
break;

case AVZ_SET_ME_STATE: {
Expand Down
4 changes: 4 additions & 0 deletions so3/avz/kernel/injector.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion so3/avz/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion so3/kernel/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion so3/soo/drivers/vlogsfront/vlogs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
3 changes: 3 additions & 0 deletions so3/soo/include/soo/uapi/soo.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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 */
Expand Down