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.


Removed spurious print
[palacios.git] / palacios / src / devices / swapbypass_cache2.c
index 72ff58f..dfd51ba 100644 (file)
@@ -24,7 +24,7 @@
 #include <palacios/vmm_hashtable.h>
 
 
-#ifdef CONFIG_SWAPBYPASS_TELEMETRY
+#ifdef V3_CONFIG_SWAPBYPASS_TELEMETRY
 #include <palacios/vmm_telemetry.h>
 #endif
 
@@ -83,7 +83,7 @@ struct swap_state {
     struct v3_dev_blk_ops * ops;
     void * private_data;
 
-#ifdef CONFIG_SWAPBYPASS_TELEMETRY
+#ifdef V3_CONFIG_SWAPBYPASS_TELEMETRY
     uint32_t pages_in;
     uint32_t pages_out;
 #endif
@@ -235,7 +235,7 @@ static int buf_read(uint8_t * buf, uint64_t lba, uint64_t num_bytes, void * priv
        swap->unswapped_pages += (length / 4096);
 
 
-#ifdef CONFIG_SWAPBYPASS_TELEMETRY
+#ifdef V3_CONFIG_SWAPBYPASS_TELEMETRY
        swap->pages_in += length / 4096;
 #endif
 
@@ -384,7 +384,7 @@ static int buf_write(uint8_t * buf,  uint64_t lba, uint64_t num_bytes, void * pr
 
        swap->swapped_pages += written_pages;
        
-#ifdef CONFIG_SWAPBYPASS_TELEMETRY
+#ifdef V3_CONFIG_SWAPBYPASS_TELEMETRY
        swap->pages_out += length / 4096;
 #endif
 
@@ -506,7 +506,7 @@ static struct v3_device_ops dev_ops = {
 };
 
 
-#ifdef CONFIG_SWAPBYPASS_TELEMETRY
+#ifdef V3_CONFIG_SWAPBYPASS_TELEMETRY
 static void telemetry_cb(struct v3_vm_info * vm, void * private_data, char * hdr) {
     struct swap_state * swap = (struct swap_state *)private_data;
 
@@ -583,7 +583,7 @@ static int connect_fn(struct v3_vm_info * vm,
     }
 
 
-#ifdef CONFIG_SWAPBYPASS_TELEMETRY
+#ifdef V3_CONFIG_SWAPBYPASS_TELEMETRY
 
     if (vm->enable_telemetry == 1) {
        v3_add_telemetry_cb(vm, telemetry_cb, swap);
@@ -599,17 +599,17 @@ static int connect_fn(struct v3_vm_info * vm,
 
 static int swap_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) {
 
-    char * name = v3_cfg_val(cfg, "name");
+    char * dev_id = v3_cfg_val(cfg, "ID");
 
-    struct vm_device * dev = v3_allocate_device(name, &dev_ops, NULL);
+    struct vm_device * dev = v3_allocate_device(dev_id, &dev_ops, NULL);
 
     if (v3_attach_device(vm, dev) == -1) {
-       PrintError("Could not attach device %s\n", name);
+       PrintError("Could not attach device %s\n", dev_id);
        return -1;
     }
 
-    if (v3_dev_add_blk_frontend(vm, name, connect_fn, NULL) == -1) {
-       PrintError("Could not register %s as block frontend\n", name);
+    if (v3_dev_add_blk_frontend(vm, dev_id, connect_fn, NULL) == -1) {
+       PrintError("Could not register %s as block frontend\n", dev_id);
        return -1;
     }