X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_module%2Fmain.c;h=38a2fd4a28e33d1aacd812fc5f71189478a24a2b;hb=475a9909153784cf9308ace2fa47896ad5a34eac;hp=34c24f7adbc8d6efbaad854f5098f24024e31c97;hpb=0b2115047303e779be8578e9802cfa55d1767c7b;p=palacios.git diff --git a/linux_module/main.c b/linux_module/main.c index 34c24f7..38a2fd4 100644 --- a/linux_module/main.c +++ b/linux_module/main.c @@ -355,9 +355,11 @@ static int read_guests_details(struct seq_file *s, void *v) seq_printf(s, "\nMemory Regions\n"); for (j=0;jnum_regions;j++) { - seq_printf(s," region %u has HPAs 0x%p-0x%p (node %d)\n", + seq_printf(s," region %u has HPAs 0x%p-0x%p (node %d) %s %s\n", j, mem->region[j].host_paddr, mem->region[j].host_paddr+mem->region[j].size, - numa_addr_to_node((uintptr_t)(mem->region[j].host_paddr))); + numa_addr_to_node((uintptr_t)(mem->region[j].host_paddr)), + mem->region[j].swapped ? "swapped" : "", + mem->region[j].pinned ? "pinned" : ""); } } seq_printf(s, @@ -682,8 +684,13 @@ static void __exit v3_exit(void) { /* Stop and free any running VMs */ for (i = 0; i < MAX_VMS; i++) { - if (guest_map[i] != NULL) { - guest = (struct v3_guest *)guest_map[i]; + if (guest_map[i] != NULL) { + guest = (struct v3_guest *)(guest_map[i]); + + if (!guest->v3_ctx) { + ERROR("Orphan VM detected and skipped: index=%d name=%s\n", i, guest->name); + continue; + } if (v3_stop_vm(guest->v3_ctx) < 0) ERROR("Couldn't stop VM %d\n", i);