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".
22 #include <lwk/kernel.h>
23 #include <lwk/palacios.h>
25 #include <palacios/vmm.h>
26 #include <palacios/vmm_io.h>
32 struct v3_ctrl_ops v3_ops = {};
33 struct guest_info * vm_info = 0;
35 void * ramdiskImage=initrd_start;
36 uintptr_t ramdiskSize=initrd_end-initrd_start;
40 Init_V3(&v3vee_os_hooks, &v3_ops);
43 struct v3_vm_config vm_config = {
44 .rombios = &rombios_start,
45 .rombios_size = (&rombios_end)-(&rombios_start),
46 .vgabios = &vgabios_start,
47 .vgabios_size = (&vgabios_end)-(&vgabios_start),
51 if (ramdiskImage != NULL) {
52 vm_config.use_ramdisk = 1;
53 vm_config.ramdisk = ramdiskImage;
54 vm_config.ramdisk_size = ramdiskSize;
59 vm_info = (v3_ops).allocate_guest();
63 //PrintBoth("Allocated Guest\n");
65 (v3_ops).config_guest(vm_info, &vm_config);
67 //PrintBoth("Configured guest\n");
69 (v3_ops).init_guest(vm_info);
70 printk("Starting Guest\n");
73 (v3_ops).start_guest(vm_info);