Skip to content
Snippets Groups Projects
Commit a1beea41 authored by iliya.saroukha's avatar iliya.saroukha :first_quarter_moon:
Browse files

wip: vcpu structure and initialization

parent 7ecd8f1a
Branches
No related tags found
No related merge requests found
#include "vcpu.h"
#include "../debug/debug.h"
#include "../region/vxmon.h"
#include <linux/errno.h>
int init_vcpu(struct vcpu_t *vcpu, struct vmxon_t *vmxon) {
if (!vcpu) {
DEBUG_FMT("vcpu isn't allocated\n");
return -EFAULT;
}
if (!vmxon) {
DEBUG_FMT("vmxon region isn't allocated\n");
return -EFAULT;
}
vcpu->vmxon = vmxon;
return 0;
}
#pragma once
#include "../region/vxmon.h"
struct vcpu_t {
struct vmxon_t *vmxon;
/*NOTE: prolly should store the PAs of pointers to avoid unnecessary
* address translations, although they should reside in the TLB by that
* point*/
};
int init_vcpu(struct vcpu_t *vcpu);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment