#include <linux/file.h>
#include <linux/spinlock.h>
+#ifdef CONFIG_DEBUG_FS
+#include "palacios-debugfs.h"
+#endif
#include <palacios/vmm.h>
#include "palacios-serial.h"
#include "palacios-vm.h"
+
extern struct class * v3_class;
#define STREAM_NAME_LEN 128
extern u32 mallocs;
extern u32 frees;
-
int start_palacios_vm(void * arg) {
struct v3_guest * guest = (struct v3_guest *)arg;
int err;
printk("palacios: launching vm\n");
+
+
+#if CONFIG_DEBUG_FS
+ dfs_register_vm(guest);
+#endif
+
+
if (v3_start_vm(guest->v3_ctx, 0xffffffff) < 0) {
printk("palacios: launch of vm failed\n");
return -1;
cdev_del(&(guest->cdev));
+ kfree(guest->img);
+ kfree(guest);
+
return 0;
}