X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=kitten%2Fpalacios-glue%2Fvm.c;fp=kitten%2Fpalacios-glue%2Fvm.c;h=1d3e32298a7b77574b8debca5d659d4031f64d42;hb=66a1a4c7a9edcd7d8bc207aca093d694a6e6b5b2;hp=0000000000000000000000000000000000000000;hpb=f7cf9c19ecb0a589dd45ae0d2c91814bd3c2acc2;p=palacios.releases.git diff --git a/kitten/palacios-glue/vm.c b/kitten/palacios-glue/vm.c new file mode 100644 index 0000000..1d3e322 --- /dev/null +++ b/kitten/palacios-glue/vm.c @@ -0,0 +1,58 @@ +/* + * This file is part of the Palacios Virtual Machine Monitor developed + * by the V3VEE Project with funding from the United States National + * Science Foundation and the Department of Energy. + * + * The V3VEE Project is a joint project between Northwestern University + * and the University of New Mexico. You can find out more at + * http://www.v3vee.org + * + * Copyright (c) 2008, Jack Lange + * Copyright (c) 2008, The V3VEE Project + * All rights reserved. + * + * Author: Jack Lange + * + * This is free software. You are permitted to use, + * redistribute, and modify it as specified in the file "V3VEE_LICENSE". + */ + + + +#include +#include + +#include +#include + + +int +v3vee_run_vmm( void ) +{ + struct v3_ctrl_ops v3_ops = {}; + + Init_V3( &v3vee_os_hooks, &v3_ops ); + + struct v3_vm_config vm_config = { + .rombios = &rombios_start, + .rombios_size = (&rombios_end)-(&rombios_start), + .vgabios = &vgabios_start, + .vgabios_size = (&vgabios_end)-(&vgabios_start), + .use_ramdisk = 1, + .ramdisk = (void*) initrd_start, + .ramdisk_size = initrd_end - initrd_start, + }; + + struct guest_info * vm_info = v3_ops.allocate_guest(); + v3vee_init_stubs(); + + v3_ops.config_guest(vm_info, &vm_config); + + v3_ops.init_guest(vm_info); + g_vm_guest = vm_info; + + printk("Starting Guest\n"); + v3_ops.start_guest(vm_info); + + return 0; +}