2 * This file is part of the Palacios Virtual Machine Monitor developed
3 * by the V3VEE Project with funding from the United States National
4 * Science Foundation and the Department of Energy.
6 * The V3VEE Project is a joint project between Northwestern University
7 * and the University of New Mexico. You can find out more at
10 * Copyright (c) 2008, Jack Lange <jarusl@cs.northwestern.edu>
11 * Copyright (c) 2008, The V3VEE Project <http://www.v3vee.org>
12 * All rights reserved.
14 * Author: Jack Lange <jarusl@cs.northwestern.edu>
16 * This is free software. You are permitted to use,
17 * redistribute, and modify it as specified in the file "V3VEE_LICENSE".
19 #include <palacios/vmm.h>
20 #include <palacios/vmm_symmod.h>
21 #include <palacios/vmm_symbiotic.h>
22 #include <palacios/vm_guest.h>
25 int V3_init_symmod() {
32 int v3_init_symmod_vm(struct v3_vm_info * info, v3_cfg_tree_t * cfg) {
38 int v3_set_symmod_loader(struct v3_vm_info * vm, struct v3_symmod_loader_ops * ops, void * priv_data) {
39 struct v3_symmod_state * symmod_state = &(vm->sym_vm_state.symmod_state);
42 symmod_state->loader_ops = ops;
43 symmod_state->loader_data = priv_data;
50 static char test_module_data[16] = {"hello"};
52 static struct v3_sym_module test_module = {
55 .data = test_module_data,
58 int v3_load_sym_module(struct v3_vm_info * vm, char * mod_name) {
59 struct v3_symmod_state * symmod_state = &(vm->sym_vm_state.symmod_state);
61 PrintDebug("Loading Module (%s)\n", mod_name);
63 return symmod_state->loader_ops->load_module(vm, mod_name, 16, symmod_state->loader_data);
66 struct v3_sym_module * v3_get_sym_module(struct v3_vm_info * vm, char * name) {