Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


fix thread exit behavior to allow stopping of guests
Jack Lange [Fri, 7 Oct 2011 17:53:35 +0000 (13:53 -0400)]
linux_module/palacios-stubs.c

index 8eeeb7d..21aa4fd 100644 (file)
@@ -155,12 +155,11 @@ palacios_xcall(
 struct lnx_thread_arg {
     int (*fn)(void * arg);
     void * arg;
-    char * name;
 };
 
 static int lnx_thread_target(void * arg) {
     struct lnx_thread_arg * thread_info = (struct lnx_thread_arg *)arg;
-
+    int ret = 0;
     /*
       printk("Daemonizing new Palacios thread (name=%s)\n", thread_info->name);
 
@@ -169,12 +168,14 @@ static int lnx_thread_target(void * arg) {
     */
 
 
-    thread_info->fn(thread_info->arg);
+    ret = thread_info->fn(thread_info->arg);
 
     kfree(thread_info);
     // handle cleanup 
+
+    do_exit(ret);
     
-    return 0;
+    return 0; // should not get here.
 }
 
 /**
@@ -190,7 +191,6 @@ palacios_start_kernel_thread(
 
     thread_info->fn = fn;
     thread_info->arg = arg;
-    thread_info->name = thread_name;
 
     return kthread_run( lnx_thread_target, thread_info, thread_name );
 }
@@ -209,7 +209,6 @@ palacios_start_thread_on_cpu(int cpu_id,
 
     thread_info->fn = fn;
     thread_info->arg = arg;
-    thread_info->name = thread_name;
 
 
     thread = kthread_create( lnx_thread_target, thread_info, thread_name );