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.


Merge branch 'devel' of newskysaw.cs.northwestern.edu:/home/palacios/palacios into...
[palacios.git] / linux_module / linux-exts.c
index d6409b8..d07cef0 100644 (file)
@@ -17,6 +17,18 @@ struct vm_ext {
 };
 
 
+void * get_vm_ext_data(struct v3_guest * guest, char * ext_name) {
+    struct vm_ext * ext = NULL;
+
+    list_for_each_entry(ext, &(guest->exts), node) {
+       if (strncmp(ext->impl->name, ext_name, strlen(ext->impl->name)) == 0) {
+           return ext->vm_data;
+       }
+    }
+
+    return NULL;
+}
+
 
 int init_vm_extensions(struct v3_guest * guest) {
     extern struct linux_ext * __start__lnx_exts[];
@@ -29,6 +41,7 @@ int init_vm_extensions(struct v3_guest * guest) {
 
        if (ext_impl->guest_init == NULL) {
            // We can have global extensions without per guest state
+           ext_impl = __start__lnx_exts[++i];
            continue;
        }
        
@@ -54,6 +67,7 @@ int init_vm_extensions(struct v3_guest * guest) {
 }
 
 
+
 int deinit_vm_extensions(struct v3_guest * guest) {
     struct vm_ext * ext = NULL;
     struct vm_ext * tmp = NULL;