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
2 changes: 1 addition & 1 deletion src/core/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void console_init(void)
cpu_sync_and_clear_msgs(&cpu_glb_sync);
}

void console_write(const char* buf, size_t n)
static void console_write(const char* buf, size_t n)
{
while (!console_ready)
;
Expand Down
3 changes: 1 addition & 2 deletions src/core/inc/console.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
#ifndef __CONSOLE_H__
#define __CONSOLE_H__

#include <bao.h>
#include <stddef.h>

void console_init(void);
void console_write(const char* buf, size_t n);
void console_printk(const char* fmt, ...);

#endif /* __CONSOLE_H__ */
4 changes: 2 additions & 2 deletions src/core/inc/remio.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <bao.h>
#include <emul.h>
#include <list.h>
#include <vm.h>
#include <types.h>

/**
* @struct remio_shmem
Expand Down Expand Up @@ -64,7 +64,7 @@ void remio_init(void);
* one with the lowest ID, since only one CPU is required to inject VM interrupts
* @param vm Pointer to the VM structure
*/
void remio_assign_vm_cpus(struct vm* vm);
void remio_assign_vm_cpus(vmid_t vmid);

/**
* @brief Remote I/O hypercall callback
Expand Down
6 changes: 3 additions & 3 deletions src/core/remio.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,13 +406,13 @@ void remio_init(void)
}
}

void remio_assign_vm_cpus(struct vm* vm)
void remio_assign_vm_cpus(vmid_t vmid)
{
list_foreach (remio_device_list, struct remio_device, dev) {
if (vm->id == dev->config.backend.vm_id) {
if (vmid == dev->config.backend.vm_id) {
dev->config.backend.cpu_id = min(dev->config.backend.cpu_id, cpu()->id);
dev->config.backend.ready = true;
} else if (vm->id == dev->config.frontend.vm_id) {
} else if (vmid == dev->config.frontend.vm_id) {
dev->config.frontend.cpu_id = min(dev->config.frontend.cpu_id, cpu()->id);
dev->config.frontend.ready = true;
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ static void vm_init_remio(struct vm* vm, const struct vm_config* vm_config)
struct remio_dev* remio_dev = &vm_config->platform.remio_devs[i];
vm_init_remio_dev(vm, remio_dev);
}
remio_assign_vm_cpus(vm);
remio_assign_vm_cpus(vm->id);
}

static struct vm* vm_allocation_init(struct vm_allocation* vm_alloc)
Expand Down
Loading