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.


Cache information interface and implementation for AMD and Intel on Linux
[palacios.git] / linux_usr / v3_free.c
1 /* 
2  * V3 Control utility
3  * (c) Jack lange, 2011
4  */
5
6 #include <string.h>
7  
8 #include "v3_ctrl.h"
9
10 int main(int argc, char* argv[]) {
11     unsigned long vm_idx = 0;
12     char *idx;
13     int ret;
14
15     if (argc <= 1) 
16         v3_usage("<vm-dev-idx>|<vm-dev>\n");
17
18     if (!(idx=strstr(argv[1],"v3-vm"))) { 
19         idx=argv[1];
20     } else {
21         idx+=5;
22     }
23
24     vm_idx = strtol(idx, NULL, 0);
25
26     printf("Freeing VM %d\n", vm_idx);
27     
28     if (v3_dev_ioctl(V3_FREE_GUEST, (void*)vm_idx) < 0) {
29         fprintf(stderr, "Error freeing VM %d (%s)\n", vm_idx,argv[1]);
30         return -1;
31     }
32
33     return 0; 
34
35
36