X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Flnx_virtio_balloon.c;h=3350e266a793aee412e8eb98bab3505020284d27;hp=fed0c83552e1feba8ed6907c16ed9324881bf0b3;hb=571979dad8fc2138a7e11c4fe61e812a0a0b17d1;hpb=8a441df14ef65bb559ce090249343ec1dac1a7fc diff --git a/palacios/src/devices/lnx_virtio_balloon.c b/palacios/src/devices/lnx_virtio_balloon.c index fed0c83..3350e26 100644 --- a/palacios/src/devices/lnx_virtio_balloon.c +++ b/palacios/src/devices/lnx_virtio_balloon.c @@ -142,8 +142,9 @@ static int handle_kick(struct vm_device * dev) { addr_t page_addr; tmp_desc = &(q->desc[desc_idx]); - PrintDebug("Header Descriptor (ptr=%p) gpa=%p, len=%d, flags=%x, next=%d\n", tmp_desc, - (void *)(tmp_desc->addr_gpa), tmp_desc->length, + PrintDebug("Header Descriptor (ptr=%p) gpa=%p, len=%d, flags=%x, next=%d\n", + tmp_desc, + (void *)(addr_t)(tmp_desc->addr_gpa), tmp_desc->length, tmp_desc->flags, tmp_desc->next); @@ -415,10 +416,11 @@ static int handle_query_hcall(struct guest_info * info, uint_t hcall_id, void * -static int virtio_init(struct guest_info * vm, void * cfg_data) { - struct vm_device * pci_bus = v3_find_dev(vm, (char *)cfg_data); +static int virtio_init(struct guest_info * vm, v3_cfg_tree_t * cfg) { + struct vm_device * pci_bus = v3_find_dev(vm, v3_cfg_val(cfg, "bus")); struct virtio_balloon_state * virtio_state = NULL; struct pci_device * pci_dev = NULL; + char * name = v3_cfg_val(cfg, "name"); PrintDebug("Initializing VIRTIO Balloon device\n"); @@ -432,9 +434,9 @@ static int virtio_init(struct guest_info * vm, void * cfg_data) { memset(virtio_state, 0, sizeof(struct virtio_balloon_state)); - struct vm_device * dev = v3_allocate_device("LNX_VIRTIO_BALLOON", &dev_ops, virtio_state); + struct vm_device * dev = v3_allocate_device(name, &dev_ops, virtio_state); if (v3_attach_device(vm, dev) == -1) { - PrintError("Could not attach device %s\n", "LNX_VIRTIO_BALLOON"); + PrintError("Could not attach device %s\n", name); return -1; }