X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_module%2Fpalacios-vm.c;h=943bbff17c2ea77e020fe355e99975e2b0d7f3a5;hb=374b2d6d22a0e0dc6ed8d3d628e635ab935072e0;hp=1d8bfe0d3b4204bcb1613ef9e04b39f71c652494;hpb=4801e692b7344051eb94fff6faf1be53f621d422;p=palacios.releases.git diff --git a/linux_module/palacios-vm.c b/linux_module/palacios-vm.c index 1d8bfe0..943bbff 100644 --- a/linux_module/palacios-vm.c +++ b/linux_module/palacios-vm.c @@ -17,6 +17,9 @@ #include #include +#ifdef CONFIG_DEBUG_FS +#include +#endif #include @@ -25,6 +28,7 @@ #include "palacios-serial.h" #include "palacios-vm.h" + extern struct class * v3_class; #define STREAM_NAME_LEN 128 @@ -102,6 +106,7 @@ extern u32 pg_frees; extern u32 mallocs; extern u32 frees; +#include int start_palacios_vm(void * arg) { struct v3_guest * guest = (struct v3_guest *)arg; @@ -145,6 +150,37 @@ int start_palacios_vm(void * arg) { printk("palacios: launching vm\n"); + + +#if 0 + // Inspection Test + { + struct v3_inspection_value rax; + v3_inspect_node_t * core = NULL; + v3_inspect_node_t * gprs = NULL; + v3_inspect_node_t * root = v3_get_inspection_root(guest->v3_ctx); + + if (!root) { + printk("NULL root inspection tree\n"); + } + + core = v3_get_inspection_subtree(root, "core.0"); + if (!core) { + printk("NULL core inspection tree\n"); + } + + gprs = v3_get_inspection_subtree(core, "GPRS"); + if (!gprs) { + printk("NULL gprs inspection tree\n"); + } + + v3_get_inspection_value(gprs, "RAX", &rax); + + debugfs_create_u64("RAX", 0644, NULL, (u64 *)rax.value); + } +#endif + + if (v3_start_vm(guest->v3_ctx, 0xffffffff) < 0) { printk("palacios: launch of vm failed\n"); return -1; @@ -172,5 +208,8 @@ int stop_palacios_vm(struct v3_guest * guest) { cdev_del(&(guest->cdev)); + kfree(guest->img); + kfree(guest); + return 0; }