X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fsym_swap2.c;h=0fbc53b03d43fa5a812f37893d739220d92959e2;hb=ee1279646a778613b23a42350b903ebb57c068f8;hp=39466361122f7390f2a75b17dd1aa99d28d2e226;hpb=aa514a096de7869eb2d6b989d0f398d23f37650a;p=palacios-OLD.git diff --git a/palacios/src/devices/sym_swap2.c b/palacios/src/devices/sym_swap2.c index 3946636..0fbc53b 100644 --- a/palacios/src/devices/sym_swap2.c +++ b/palacios/src/devices/sym_swap2.c @@ -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");