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.


pci_front bugfix - do not propagate cmd reg write twice
[palacios.git] / linux_module / iface-graphics-console.c
index 748c8b3..6744cfd 100644 (file)
@@ -22,7 +22,6 @@
 #include "linux-exts.h"
 #include "vm.h"
 
-#include <linux/vmalloc.h>
 
 /*
 
@@ -107,7 +106,7 @@ static v3_graphics_console_t g_open(void * priv_data,
     DEBUG("palacios: allocating %u bytes for %u by %u by %u buffer\n",
           mem, desired_spec->width, desired_spec->height, desired_spec->bytes_per_pixel);
 
-    gc->data = vmalloc(mem);
+    gc->data = palacios_valloc(mem);
 
     if (!(gc->data)) { 
        ERROR("palacios: unable to allocate memory for frame buffer\n");
@@ -149,7 +148,7 @@ static  void g_close(v3_graphics_console_t cons)
            return;
        }
        if (gc->data) { 
-           vfree(gc->data);
+           palacios_vfree(gc->data);
            gc->data=0;
        }
     }
@@ -321,7 +320,7 @@ static int graphics_console_deinit( void ) {
         list_del(&(gc->gcons_node));
 
         if (gc->data) 
-            vfree(gc->data);
+            palacios_vfree(gc->data);
 
         palacios_free(gc);
     }
@@ -476,10 +475,14 @@ static int graphics_console_guest_deinit(struct v3_guest * guest, void * vm_data
 
     list_del(&(graphics_cons->gcons_node));
 
+    remove_guest_ctrl(guest, V3_VM_FB_INPUT);
+    remove_guest_ctrl(guest, V3_VM_FB_QUERY);
+
     if (graphics_cons->data) { 
-       vfree(graphics_cons->data);
+       palacios_vfree(graphics_cons->data);
     }
 
+
     palacios_free(graphics_cons);
 
     return 0;