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.


reorganization of the symbiotic infrastructure
[palacios-OLD.git] / palacios / src / devices / sym_swap2.c
index 3946636..0fbc53b 100644 (file)
@@ -65,7 +65,7 @@ struct swap_state {
     int active;
     int disabled;
 
-    struct guest_info * vm;
+    struct v3_vm_info * vm;
     struct swap_state * swap_info;
 
     int symbiotic;
@@ -507,7 +507,7 @@ static struct v3_device_ops dev_ops = {
 
 
 #ifdef CONFIG_SYMBIOTIC_SWAP_TELEMETRY
-static void telemetry_cb(struct guest_info * info, void * private_data, char * hdr) {
+static void telemetry_cb(struct v3_vm_info * vm, void * private_data, char * hdr) {
     struct swap_state * swap = (struct swap_state *)private_data;
 
     V3_Print("%sSwap Device:\n", hdr);
@@ -519,7 +519,7 @@ static void telemetry_cb(struct guest_info * info, void * private_data, char * h
 #endif
 
 
-static int connect_fn(struct guest_info * info, 
+static int connect_fn(struct v3_vm_info * vm, 
                      void * frontend_data, 
                      struct v3_dev_blk_ops * ops, 
                      v3_cfg_tree_t * cfg, 
@@ -540,7 +540,7 @@ static int connect_fn(struct guest_info * info,
 
     swap = (struct swap_state *)V3_Malloc(sizeof(struct swap_state));
 
-    swap->vm = info;
+    swap->vm = vm;
     swap->cache_size = cache_size;
     swap->io_flag = 0;
     swap->seek_usecs = seek_us;
@@ -571,11 +571,11 @@ static int connect_fn(struct guest_info * info,
        swap->active = 0;
 
        swap->cache_base_addr = (addr_t)V3_AllocPages(swap->cache_size / 4096);
-       swap->cache = (uint8_t *)V3_VAddr((void *)(swap->cache_base_addr));
+       swap->cache = (uint8_t *)V3_VAddr((void *)(addr_t)(swap->cache_base_addr));
        memset(swap->cache, 0, swap->cache_size);
     }
 
-    if (v3_dev_connect_blk(info, v3_cfg_val(frontend_cfg, "tag"), 
+    if (v3_dev_connect_blk(vm, v3_cfg_val(frontend_cfg, "tag"), 
                           &blk_ops, frontend_cfg, swap) == -1) {
        PrintError("Could not connect to frontend %s\n", 
                    v3_cfg_val(frontend_cfg, "tag"));
@@ -585,8 +585,8 @@ static int connect_fn(struct guest_info * info,
 
 #ifdef CONFIG_SYMBIOTIC_SWAP_TELEMETRY
 
-    if (info->enable_telemetry == 1) {
-       v3_add_telemetry_cb(info, telemetry_cb, swap);
+    if (vm->enable_telemetry == 1) {
+       v3_add_telemetry_cb(vm, telemetry_cb, swap);
     }
     
 #endif
@@ -597,7 +597,7 @@ static int connect_fn(struct guest_info * info,
 
 
 
-static int swap_init(struct guest_info * vm, v3_cfg_tree_t * cfg) {
+static int swap_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) {
 
     char * name = v3_cfg_val(cfg, "name");