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.


update palacios mempool status when onlining memory in userspace
Kyle Hale [Fri, 27 Jul 2012 03:55:36 +0000 (22:55 -0500)]
/proc/v3vee/v3-mem will now report correctly after memory has been onlined

linux_module/ioctls.txt
linux_module/main.c
linux_module/palacios.h
linux_usr/v3_mem_free.c

index 95ea1e6..d1f9f2a 100644 (file)
@@ -7,6 +7,7 @@ Global commands (/dev/v3vee)
 13 -- (VMM) Free VM
 
 50 -- (VMM) Add physical memory to VMM manager
+51 -- (VMM) Reset VMM manager memory counts
 
 55 -- (IFACE) Add PCI HW Device
 56 -- (IFACE) Add PCI User Device
index 098d8f1..efaa20e 100644 (file)
@@ -174,6 +174,13 @@ out_err:
            break;
        }
 
+        case V3_RESET_MEMORY: {
+            if (palacios_init_mm() == -1) {
+                ERROR("Error resetting Palacios memory\n");
+                return -EFAULT;
+            }
+            break;  
+        }
 
        default: {
            struct global_ctrl * ctrl = get_global_ctrl(ioctl);
index 0141e38..b80663a 100644 (file)
@@ -12,6 +12,8 @@
 #define V3_FREE_GUEST 13
 
 #define V3_ADD_MEMORY 50
+#define V3_RESET_MEMORY 51
+
 #define V3_ADD_PCI_HW_DEV 55
 #define V3_ADD_PCI_USER_DEV 56
 
index 31a775e..16afaef 100644 (file)
@@ -1,6 +1,11 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <sys/types.h>
+
+#include "v3_ctrl.h"
 
 int main(void) 
 {
@@ -12,6 +17,7 @@ int main(void)
     unsigned long amount_allocated = 0;
     unsigned long long block_size = 0;
     int i = 0;
+    int v3_fd;
     
     fp = fopen(filepath, "r");
     if(fp == NULL) {
@@ -61,5 +67,14 @@ int main(void)
        base_addr++;
     }
     
+    v3_fd = open(v3_dev, O_RDONLY);
+    if (v3_fd == -1) {
+        printf("Error opening V3Vee control device\n");
+        return -1;
+    }
+
+    ioctl(v3_fd, V3_RESET_MEMORY, NULL);
+    close(v3_fd);
+
     return 0;
 }