From: Peter Dinda Date: Wed, 26 Dec 2012 17:03:27 +0000 (-0600) Subject: Minor changes to eliminate warnings, and second-try allocation for pages X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=commitdiff_plain;h=803866720fcee3755c3a1c30761f26f56bbf764b Minor changes to eliminate warnings, and second-try allocation for pages --- diff --git a/linux_module/iface-socket.c b/linux_module/iface-socket.c index 82fbe56..7f0328c 100644 --- a/linux_module/iface-socket.c +++ b/linux_module/iface-socket.c @@ -414,7 +414,6 @@ palacios_recvfrom_ip( { struct palacios_socket * sock = (struct palacios_socket *)sock_ptr; struct sockaddr_in src; - int alen; struct msghdr msg; mm_segment_t oldfs; struct iovec iov; @@ -427,7 +426,6 @@ palacios_recvfrom_ip( src.sin_family = AF_INET; src.sin_port = htons(port); src.sin_addr.s_addr = htonl(ip_addr); - alen = sizeof(src); msg.msg_flags = 0; diff --git a/linux_module/mm.c b/linux_module/mm.c index d71cb96..83c69ae 100644 --- a/linux_module/mm.c +++ b/linux_module/mm.c @@ -120,8 +120,8 @@ uintptr_t alloc_palacios_pgs(u64 num_pages, u32 alignment) { pgs = alloc_pages(GFP_DMA32, order); if (!pgs) { - ERROR("Could not allocate small number of contigious pages\n"); - return 0; + ERROR("Could not allocate small number of contigious pages - retrying with internal allocation\n"); + goto trybig; } /* DEBUG("%llu pages (order=%d) aquired from alloc_pages\n", @@ -145,6 +145,7 @@ uintptr_t alloc_palacios_pgs(u64 num_pages, u32 alignment) { } else { + trybig: //DEBUG("Allocating %llu pages from bitmap allocator\n", num_pages); //addr = pool.base_addr; addr = alloc_contig_pgs(num_pages, alignment); diff --git a/linux_module/vm.c b/linux_module/vm.c index 5584b38..54d5efd 100644 --- a/linux_module/vm.c +++ b/linux_module/vm.c @@ -132,11 +132,10 @@ int remove_guest_ctrl(struct v3_guest * guest, unsigned int cmd) { static void free_guest_ctrls(struct v3_guest * guest) { struct rb_node * node = rb_first(&(guest->vm_ctrls)); struct vm_ctrl * ctrl = NULL; - struct rb_node * tmp_node = NULL; while (node) { ctrl = rb_entry(node, struct vm_ctrl, tree_node); - tmp_node = node; + node = rb_next(node); WARNING("Cleaning up guest ctrl that was not removed explicitly (%d)\n", ctrl->cmd); @@ -231,7 +230,7 @@ static long v3_vm_ioctl(struct file * filp, return -EFAULT; } - NOTICE("Loading Guest to %s:%s\n", chkpt.store, chkpt.url); + NOTICE("Loading Guest from %s:%s\n", chkpt.store, chkpt.url); if (v3_load_vm(guest->v3_ctx, chkpt.store, chkpt.url) == -1) { WARNING("Error Loading VM state\n");